Skip to content

Commit

Permalink
Merge pull request #297 from pryzm-finance/fix-amino
Browse files Browse the repository at this point in the history
fix: annotate the proper amino names on the proto messages
  • Loading branch information
javiersuweijie authored Jan 4, 2024
2 parents 8439e9f + 3635d40 commit f44072d
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 64 deletions.
5 changes: 5 additions & 0 deletions proto/alliance/alliance/tx.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
syntax = "proto3";
package alliance.alliance;

import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";
Expand All @@ -24,6 +25,7 @@ service Msg {

message MsgDelegate {
option (cosmos.msg.v1.signer) = "delegator_address";
option (amino.name) = "alliance/MsgDelegate";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
Expand All @@ -39,6 +41,7 @@ message MsgDelegateResponse {}

message MsgUndelegate {
option (cosmos.msg.v1.signer) = "delegator_address";
option (amino.name) = "alliance/MsgUndelegate";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
Expand All @@ -55,6 +58,7 @@ message MsgUndelegateResponse {}

message MsgRedelegate {
option (cosmos.msg.v1.signer) = "delegator_address";
option (amino.name) = "alliance/MsgRedelegate";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
Expand All @@ -72,6 +76,7 @@ message MsgRedelegateResponse {}

message MsgClaimDelegationRewards {
option (cosmos.msg.v1.signer) = "delegator_address";
option (amino.name) = "alliance/MsgClaimDelegationRewards";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
Expand Down
9 changes: 5 additions & 4 deletions x/alliance/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package types

import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/legacy"
"github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand All @@ -11,10 +12,10 @@ import (
)

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgDelegate{}, "alliance/MsgDelegate", nil)
cdc.RegisterConcrete(&MsgRedelegate{}, "alliance/MsgRedelegate", nil)
cdc.RegisterConcrete(&MsgUndelegate{}, "alliance/MsgUndelegate", nil)
cdc.RegisterConcrete(&MsgClaimDelegationRewards{}, "alliance/MsgClaimDelegationRewards", nil)
legacy.RegisterAminoMsg(cdc, &MsgDelegate{}, "alliance/MsgDelegate")
legacy.RegisterAminoMsg(cdc, &MsgRedelegate{}, "alliance/MsgRedelegate")
legacy.RegisterAminoMsg(cdc, &MsgUndelegate{}, "alliance/MsgUndelegate")
legacy.RegisterAminoMsg(cdc, &MsgClaimDelegationRewards{}, "alliance/MsgClaimDelegationRewards")

cdc.RegisterConcrete(&MsgCreateAllianceProposal{}, "alliance/MsgCreateAllianceProposal", nil)
cdc.RegisterConcrete(&MsgUpdateAllianceProposal{}, "alliance/MsgUpdateAllianceProposal", nil)
Expand Down
124 changes: 64 additions & 60 deletions x/alliance/types/tx.pb.go

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

0 comments on commit f44072d

Please sign in to comment.