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
How can I pass a struct to a session.call method? For example, I want to pass this below struct:
#[derive(Clone,Copy,Debug,PartialEq,Eq)]#[cfg_attr(feature = "std", derive(Deserialize,Serialize))]#[ink::scale_derive(Encode,Decode,TypeInfo)]pubstructCollectionConfig{/// Collection's settings.pubsettings:CollectionSettings,/// Collection's max supply.pubmax_supply:Option<u32>,/// Default settings each item will get during the mint.pubmint_settings:MintSettings,}
Is using serde_json to convert this struct to JSON string is the right way to do?
The text was updated successfully, but these errors were encountered:
chungquantin
changed the title
bug: session.call with parameter is a struct.
Question: session.call with parameter is a struct.
Nov 21, 2024
How can I pass a struct to a
session.call
method? For example, I want to pass this below struct:Is using
serde_json
to convert this struct to JSON string is the right way to do?The text was updated successfully, but these errors were encountered: