From b60972f15585c417c2745344c2844444824524fa Mon Sep 17 00:00:00 2001 From: yito88 Date: Wed, 27 Dec 2023 22:27:29 +0100 Subject: [PATCH] add serde(default) for token_uri and token_data --- src/prost/ibc.applications.nft_transfer.v1.rs | 2 ++ tools/proto-compiler/src/cmd/compile.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/prost/ibc.applications.nft_transfer.v1.rs b/src/prost/ibc.applications.nft_transfer.v1.rs index 50673870..791e6ef5 100644 --- a/src/prost/ibc.applications.nft_transfer.v1.rs +++ b/src/prost/ibc.applications.nft_transfer.v1.rs @@ -550,9 +550,11 @@ pub struct NonFungibleTokenPacketData { pub token_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// the non fungible tokens's uri to be transferred #[prost(string, repeated, tag = "5")] + #[cfg_attr(feature = "serde", serde(default))] pub token_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// the non fungible tokens's data to be transferred #[prost(string, repeated, tag = "6")] + #[cfg_attr(feature = "serde", serde(default))] pub token_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// the sender address #[prost(string, tag = "7")] diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index 90ee68df..d792d086 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -218,6 +218,14 @@ impl CompileCmd { ".ibc.applications.nft_transfer.v1.NonFungibleTokenPacketData.class_data", attrs_serde_default, ) + .field_attribute( + ".ibc.applications.nft_transfer.v1.NonFungibleTokenPacketData.token_uris", + attrs_serde_default, + ) + .field_attribute( + ".ibc.applications.nft_transfer.v1.NonFungibleTokenPacketData.token_data", + attrs_serde_default, + ) .field_attribute( ".ibc.applications.nft_transfer.v1.NonFungibleTokenPacketData.memo", attrs_serde_default,