Skip to content

Commit

Permalink
add serde(default) for token_uri and token_data
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Dec 27, 2023
1 parent 2616beb commit b60972f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/prost/ibc.applications.nft_transfer.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
8 changes: 8 additions & 0 deletions tools/proto-compiler/src/cmd/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b60972f

Please sign in to comment.