From e7e6302c27f10c1b59df9a3dfbc8b029c1166d76 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Tue, 17 Oct 2023 13:23:53 +0700 Subject: [PATCH] serialize Vec as_base64_encoded_string --- packages/osmosis-std/src/serde/mod.rs | 22 +++ .../src/types/cosmos/base/abci/v1beta1.rs | 8 +- .../src/types/cosmos/base/kv/v1beta1.rs | 8 +- .../src/types/cosmos/base/query/v1beta1.rs | 8 +- .../types/cosmos/base/snapshots/v1beta1.rs | 16 +- .../src/types/cosmos/base/store/v1beta1.rs | 12 +- .../src/types/cosmos/crypto/ed25519.rs | 8 +- .../types/cosmos/crypto/multisig/v1beta1.rs | 4 +- .../src/types/cosmos/crypto/secp256k1.rs | 8 +- .../src/types/cosmos/crypto/secp256r1.rs | 8 +- .../src/types/cosmos/evidence/v1beta1.rs | 8 +- .../src/types/cosmos/gov/v1beta1.rs | 20 +-- .../src/types/cosmos/mint/v1beta1.rs | 8 +- .../src/types/cosmos/slashing/v1beta1.rs | 12 +- .../src/types/cosmos/staking/v1beta1.rs | 4 +- .../src/types/cosmos/tx/signing/v1beta1.rs | 4 +- .../src/types/cosmos/tx/v1beta1.rs | 24 +-- .../src/types/cosmos/upgrade/v1beta1.rs | 4 +- .../osmosis-std/src/types/cosmwasm/wasm/v1.rs | 140 +++++++++--------- .../src/types/ibc/applications/fee/v1.rs | 4 +- .../applications/interchain_accounts/v1.rs | 4 +- .../src/types/ibc/core/channel/v1.rs | 84 +++++------ .../src/types/ibc/core/client/v1.rs | 24 +-- .../src/types/ibc/core/commitment/v1.rs | 8 +- .../src/types/ibc/core/connection/v1.rs | 44 +++--- .../types/ibc/lightclients/solomachine/v1.rs | 60 ++++---- .../types/ibc/lightclients/solomachine/v2.rs | 60 ++++---- .../types/ibc/lightclients/tendermint/v1.rs | 4 +- packages/osmosis-std/src/types/ics23.rs | 40 ++--- .../src/types/osmosis/cosmwasmpool/v1beta1.rs | 20 +-- .../src/types/osmosis/mint/v1beta1.rs | 4 +- .../src/types/osmosis/store/v1beta1.rs | 4 +- .../osmosis-std/src/types/tendermint/abci.rs | 84 +++++------ .../src/types/tendermint/crypto.rs | 16 +- .../osmosis-std/src/types/tendermint/p2p.rs | 4 +- .../osmosis-std/src/types/tendermint/types.rs | 80 +++++----- packages/proto-build/src/transform.rs | 2 + packages/proto-build/src/transformers.rs | 31 +++- 38 files changed, 478 insertions(+), 425 deletions(-) diff --git a/packages/osmosis-std/src/serde/mod.rs b/packages/osmosis-std/src/serde/mod.rs index 04fd2ea4..c3b8aefa 100644 --- a/packages/osmosis-std/src/serde/mod.rs +++ b/packages/osmosis-std/src/serde/mod.rs @@ -47,3 +47,25 @@ pub mod as_str_vec { vec_of_strings.serialize(serializer) } } + +pub mod as_base64_encoded_string { + use cosmwasm_std::Binary; + use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; + + pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> + where + D: Deserializer<'de>, + { + let encoded_string = String::deserialize(deserializer)?; + Binary::from_base64(&encoded_string) + .map(|b| b.to_vec()) + .map_err(de::Error::custom) + } + + pub fn serialize(values: &[u8], serializer: S) -> Result + where + S: Serializer, + { + Binary(values.to_vec()).to_base64().serialize(serializer) + } +} diff --git a/packages/osmosis-std/src/types/cosmos/base/abci/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/base/abci/v1beta1.rs index a1cc050f..00029b27 100644 --- a/packages/osmosis-std/src/types/cosmos/base/abci/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/base/abci/v1beta1.rs @@ -192,8 +192,8 @@ pub struct Result { /// length prefixed in order to separate data from multiple message executions. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, /// Log contains the log information from message or handler execution. @@ -243,8 +243,8 @@ pub struct MsgData { pub msg_type: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/base/kv/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/base/kv/v1beta1.rs index 06840548..bcb2b192 100644 --- a/packages/osmosis-std/src/types/cosmos/base/kv/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/base/kv/v1beta1.rs @@ -32,14 +32,14 @@ pub struct Pairs { pub struct Pair { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/base/query/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/base/query/v1beta1.rs index 0ed64fbd..69ea7091 100644 --- a/packages/osmosis-std/src/types/cosmos/base/query/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/base/query/v1beta1.rs @@ -24,8 +24,8 @@ pub struct PageRequest { /// should be set. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, /// offset is a numeric offset that can be used when key is unavailable. @@ -81,8 +81,8 @@ pub struct PageResponse { /// query the next page most efficiently #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub next_key: ::prost::alloc::vec::Vec, /// total is total number of results available if PageRequest.count_total diff --git a/packages/osmosis-std/src/types/cosmos/base/snapshots/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/base/snapshots/v1beta1.rs index 5f62e42e..0bc8869d 100644 --- a/packages/osmosis-std/src/types/cosmos/base/snapshots/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/base/snapshots/v1beta1.rs @@ -33,8 +33,8 @@ pub struct Snapshot { pub chunks: u32, #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub hash: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "5")] @@ -136,14 +136,14 @@ pub struct SnapshotStoreItem { pub struct SnapshotIavlItem { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, /// version is block height @@ -200,8 +200,8 @@ pub struct SnapshotExtensionMeta { pub struct SnapshotExtensionPayload { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub payload: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/base/store/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/base/store/v1beta1.rs index 4c181820..ddbda4e7 100644 --- a/packages/osmosis-std/src/types/cosmos/base/store/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/base/store/v1beta1.rs @@ -69,8 +69,8 @@ pub struct CommitId { pub version: i64, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub hash: ::prost::alloc::vec::Vec, } @@ -100,14 +100,14 @@ pub struct StoreKvPair { pub delete: bool, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/crypto/ed25519.rs b/packages/osmosis-std/src/types/cosmos/crypto/ed25519.rs index 023ea4b9..cc470b95 100644 --- a/packages/osmosis-std/src/types/cosmos/crypto/ed25519.rs +++ b/packages/osmosis-std/src/types/cosmos/crypto/ed25519.rs @@ -19,8 +19,8 @@ use osmosis_std_derive::CosmwasmExt; pub struct PubKey { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, } @@ -41,8 +41,8 @@ pub struct PubKey { pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/crypto/multisig/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/crypto/multisig/v1beta1.rs index 57dd84ee..4f3544b3 100644 --- a/packages/osmosis-std/src/types/cosmos/crypto/multisig/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/crypto/multisig/v1beta1.rs @@ -43,8 +43,8 @@ pub struct CompactBitArray { pub extra_bits_stored: u32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub elems: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/crypto/secp256k1.rs b/packages/osmosis-std/src/types/cosmos/crypto/secp256k1.rs index 5c51d605..72e6b178 100644 --- a/packages/osmosis-std/src/types/cosmos/crypto/secp256k1.rs +++ b/packages/osmosis-std/src/types/cosmos/crypto/secp256k1.rs @@ -19,8 +19,8 @@ use osmosis_std_derive::CosmwasmExt; pub struct PubKey { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, } @@ -40,8 +40,8 @@ pub struct PubKey { pub struct PrivKey { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/crypto/secp256r1.rs b/packages/osmosis-std/src/types/cosmos/crypto/secp256r1.rs index 17580c68..40f4a2d9 100644 --- a/packages/osmosis-std/src/types/cosmos/crypto/secp256r1.rs +++ b/packages/osmosis-std/src/types/cosmos/crypto/secp256r1.rs @@ -17,8 +17,8 @@ pub struct PubKey { /// 4.3.6 of ANSI X9.62: #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, } @@ -39,8 +39,8 @@ pub struct PrivKey { /// secret number serialized using big-endian encoding #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub secret: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/evidence/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/evidence/v1beta1.rs index ddeb80bb..683c2f9d 100644 --- a/packages/osmosis-std/src/types/cosmos/evidence/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/evidence/v1beta1.rs @@ -70,8 +70,8 @@ pub struct QueryEvidenceRequest { /// evidence_hash defines the hash of the requested evidence. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub evidence_hash: ::prost::alloc::vec::Vec, } @@ -175,8 +175,8 @@ pub struct MsgSubmitEvidenceResponse { /// hash defines the hash of the evidence. #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub hash: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/gov/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/gov/v1beta1.rs index ebd5da89..32039de1 100644 --- a/packages/osmosis-std/src/types/cosmos/gov/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/gov/v1beta1.rs @@ -246,37 +246,37 @@ pub struct TallyParams { /// considered valid. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub quorum: ::prost::alloc::vec::Vec, /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub threshold: ::prost::alloc::vec::Vec, /// Minimum value of Veto votes to Total votes ratio for proposal to be /// vetoed. Default value: 1/3. #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub veto_threshold: ::prost::alloc::vec::Vec, /// Minimum proportion of Yes votes for an expedited proposal to pass. Default value: 0.67. #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub expedited_threshold: ::prost::alloc::vec::Vec, /// Minimum proportion of Yes votes for an expedited proposal to reach quorum. Default value: 0.67. #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub expedited_quorum: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/mint/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/mint/v1beta1.rs index 71836faa..e38eb00a 100644 --- a/packages/osmosis-std/src/types/cosmos/mint/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/mint/v1beta1.rs @@ -150,8 +150,8 @@ pub struct QueryInflationResponse { /// inflation is the current minting inflation value. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub inflation: ::prost::alloc::vec::Vec, } @@ -192,8 +192,8 @@ pub struct QueryAnnualProvisionsResponse { /// annual_provisions is the current minting annual provisions value. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub annual_provisions: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/slashing/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/slashing/v1beta1.rs index 5eb59b18..d9d2968e 100644 --- a/packages/osmosis-std/src/types/cosmos/slashing/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/slashing/v1beta1.rs @@ -70,22 +70,22 @@ pub struct Params { pub signed_blocks_window: i64, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub min_signed_per_window: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] pub downtime_jail_duration: ::core::option::Option, #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub slash_fraction_double_sign: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub slash_fraction_downtime: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/staking/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/staking/v1beta1.rs index a2b68ac5..9d5e6883 100644 --- a/packages/osmosis-std/src/types/cosmos/staking/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/staking/v1beta1.rs @@ -702,8 +702,8 @@ pub struct GenesisState { /// the previous end block. #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub last_total_power: ::prost::alloc::vec::Vec, /// last_validator_powers is a special index that provides a historical list diff --git a/packages/osmosis-std/src/types/cosmos/tx/signing/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/tx/signing/v1beta1.rs index fc5f458a..d7030cf6 100644 --- a/packages/osmosis-std/src/types/cosmos/tx/signing/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/tx/signing/v1beta1.rs @@ -97,8 +97,8 @@ pub mod signature_descriptor { /// signature is the raw signature bytes #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/tx/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/tx/v1beta1.rs index 91296cc7..227b5c3c 100644 --- a/packages/osmosis-std/src/types/cosmos/tx/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/tx/v1beta1.rs @@ -48,16 +48,16 @@ pub struct TxRaw { /// representation in SignDoc. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub body_bytes: ::prost::alloc::vec::Vec, /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the /// representation in SignDoc. #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub auth_info_bytes: ::prost::alloc::vec::Vec, /// signatures is a list of signatures that matches the length and order of @@ -84,16 +84,16 @@ pub struct SignDoc { /// representation in TxRaw. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub body_bytes: ::prost::alloc::vec::Vec, /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the /// representation in TxRaw. #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub auth_info_bytes: ::prost::alloc::vec::Vec, /// chain_id is the unique identifier of the chain this transaction targets. @@ -418,8 +418,8 @@ pub struct BroadcastTxRequest { /// tx_bytes is the raw transaction. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub tx_bytes: ::prost::alloc::vec::Vec, #[prost(enumeration = "BroadcastMode", tag = "2")] @@ -473,8 +473,8 @@ pub struct SimulateRequest { /// Since: cosmos-sdk 0.43 #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub tx_bytes: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmos/upgrade/v1beta1.rs b/packages/osmosis-std/src/types/cosmos/upgrade/v1beta1.rs index 93f5664a..9152f541 100644 --- a/packages/osmosis-std/src/types/cosmos/upgrade/v1beta1.rs +++ b/packages/osmosis-std/src/types/cosmos/upgrade/v1beta1.rs @@ -248,8 +248,8 @@ pub struct QueryUpgradedConsensusStateResponse { /// Since: cosmos-sdk 0.43 #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub upgraded_consensus_state: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/cosmwasm/wasm/v1.rs b/packages/osmosis-std/src/types/cosmwasm/wasm/v1.rs index cbd69ec6..14097ca2 100644 --- a/packages/osmosis-std/src/types/cosmwasm/wasm/v1.rs +++ b/packages/osmosis-std/src/types/cosmwasm/wasm/v1.rs @@ -278,8 +278,8 @@ pub struct CodeInfo { /// CodeHash is the unique identifier created by wasmvm #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub code_hash: ::prost::alloc::vec::Vec, /// Creator address who initially stored the code @@ -364,8 +364,8 @@ pub struct ContractCodeHistoryEntry { pub updated: ::core::option::Option, #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, } @@ -417,15 +417,15 @@ pub struct Model { /// hex-encode key to read it better (this is often ascii) #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, /// base64-encode raw value #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, } @@ -564,8 +564,8 @@ pub struct Code { pub code_info: ::core::option::Option, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub code_bytes: ::prost::alloc::vec::Vec, /// Pinned to wasmvm cache @@ -611,8 +611,8 @@ pub struct Contract { pub struct Sequence { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub id_key: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] @@ -659,8 +659,8 @@ pub struct MsgIbcSend { /// content is in here. #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -729,8 +729,8 @@ pub struct StoreCodeProposal { /// WASMByteCode can be raw or gzip compressed #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub wasm_byte_code: ::prost::alloc::vec::Vec, /// InstantiatePermission to apply on contract creation, optional @@ -750,8 +750,8 @@ pub struct StoreCodeProposal { /// contract verification #[prost(bytes = "vec", tag = "11")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub code_hash: ::prost::alloc::vec::Vec, } @@ -796,8 +796,8 @@ pub struct InstantiateContractProposal { /// Msg json encoded message to be passed to the contract on instantiation #[prost(bytes = "vec", tag = "7")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, /// Funds coins that are transferred to the contract on instantiation @@ -845,8 +845,8 @@ pub struct InstantiateContract2Proposal { /// Msg json encode message to be passed to the contract on instantiation #[prost(bytes = "vec", tag = "7")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, /// Funds coins that are transferred to the contract on instantiation @@ -855,8 +855,8 @@ pub struct InstantiateContract2Proposal { /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. #[prost(bytes = "vec", tag = "9")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub salt: ::prost::alloc::vec::Vec, /// FixMsg include the msg value into the hash for the predictable address. @@ -900,8 +900,8 @@ pub struct MigrateContractProposal { /// Msg json encoded message to be passed to the contract on migration #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, } @@ -931,8 +931,8 @@ pub struct SudoContractProposal { /// Msg json encoded message to be passed to the contract as sudo #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, } @@ -966,8 +966,8 @@ pub struct ExecuteContractProposal { /// Msg json encoded message to be passed to the contract as execute #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, /// Funds coins that are transferred to the contract on instantiation @@ -1166,8 +1166,8 @@ pub struct StoreAndInstantiateContractProposal { /// WASMByteCode can be raw or gzip compressed #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub wasm_byte_code: ::prost::alloc::vec::Vec, /// InstantiatePermission to apply on contract creation, optional @@ -1185,8 +1185,8 @@ pub struct StoreAndInstantiateContractProposal { /// Msg json encoded message to be passed to the contract on instantiation #[prost(bytes = "vec", tag = "9")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, /// Funds coins that are transferred to the contract on instantiation @@ -1203,8 +1203,8 @@ pub struct StoreAndInstantiateContractProposal { /// contract verification #[prost(bytes = "vec", tag = "13")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub code_hash: ::prost::alloc::vec::Vec, } @@ -1429,8 +1429,8 @@ pub struct QueryRawContractStateRequest { pub address: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub query_data: ::prost::alloc::vec::Vec, } @@ -1452,8 +1452,8 @@ pub struct QueryRawContractStateResponse { /// Data contains the raw store data #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -1482,8 +1482,8 @@ pub struct QuerySmartContractStateRequest { /// QueryData contains the query data passed to the contract #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub query_data: ::prost::alloc::vec::Vec, } @@ -1505,8 +1505,8 @@ pub struct QuerySmartContractStateResponse { /// Data contains the json data returned from the smart contract #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -1560,8 +1560,8 @@ pub struct CodeInfoResponse { pub creator: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data_hash: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "6")] @@ -1585,8 +1585,8 @@ pub struct QueryCodeResponse { pub code_info: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -1791,8 +1791,8 @@ pub struct MsgStoreCode { /// WASMByteCode can be raw or gzip compressed #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub wasm_byte_code: ::prost::alloc::vec::Vec, /// InstantiatePermission access control to apply on contract creation, @@ -1825,8 +1825,8 @@ pub struct MsgStoreCodeResponse { /// Checksum is the sha256 hash of the stored code #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub checksum: ::prost::alloc::vec::Vec, } @@ -1865,8 +1865,8 @@ pub struct MsgInstantiateContract { /// Msg json encoded message to be passed to the contract on instantiation #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, /// Funds coins that are transferred to the contract on instantiation @@ -1908,8 +1908,8 @@ pub struct MsgInstantiateContract2 { /// Msg json encoded message to be passed to the contract on instantiation #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, /// Funds coins that are transferred to the contract on instantiation @@ -1918,8 +1918,8 @@ pub struct MsgInstantiateContract2 { /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. #[prost(bytes = "vec", tag = "7")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub salt: ::prost::alloc::vec::Vec, /// FixMsg include the msg value into the hash for the predictable address. @@ -1947,8 +1947,8 @@ pub struct MsgInstantiateContractResponse { /// Data contains bytes to returned from the contract #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -1972,8 +1972,8 @@ pub struct MsgInstantiateContract2Response { /// Data contains bytes to returned from the contract #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -2000,8 +2000,8 @@ pub struct MsgExecuteContract { /// Msg json encoded message to be passed to the contract #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, /// Funds coins that are transferred to the contract on execution @@ -2025,8 +2025,8 @@ pub struct MsgExecuteContractResponse { /// Data contains bytes to returned from the contract #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -2061,8 +2061,8 @@ pub struct MsgMigrateContract { /// Msg json encoded message to be passed to the contract on migration #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub msg: ::prost::alloc::vec::Vec, } @@ -2084,8 +2084,8 @@ pub struct MsgMigrateContractResponse { /// (May be empty) #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/ibc/applications/fee/v1.rs b/packages/osmosis-std/src/types/ibc/applications/fee/v1.rs index a39cf267..082092af 100644 --- a/packages/osmosis-std/src/types/ibc/applications/fee/v1.rs +++ b/packages/osmosis-std/src/types/ibc/applications/fee/v1.rs @@ -16,8 +16,8 @@ pub struct IncentivizedAcknowledgement { /// the underlying app acknowledgement bytes #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub app_acknowledgement: ::prost::alloc::vec::Vec, /// the relayer address which submits the recv packet message diff --git a/packages/osmosis-std/src/types/ibc/applications/interchain_accounts/v1.rs b/packages/osmosis-std/src/types/ibc/applications/interchain_accounts/v1.rs index d9e6eae2..b2c4a209 100644 --- a/packages/osmosis-std/src/types/ibc/applications/interchain_accounts/v1.rs +++ b/packages/osmosis-std/src/types/ibc/applications/interchain_accounts/v1.rs @@ -190,8 +190,8 @@ pub struct InterchainAccountPacketData { pub r#type: i32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] diff --git a/packages/osmosis-std/src/types/ibc/core/channel/v1.rs b/packages/osmosis-std/src/types/ibc/core/channel/v1.rs index c7dc72e1..2e059c55 100644 --- a/packages/osmosis-std/src/types/ibc/core/channel/v1.rs +++ b/packages/osmosis-std/src/types/ibc/core/channel/v1.rs @@ -149,8 +149,8 @@ pub struct Packet { /// actual opaque bytes transferred directly to the application module #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, /// block height after which the packet times out @@ -199,8 +199,8 @@ pub struct PacketState { /// embedded data that represents packet state. #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -474,8 +474,8 @@ pub struct QueryChannelResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -637,8 +637,8 @@ pub struct QueryChannelClientStateResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -712,8 +712,8 @@ pub struct QueryChannelConsensusStateResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -774,15 +774,15 @@ pub struct QueryPacketCommitmentResponse { /// packet associated with the request fields #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub commitment: ::prost::alloc::vec::Vec, /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -905,8 +905,8 @@ pub struct QueryPacketReceiptResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -967,15 +967,15 @@ pub struct QueryPacketAcknowledgementResponse { /// packet associated with the request fields #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub acknowledgement: ::prost::alloc::vec::Vec, /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -1223,8 +1223,8 @@ pub struct QueryNextSequenceReceiveResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -1305,8 +1305,8 @@ pub struct MsgChannelOpenTry { pub counterparty_version: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_init: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "6")] @@ -1359,8 +1359,8 @@ pub struct MsgChannelOpenAck { pub counterparty_version: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_try: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "6")] @@ -1405,8 +1405,8 @@ pub struct MsgChannelOpenConfirm { pub channel_id: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_ack: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] @@ -1490,8 +1490,8 @@ pub struct MsgChannelCloseConfirm { pub channel_id: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_init: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] @@ -1532,8 +1532,8 @@ pub struct MsgRecvPacket { pub packet: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_commitment: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] @@ -1580,8 +1580,8 @@ pub struct MsgTimeout { pub packet: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_unreceived: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] @@ -1634,14 +1634,14 @@ pub struct MsgTimeoutOnClose { pub packet: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_unreceived: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_close: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] @@ -1694,14 +1694,14 @@ pub struct MsgAcknowledgement { pub packet: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub acknowledgement: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_acked: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] diff --git a/packages/osmosis-std/src/types/ibc/core/client/v1.rs b/packages/osmosis-std/src/types/ibc/core/client/v1.rs index a151c015..a0f6eece 100644 --- a/packages/osmosis-std/src/types/ibc/core/client/v1.rs +++ b/packages/osmosis-std/src/types/ibc/core/client/v1.rs @@ -240,15 +240,15 @@ pub struct GenesisMetadata { /// store key of metadata without clientID-prefix #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, /// metadata value #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, } @@ -319,8 +319,8 @@ pub struct QueryClientStateResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -440,8 +440,8 @@ pub struct QueryConsensusStateResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -818,15 +818,15 @@ pub struct MsgUpgradeClient { /// proof that old chain committed to new client #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_upgrade_client: ::prost::alloc::vec::Vec, /// proof that old chain committed to new consensus state #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec, /// signer address diff --git a/packages/osmosis-std/src/types/ibc/core/commitment/v1.rs b/packages/osmosis-std/src/types/ibc/core/commitment/v1.rs index 693eec3e..44eaf2b8 100644 --- a/packages/osmosis-std/src/types/ibc/core/commitment/v1.rs +++ b/packages/osmosis-std/src/types/ibc/core/commitment/v1.rs @@ -16,8 +16,8 @@ use osmosis_std_derive::CosmwasmExt; pub struct MerkleRoot { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub hash: ::prost::alloc::vec::Vec, } @@ -39,8 +39,8 @@ pub struct MerkleRoot { pub struct MerklePrefix { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key_prefix: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/ibc/core/connection/v1.rs b/packages/osmosis-std/src/types/ibc/core/connection/v1.rs index 0ff3e5b6..62bd6f4e 100644 --- a/packages/osmosis-std/src/types/ibc/core/connection/v1.rs +++ b/packages/osmosis-std/src/types/ibc/core/connection/v1.rs @@ -317,8 +317,8 @@ pub struct QueryConnectionResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -421,8 +421,8 @@ pub struct QueryClientConnectionsResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was generated @@ -475,8 +475,8 @@ pub struct QueryConnectionClientStateResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -544,8 +544,8 @@ pub struct QueryConnectionConsensusStateResponse { /// merkle proof of existence #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof: ::prost::alloc::vec::Vec, /// height at which the proof was retrieved @@ -639,22 +639,22 @@ pub struct MsgConnectionOpenTry { /// INIT` #[prost(bytes = "vec", tag = "8")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_init: ::prost::alloc::vec::Vec, /// proof of client state included in message #[prost(bytes = "vec", tag = "9")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_client: ::prost::alloc::vec::Vec, /// proof of client consensus state #[prost(bytes = "vec", tag = "10")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_consensus: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "11")] @@ -707,22 +707,22 @@ pub struct MsgConnectionOpenAck { /// TRYOPEN` #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_try: ::prost::alloc::vec::Vec, /// proof of client state included in message #[prost(bytes = "vec", tag = "7")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_client: ::prost::alloc::vec::Vec, /// proof of client consensus state #[prost(bytes = "vec", tag = "8")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_consensus: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "9")] @@ -765,8 +765,8 @@ pub struct MsgConnectionOpenConfirm { /// proof for the change of the connection state on Chain A: `INIT -> OPEN` #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_ack: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] diff --git a/packages/osmosis-std/src/types/ibc/lightclients/solomachine/v1.rs b/packages/osmosis-std/src/types/ibc/lightclients/solomachine/v1.rs index 7c849fc4..3f16908e 100644 --- a/packages/osmosis-std/src/types/ibc/lightclients/solomachine/v1.rs +++ b/packages/osmosis-std/src/types/ibc/lightclients/solomachine/v1.rs @@ -95,8 +95,8 @@ pub struct Header { pub timestamp: u64, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] @@ -150,8 +150,8 @@ pub struct Misbehaviour { pub struct SignatureAndData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature: ::prost::alloc::vec::Vec, #[prost(enumeration = "DataType", tag = "2")] @@ -162,8 +162,8 @@ pub struct SignatureAndData { pub data_type: i32, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "4")] @@ -190,8 +190,8 @@ pub struct SignatureAndData { pub struct TimestampedSignatureData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature_data: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] @@ -239,8 +239,8 @@ pub struct SignBytes { /// marshaled data #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -281,8 +281,8 @@ pub struct HeaderData { pub struct ClientStateData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -305,8 +305,8 @@ pub struct ClientStateData { pub struct ConsensusStateData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -329,8 +329,8 @@ pub struct ConsensusStateData { pub struct ConnectionStateData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -354,8 +354,8 @@ pub struct ConnectionStateData { pub struct ChannelStateData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -378,14 +378,14 @@ pub struct ChannelStateData { pub struct PacketCommitmentData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub commitment: ::prost::alloc::vec::Vec, } @@ -406,14 +406,14 @@ pub struct PacketCommitmentData { pub struct PacketAcknowledgementData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub acknowledgement: ::prost::alloc::vec::Vec, } @@ -434,8 +434,8 @@ pub struct PacketAcknowledgementData { pub struct PacketReceiptAbsenceData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, } @@ -456,8 +456,8 @@ pub struct PacketReceiptAbsenceData { pub struct NextSequenceRecvData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] diff --git a/packages/osmosis-std/src/types/ibc/lightclients/solomachine/v2.rs b/packages/osmosis-std/src/types/ibc/lightclients/solomachine/v2.rs index cfc908c9..4d0d653e 100644 --- a/packages/osmosis-std/src/types/ibc/lightclients/solomachine/v2.rs +++ b/packages/osmosis-std/src/types/ibc/lightclients/solomachine/v2.rs @@ -91,8 +91,8 @@ pub struct Header { pub timestamp: u64, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] @@ -146,8 +146,8 @@ pub struct Misbehaviour { pub struct SignatureAndData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature: ::prost::alloc::vec::Vec, #[prost(enumeration = "DataType", tag = "2")] @@ -158,8 +158,8 @@ pub struct SignatureAndData { pub data_type: i32, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "4")] @@ -186,8 +186,8 @@ pub struct SignatureAndData { pub struct TimestampedSignatureData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature_data: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] @@ -235,8 +235,8 @@ pub struct SignBytes { /// marshaled data #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } @@ -277,8 +277,8 @@ pub struct HeaderData { pub struct ClientStateData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -301,8 +301,8 @@ pub struct ClientStateData { pub struct ConsensusStateData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -325,8 +325,8 @@ pub struct ConsensusStateData { pub struct ConnectionStateData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -350,8 +350,8 @@ pub struct ConnectionStateData { pub struct ChannelStateData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -374,14 +374,14 @@ pub struct ChannelStateData { pub struct PacketCommitmentData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub commitment: ::prost::alloc::vec::Vec, } @@ -402,14 +402,14 @@ pub struct PacketCommitmentData { pub struct PacketAcknowledgementData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub acknowledgement: ::prost::alloc::vec::Vec, } @@ -430,8 +430,8 @@ pub struct PacketAcknowledgementData { pub struct PacketReceiptAbsenceData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, } @@ -452,8 +452,8 @@ pub struct PacketReceiptAbsenceData { pub struct NextSequenceRecvData { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub path: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] diff --git a/packages/osmosis-std/src/types/ibc/lightclients/tendermint/v1.rs b/packages/osmosis-std/src/types/ibc/lightclients/tendermint/v1.rs index 1ad3a14e..82c49ffc 100644 --- a/packages/osmosis-std/src/types/ibc/lightclients/tendermint/v1.rs +++ b/packages/osmosis-std/src/types/ibc/lightclients/tendermint/v1.rs @@ -79,8 +79,8 @@ pub struct ConsensusState { pub root: ::core::option::Option, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub next_validators_hash: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/ics23.rs b/packages/osmosis-std/src/types/ics23.rs index 27f149c1..9b1e7e77 100644 --- a/packages/osmosis-std/src/types/ics23.rs +++ b/packages/osmosis-std/src/types/ics23.rs @@ -34,14 +34,14 @@ use osmosis_std_derive::CosmwasmExt; pub struct ExistenceProof { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] @@ -69,8 +69,8 @@ pub struct NonExistenceProof { /// TODO: remove this as unnecessary??? we prove a range #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -176,8 +176,8 @@ pub struct LeafOp { /// a leaf node from an inner node. #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub prefix: ::prost::alloc::vec::Vec, } @@ -218,14 +218,14 @@ pub struct InnerOp { pub hash: i32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub prefix: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub suffix: ::prost::alloc::vec::Vec, } @@ -326,8 +326,8 @@ pub struct InnerSpec { /// empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub empty_child: ::prost::alloc::vec::Vec, /// hash is the algorithm that must be used for each InnerOp @@ -463,14 +463,14 @@ pub mod compressed_batch_entry { pub struct CompressedExistenceProof { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] @@ -499,8 +499,8 @@ pub struct CompressedNonExistenceProof { /// TODO: remove this as unnecessary??? we prove a range #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] diff --git a/packages/osmosis-std/src/types/osmosis/cosmwasmpool/v1beta1.rs b/packages/osmosis-std/src/types/osmosis/cosmwasmpool/v1beta1.rs index 15266643..c9942ccd 100644 --- a/packages/osmosis-std/src/types/osmosis/cosmwasmpool/v1beta1.rs +++ b/packages/osmosis-std/src/types/osmosis/cosmwasmpool/v1beta1.rs @@ -77,8 +77,8 @@ pub struct UploadCosmWasmPoolCodeAndWhiteListProposal { /// WASMByteCode can be raw or gzip compressed #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub wasm_byte_code: ::prost::alloc::vec::Vec, } @@ -150,15 +150,15 @@ pub struct MigratePoolContractsProposal { /// Only one of new_code_id and wasm_byte_code should be set. #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub wasm_byte_code: ::prost::alloc::vec::Vec, /// MigrateMsg migrate message to be used for migrating the pool contracts. #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub migrate_msg: ::prost::alloc::vec::Vec, } @@ -460,8 +460,8 @@ pub struct CosmWasmPool { pub code_id: u64, #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub instantiate_msg: ::prost::alloc::vec::Vec, } @@ -743,8 +743,8 @@ pub struct MsgCreateCosmWasmPool { pub code_id: u64, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub instantiate_msg: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] diff --git a/packages/osmosis-std/src/types/osmosis/mint/v1beta1.rs b/packages/osmosis-std/src/types/osmosis/mint/v1beta1.rs index 0c72bf25..bb786fee 100644 --- a/packages/osmosis-std/src/types/osmosis/mint/v1beta1.rs +++ b/packages/osmosis-std/src/types/osmosis/mint/v1beta1.rs @@ -229,8 +229,8 @@ pub struct QueryEpochProvisionsResponse { /// epoch_provisions is the current minting per epoch provisions value. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub epoch_provisions: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/osmosis/store/v1beta1.rs b/packages/osmosis-std/src/types/osmosis/store/v1beta1.rs index 5fb1c338..01471c83 100644 --- a/packages/osmosis-std/src/types/osmosis/store/v1beta1.rs +++ b/packages/osmosis-std/src/types/osmosis/store/v1beta1.rs @@ -30,8 +30,8 @@ pub struct Node { pub struct Child { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub index: ::prost::alloc::vec::Vec, #[prost(string, tag = "2")] diff --git a/packages/osmosis-std/src/types/tendermint/abci.rs b/packages/osmosis-std/src/types/tendermint/abci.rs index fff3fbd8..8e5e6675 100644 --- a/packages/osmosis-std/src/types/tendermint/abci.rs +++ b/packages/osmosis-std/src/types/tendermint/abci.rs @@ -164,8 +164,8 @@ pub struct RequestInitChain { pub validators: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub app_state_bytes: ::prost::alloc::vec::Vec, #[prost(int64, tag = "6")] @@ -190,8 +190,8 @@ pub struct RequestInitChain { pub struct RequestQuery { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, #[prost(string, tag = "2")] @@ -220,8 +220,8 @@ pub struct RequestQuery { pub struct RequestBeginBlock { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub hash: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -246,8 +246,8 @@ pub struct RequestBeginBlock { pub struct RequestCheckTx { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub tx: ::prost::alloc::vec::Vec, #[prost(enumeration = "CheckTxType", tag = "2")] @@ -272,8 +272,8 @@ pub struct RequestCheckTx { pub struct RequestDeliverTx { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub tx: ::prost::alloc::vec::Vec, } @@ -344,8 +344,8 @@ pub struct RequestOfferSnapshot { /// light client-verified app hash for snapshot height #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub app_hash: ::prost::alloc::vec::Vec, } @@ -404,8 +404,8 @@ pub struct RequestApplySnapshotChunk { pub index: u32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub chunk: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] @@ -555,8 +555,8 @@ pub struct ResponseInfo { pub last_block_height: i64, #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub last_block_app_hash: ::prost::alloc::vec::Vec, } @@ -605,8 +605,8 @@ pub struct ResponseInitChain { pub validators: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub app_hash: ::prost::alloc::vec::Vec, } @@ -645,14 +645,14 @@ pub struct ResponseQuery { pub index: i64, #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "7")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "8")] @@ -703,8 +703,8 @@ pub struct ResponseCheckTx { pub code: u32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, /// nondeterministic @@ -751,8 +751,8 @@ pub struct ResponseDeliverTx { pub code: u32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, /// nondeterministic @@ -814,8 +814,8 @@ pub struct ResponseCommit { /// reserve 1 #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, #[prost(int64, tag = "3")] @@ -925,8 +925,8 @@ pub mod response_offer_snapshot { pub struct ResponseLoadSnapshotChunk { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub chunk: ::prost::alloc::vec::Vec, } @@ -1121,14 +1121,14 @@ pub struct Event { pub struct EventAttribute { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub value: ::prost::alloc::vec::Vec, /// nondeterministic @@ -1165,8 +1165,8 @@ pub struct TxResult { pub index: u32, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub tx: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] @@ -1189,8 +1189,8 @@ pub struct Validator { /// The first 20 bytes of SHA256(public key) #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub address: ::prost::alloc::vec::Vec, /// PubKey pub_key = 2 \[(gogoproto.nullable)=false\]; @@ -1324,15 +1324,15 @@ pub struct Snapshot { /// Arbitrary snapshot hash, equal only if identical #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub hash: ::prost::alloc::vec::Vec, /// Arbitrary application metadata #[prost(bytes = "vec", tag = "5")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub metadata: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/tendermint/crypto.rs b/packages/osmosis-std/src/types/tendermint/crypto.rs index 961ec024..3abd3324 100644 --- a/packages/osmosis-std/src/types/tendermint/crypto.rs +++ b/packages/osmosis-std/src/types/tendermint/crypto.rs @@ -26,8 +26,8 @@ pub struct Proof { pub index: i64, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub leaf_hash: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", repeated, tag = "4")] @@ -49,8 +49,8 @@ pub struct ValueOp { /// Encoded in ProofOp.Key. #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, /// To encode in ProofOp.Data @@ -97,14 +97,14 @@ pub struct ProofOp { pub r#type: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub key: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "3")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, } diff --git a/packages/osmosis-std/src/types/tendermint/p2p.rs b/packages/osmosis-std/src/types/tendermint/p2p.rs index d39d71ab..579d4fac 100644 --- a/packages/osmosis-std/src/types/tendermint/p2p.rs +++ b/packages/osmosis-std/src/types/tendermint/p2p.rs @@ -82,8 +82,8 @@ pub struct DefaultNodeInfo { pub version: ::prost::alloc::string::String, #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub channels: ::prost::alloc::vec::Vec, #[prost(string, tag = "7")] diff --git a/packages/osmosis-std/src/types/tendermint/types.rs b/packages/osmosis-std/src/types/tendermint/types.rs index f42fb410..62c45d17 100644 --- a/packages/osmosis-std/src/types/tendermint/types.rs +++ b/packages/osmosis-std/src/types/tendermint/types.rs @@ -38,8 +38,8 @@ pub struct ValidatorSet { pub struct Validator { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub address: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -101,8 +101,8 @@ pub struct PartSetHeader { pub total: u32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub hash: ::prost::alloc::vec::Vec, } @@ -127,8 +127,8 @@ pub struct Part { pub index: u32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub bytes: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] @@ -150,8 +150,8 @@ pub struct Part { pub struct BlockId { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub hash: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] @@ -194,15 +194,15 @@ pub struct Header { /// commit from validators from the last block #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub last_commit_hash: ::prost::alloc::vec::Vec, /// transactions #[prost(bytes = "vec", tag = "7")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data_hash: ::prost::alloc::vec::Vec, /// hashes from the app output from the prev block @@ -210,36 +210,36 @@ pub struct Header { /// validators for the current block #[prost(bytes = "vec", tag = "8")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub validators_hash: ::prost::alloc::vec::Vec, /// validators for the next block #[prost(bytes = "vec", tag = "9")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub next_validators_hash: ::prost::alloc::vec::Vec, /// consensus params for current block #[prost(bytes = "vec", tag = "10")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub consensus_hash: ::prost::alloc::vec::Vec, /// state after txs from the previous block #[prost(bytes = "vec", tag = "11")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub app_hash: ::prost::alloc::vec::Vec, /// root hash of all results from the txs from the previous block #[prost(bytes = "vec", tag = "12")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub last_results_hash: ::prost::alloc::vec::Vec, /// consensus info @@ -247,15 +247,15 @@ pub struct Header { /// evidence included in the block #[prost(bytes = "vec", tag = "13")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub evidence_hash: ::prost::alloc::vec::Vec, /// original proposer of the block #[prost(bytes = "vec", tag = "14")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proposer_address: ::prost::alloc::vec::Vec, } @@ -320,8 +320,8 @@ pub struct Vote { pub timestamp: ::core::option::Option, #[prost(bytes = "vec", tag = "6")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub validator_address: ::prost::alloc::vec::Vec, #[prost(int32, tag = "7")] @@ -332,8 +332,8 @@ pub struct Vote { pub validator_index: i32, #[prost(bytes = "vec", tag = "8")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature: ::prost::alloc::vec::Vec, } @@ -392,16 +392,16 @@ pub struct CommitSig { pub block_id_flag: i32, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub validator_address: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] pub timestamp: ::core::option::Option, #[prost(bytes = "vec", tag = "4")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature: ::prost::alloc::vec::Vec, } @@ -449,8 +449,8 @@ pub struct Proposal { pub timestamp: ::core::option::Option, #[prost(bytes = "vec", tag = "7")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub signature: ::prost::alloc::vec::Vec, } @@ -537,14 +537,14 @@ pub struct BlockMeta { pub struct TxProof { #[prost(bytes = "vec", tag = "1")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub root_hash: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "2")] #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub data: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] diff --git a/packages/proto-build/src/transform.rs b/packages/proto-build/src/transform.rs index 9159eb86..747a9fc9 100644 --- a/packages/proto-build/src/transform.rs +++ b/packages/proto-build/src/transform.rs @@ -138,7 +138,9 @@ fn transform_items( let s = transformers::add_derive_eq_struct(&s); let s = transformers::append_attrs_struct(src, &s, descriptor); let s = transformers::serde_alias_id_with_uppercased(s); + let s = transformers::allow_serde_vec_u8_as_base64_encoded_string(s); let s = transformers::allow_serde_int_as_str(s); + transformers::allow_serde_vec_int_as_vec_str(s) }), diff --git a/packages/proto-build/src/transformers.rs b/packages/proto-build/src/transformers.rs index 8d2248a6..deaf253e 100644 --- a/packages/proto-build/src/transformers.rs +++ b/packages/proto-build/src/transformers.rs @@ -202,7 +202,7 @@ pub fn allow_serde_vec_int_as_vec_str(s: ItemStruct) -> ItemStruct { parse_quote!(::prost::alloc::vec::Vec), parse_quote!(::prost::alloc::vec::Vec), parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), + // parse_quote!(::prost::alloc::vec::Vec), -- this is not included because it is used for bytes and has it's own rule parse_quote!(::prost::alloc::vec::Vec), parse_quote!(::prost::alloc::vec::Vec), parse_quote!(::prost::alloc::vec::Vec), @@ -233,6 +233,35 @@ pub fn allow_serde_vec_int_as_vec_str(s: ItemStruct) -> ItemStruct { syn::ItemStruct { fields, ..s } } +pub fn allow_serde_vec_u8_as_base64_encoded_string(s: ItemStruct) -> ItemStruct { + let fields_vec = s + .fields + .clone() + .into_iter() + .map(|mut field| { + if field.ty == parse_quote!(::prost::alloc::vec::Vec) { + let from_str: syn::Attribute = parse_quote! { + #[serde( + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" + )] + }; + field.attrs.append(&mut vec![from_str]); + field + } else { + field + } + }) + .collect::>(); + + let fields_named: syn::FieldsNamed = parse_quote! { + { #(#fields_vec,)* } + }; + let fields = syn::Fields::Named(fields_named); + + syn::ItemStruct { fields, ..s } +} + /// some of proto's fields in osmosis' modules are named `ID` but prost generates `id` field /// this function adds `#[serde(alias = "ID")]` to the `id` field /// so that serde can deserialize `ID` field to `id` field.