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
As discussed here, I had null values in the encoded NonFungibleTokenPacketData. We can opt-out them by #[serde(skip_serializing_if = "Option::is_none")].
@@ -14,9 +14,11 @@ pubstructNonFungibleTokenPacketData{pubclass_id:ClassId,/// Optional URL that points to metadata about the/// collection. Must be non-empty if provided.
+ #[serde(skip_serializing_if = "Option::is_none")]pubclass_uri:Option<String>,/// Optional base64 encoded field which contains on-chain metadata/// about the NFT class. Must be non-empty if provided.
+ #[serde(skip_serializing_if = "Option::is_none")]pubclass_data:Option<Binary>,/// Uniquely identifies the tokens in the NFT collection being/// transfered. This MUST be non-empty.
@@ -25,11 +27,13 @@ pub struct NonFungibleTokenPacketData{/// transfered. `tokenUris[N]` should hold the metadata for/// `tokenIds[N]` and both lists should have the same if/// provided. Must be non-empty if provided.
+ #[serde(skip_serializing_if = "Option::is_none")]pubtoken_uris:Option<Vec<String>>,/// Optional base64 encoded metadata for the tokens being/// transfered. `tokenData[N]` should hold metadata for/// `tokenIds[N]` and both lists should have the same length if/// provided. Must be non-empty if provided.
+ #[serde(skip_serializing_if = "Option::is_none")]pubtoken_data:Option<Vec<Binary>>,/// The address sending the tokens on the sending chain.
@@ -38,6 +42,7 @@ pub struct NonFungibleTokenPacketData{/// chain.pubreceiver:String,/// Memo to add custom string to the msg
+ #[serde(skip_serializing_if = "Option::is_none")]pubmemo:Option<String>,}
The text was updated successfully, but these errors were encountered:
As discussed here, I had null values in the encoded
NonFungibleTokenPacketData
. We can opt-out them by#[serde(skip_serializing_if = "Option::is_none")]
.The text was updated successfully, but these errors were encountered: