Computes storage paths for accessing Map entries. The storage path combines the variable’s base path with the key’s hash to create a unique identifier for the storage slot. This path can then be used for subsequent read or write operations, or advanced further by chaining the entry method.

Signature

pub trait StoragePathEntry

Examples

use starknet::ContractAddress;
use starknet::storage::{Map, StoragePathEntry};

#[storage]
struct Storage {
    balances: Map,
}

// Get the storage path for the balance of a specific address
let balance_path = self.balances.entry(address);

Trait functions

entry

Signature

fn entry(self: C, key: Self::Key) -> StoragePathValue>

Trait types

Key

Signature

type Key;

Value

Signature

type Value;