Resources
Resources vs Instances
/// A holder of a specific coin type and associated event handles.
/// These are kept in a single resource to ensure locality of data.
struct CoinStore<phantom CoinType> has key {
coin: Coin<CoinType>,
}
/// Main structure representing a coin/token in an account's custody.
struct Coin<phantom CoinType> has store {
/// Amount of coin this address has.
value: u64,
}struct CustomCoinBox<phantom CoinType> has key {
coin: Coin<CoinType>,
}Define resources and objects
Permissions of Instances including Resources
Viewing a resource
How resources are stored
Last updated