You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 17, 2026. It is now read-only.
#[derive(Storage)]pubstructMyERC20{// #[zink::storage(String32)]// struct Name(String32);pubname:String32,// #[zink::storage(String32)]// struct Symbol(String32);pubsymbol:String32,// ...pubtotal_supply:U256,pubbalances:Mapping<Address,U256>,puballowances:DoubleKeyMapping<Address,Address,U256>,}#[zink::contract]implMyERC20{/// this method will be compiled as an external call because we have `pub` here/// /// `self` here will be the entrance of the storagepubfnset_and_get(&self,new_name:String32) -> String32{self.name.set(new_name);self.name.get()}}
As we can see in https://github.com/zink-lang/zink/blob/d340f7ef28280c34947ca780fc8cafeffc4b1f47/examples/erc20.rs#L12-L25 the storage interfaces are currently distributed into different structs, instead, we want an interface like below to improve the developer experience
related to #260