Resources
struct ResourceName has key, store {
FIELD: TYPE
}module my_addrx::Basket
{
use std::string::String;
struct Basket has key,store //Basket is the resource containing list of fruits in the basket
{
list_of_fruits:vector<Fruit>
}
struct Fruit has store,drop,copy
{
name:String,
calories:u8
}
}Last updated