Skip to content

Commit

Permalink
Add "legacy_coins" amino encoding annotation to proto files (CosmWasm…
Browse files Browse the repository at this point in the history
  • Loading branch information
pinosu authored Apr 17, 2024
1 parent 1f0660c commit 5ec0c5e
Show file tree
Hide file tree
Showing 6 changed files with 261 additions and 249 deletions.
6 changes: 4 additions & 2 deletions proto/cosmwasm/wasm/v1/authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ message MaxFundsLimit {
repeated cosmos.base.v1beta1.Coin amounts = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand All @@ -118,7 +119,8 @@ message CombinedLimit {
repeated cosmos.base.v1beta1.Coin amounts = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand Down
12 changes: 8 additions & 4 deletions proto/cosmwasm/wasm/v1/proposal_legacy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ message InstantiateContractProposal {
repeated cosmos.base.v1beta1.Coin funds = 8 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand Down Expand Up @@ -109,7 +110,8 @@ message InstantiateContract2Proposal {
repeated cosmos.base.v1beta1.Coin funds = 8 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
// Salt is an arbitrary value provided by the sender. Size can be 1 to 64.
bytes salt = 9;
Expand Down Expand Up @@ -192,7 +194,8 @@ message ExecuteContractProposal {
repeated cosmos.base.v1beta1.Coin funds = 6 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand Down Expand Up @@ -338,7 +341,8 @@ message StoreAndInstantiateContractProposal {
repeated cosmos.base.v1beta1.Coin funds = 10 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
// Source is the URL where the code is hosted
string source = 11;
Expand Down
12 changes: 8 additions & 4 deletions proto/cosmwasm/wasm/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ message MsgInstantiateContract {
repeated cosmos.base.v1beta1.Coin funds = 6 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand Down Expand Up @@ -166,7 +167,8 @@ message MsgInstantiateContract2 {
repeated cosmos.base.v1beta1.Coin funds = 6 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
// Salt is an arbitrary value provided by the sender. Size can be 1 to 64.
bytes salt = 7;
Expand Down Expand Up @@ -201,7 +203,8 @@ message MsgExecuteContract {
repeated cosmos.base.v1beta1.Coin funds = 5 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
}

Expand Down Expand Up @@ -408,7 +411,8 @@ message MsgStoreAndInstantiateContract {
repeated cosmos.base.v1beta1.Coin funds = 9 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(amino.encoding) = "legacy_coins"
];
// Source is the URL where the code is hosted
string source = 10;
Expand Down
105 changes: 53 additions & 52 deletions x/wasm/types/authz.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5ec0c5e

Please sign in to comment.