From 1ba22a79e36e7ed77e2e4503e72bfbbe5c609aa8 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:09:07 -0400 Subject: [PATCH] revert: remove x/inflation burn method --- app/keepers.go | 2 +- proto/nibiru/inflation/v1/tx.proto | 11 +- x/inflation/keeper/keeper.go | 10 - x/inflation/keeper/keeper_test.go | 71 ----- x/inflation/types/msgs.go | 41 --- x/inflation/types/tx.pb.go | 427 +++-------------------------- x/sudo/types/state.pb.go | 2 +- 7 files changed, 43 insertions(+), 521 deletions(-) delete mode 100644 x/inflation/keeper/keeper_test.go diff --git a/app/keepers.go b/app/keepers.go index c2d60e3d5..3d5734e82 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -763,7 +763,7 @@ func ModuleAccPerms() map[string][]string { return map[string][]string{ authtypes.FeeCollectorName: nil, distrtypes.ModuleName: nil, - inflationtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + inflationtypes.ModuleName: {authtypes.Minter}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, govtypes.ModuleName: {authtypes.Burner}, diff --git a/proto/nibiru/inflation/v1/tx.proto b/proto/nibiru/inflation/v1/tx.proto index 36626a3f9..ce516b422 100644 --- a/proto/nibiru/inflation/v1/tx.proto +++ b/proto/nibiru/inflation/v1/tx.proto @@ -59,13 +59,4 @@ message MsgEditInflationParams { message MsgToggleInflationResponse {} -message MsgEditInflationParamsResponse {} - -// MsgBurn: allows burning of any token -message MsgBurn { - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - cosmos.base.v1beta1.Coin coin = 2 - [ (gogoproto.moretags) = "yaml:\"coin\"", (gogoproto.nullable) = false ]; -} - -message MsgBurnResponse {} \ No newline at end of file +message MsgEditInflationParamsResponse {} \ No newline at end of file diff --git a/x/inflation/keeper/keeper.go b/x/inflation/keeper/keeper.go index 43742b843..03327ac46 100644 --- a/x/inflation/keeper/keeper.go +++ b/x/inflation/keeper/keeper.go @@ -89,13 +89,3 @@ func NewKeeper( func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) } - -func (k Keeper) Burn(ctx sdk.Context, coins sdk.Coins, sender sdk.AccAddress) error { - if err := k.bankKeeper.SendCoinsFromAccountToModule( - ctx, sender, types.ModuleName, coins, - ); err != nil { - return err - } - - return k.bankKeeper.BurnCoins(ctx, types.ModuleName, coins) -} diff --git a/x/inflation/keeper/keeper_test.go b/x/inflation/keeper/keeper_test.go deleted file mode 100644 index 391efe14f..000000000 --- a/x/inflation/keeper/keeper_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package keeper_test - -import ( - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/require" - - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/inflation/types" -) - -func init() { - testapp.EnsureNibiruPrefix() -} - -func TestBurn(t *testing.T) { - testCases := []struct { - name string - sender sdk.AccAddress - mintCoin sdk.Coin - burnCoin sdk.Coin - expectedErr error - }{ - { - name: "pass", - sender: testutil.AccAddress(), - mintCoin: sdk.NewCoin("unibi", sdk.NewInt(100)), - burnCoin: sdk.NewCoin("unibi", sdk.NewInt(100)), - expectedErr: nil, - }, - { - name: "not enough coins", - sender: testutil.AccAddress(), - mintCoin: sdk.NewCoin("unibi", sdk.NewInt(100)), - burnCoin: sdk.NewCoin("unibi", sdk.NewInt(101)), - expectedErr: fmt.Errorf("spendable balance 100unibi is smaller than 101unibi: insufficient funds"), - }, - } - - for _, tc := range testCases { - t.Run(fmt.Sprintf("Case %s", tc.name), func(t *testing.T) { - nibiruApp, ctx := testapp.NewNibiruTestAppAndContext() - - // mint and send money to the sender - require.NoError(t, - nibiruApp.BankKeeper.MintCoins( - ctx, types.ModuleName, sdk.NewCoins(tc.mintCoin))) - require.NoError(t, - nibiruApp.BankKeeper.SendCoinsFromModuleToAccount( - ctx, types.ModuleName, tc.sender, sdk.NewCoins(tc.mintCoin)), - ) - - supply := nibiruApp.BankKeeper.GetSupply(ctx, "unibi") - require.Equal(t, tc.mintCoin.Amount, supply.Amount) - - // Burn coins - err := nibiruApp.InflationKeeper.Burn(ctx, sdk.NewCoins(tc.burnCoin), tc.sender) - supply = nibiruApp.BankKeeper.GetSupply(ctx, "unibi") - if tc.expectedErr != nil { - require.EqualError(t, err, tc.expectedErr.Error()) - require.Equal(t, tc.mintCoin.Amount, supply.Amount) - } else { - require.NoError(t, err) - require.Equal(t, sdk.ZeroInt(), supply.Amount) - } - }) - } -} diff --git a/x/inflation/types/msgs.go b/x/inflation/types/msgs.go index 1cb387041..bae08b89d 100644 --- a/x/inflation/types/msgs.go +++ b/x/inflation/types/msgs.go @@ -11,14 +11,12 @@ import ( var ( _ legacytx.LegacyMsg = &MsgEditInflationParams{} _ legacytx.LegacyMsg = &MsgToggleInflation{} - _ legacytx.LegacyMsg = &MsgBurn{} ) // oracle message types const ( TypeMsgEditInflationParams = "edit_inflation_params" TypeMsgToggleInflation = "toggle_inflation" - TypeMsgBurn = "msg_burn" ) // Route implements legacytx.LegacyMsg @@ -105,42 +103,3 @@ func (m MsgToggleInflation) ValidateBasic() error { } return nil } - -// ------------------------------------------------- -// MsgBurn -// Route implements legacytx.LegacyMsg -func (msg MsgBurn) Route() string { return RouterKey } - -// Type implements legacytx.LegacyMsg -func (msg MsgBurn) Type() string { return TypeMsgBurn } - -// GetSignBytes implements legacytx.LegacyMsg -func (msg MsgBurn) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - -// GetSigners implements legacytx.LegacyMsg -func (msg MsgBurn) GetSigners() []sdk.AccAddress { - feeder, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { - panic(err) - } - - return []sdk.AccAddress{feeder} -} - -func (m MsgBurn) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(m.Sender); err != nil { - return err - } - - if err := m.Coin.Validate(); err != nil { - return err - } - - if m.Coin.Amount.IsZero() { - return fmt.Errorf("coin amount should not be zero") - } - - return nil -} diff --git a/x/inflation/types/tx.pb.go b/x/inflation/types/tx.pb.go index ab332dea7..59513eabe 100644 --- a/x/inflation/types/tx.pb.go +++ b/x/inflation/types/tx.pb.go @@ -6,8 +6,8 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -185,150 +185,55 @@ func (m *MsgEditInflationParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgEditInflationParamsResponse proto.InternalMessageInfo -// MsgBurn: allows burning of any token -type MsgBurn struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` - Coin types.Coin `protobuf:"bytes,2,opt,name=coin,proto3" json:"coin" yaml:"coin"` -} - -func (m *MsgBurn) Reset() { *m = MsgBurn{} } -func (m *MsgBurn) String() string { return proto.CompactTextString(m) } -func (*MsgBurn) ProtoMessage() {} -func (*MsgBurn) Descriptor() ([]byte, []int) { - return fileDescriptor_9f6843f876608d76, []int{4} -} -func (m *MsgBurn) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBurn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBurn.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgBurn) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBurn.Merge(m, src) -} -func (m *MsgBurn) XXX_Size() int { - return m.Size() -} -func (m *MsgBurn) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBurn.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBurn proto.InternalMessageInfo - -func (m *MsgBurn) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *MsgBurn) GetCoin() types.Coin { - if m != nil { - return m.Coin - } - return types.Coin{} -} - -type MsgBurnResponse struct { -} - -func (m *MsgBurnResponse) Reset() { *m = MsgBurnResponse{} } -func (m *MsgBurnResponse) String() string { return proto.CompactTextString(m) } -func (*MsgBurnResponse) ProtoMessage() {} -func (*MsgBurnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9f6843f876608d76, []int{5} -} -func (m *MsgBurnResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgBurnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgBurnResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgBurnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgBurnResponse.Merge(m, src) -} -func (m *MsgBurnResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgBurnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgBurnResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgBurnResponse proto.InternalMessageInfo - func init() { proto.RegisterType((*MsgToggleInflation)(nil), "nibiru.inflation.v1.MsgToggleInflation") proto.RegisterType((*MsgEditInflationParams)(nil), "nibiru.inflation.v1.MsgEditInflationParams") proto.RegisterType((*MsgToggleInflationResponse)(nil), "nibiru.inflation.v1.MsgToggleInflationResponse") proto.RegisterType((*MsgEditInflationParamsResponse)(nil), "nibiru.inflation.v1.MsgEditInflationParamsResponse") - proto.RegisterType((*MsgBurn)(nil), "nibiru.inflation.v1.MsgBurn") - proto.RegisterType((*MsgBurnResponse)(nil), "nibiru.inflation.v1.MsgBurnResponse") } func init() { proto.RegisterFile("nibiru/inflation/v1/tx.proto", fileDescriptor_9f6843f876608d76) } var fileDescriptor_9f6843f876608d76 = []byte{ - // 660 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x31, 0x4f, 0xdb, 0x40, - 0x14, 0x8e, 0x21, 0x0d, 0x70, 0xa8, 0x85, 0x98, 0x16, 0xa5, 0x29, 0xb5, 0x23, 0x23, 0x95, 0x50, - 0x84, 0x4f, 0x81, 0x8d, 0xd1, 0x40, 0x25, 0x86, 0x54, 0x91, 0xd5, 0xa1, 0x45, 0xaa, 0xd0, 0x39, - 0x3e, 0xcc, 0xa9, 0xf6, 0x9d, 0x75, 0x77, 0x41, 0xc9, 0xda, 0xa9, 0x23, 0x52, 0xff, 0x00, 0x63, - 0x7f, 0x40, 0xff, 0x41, 0x17, 0x46, 0xa4, 0x2e, 0x55, 0x87, 0xa8, 0x82, 0x0e, 0x9d, 0xf9, 0x05, - 0x95, 0x7d, 0x8e, 0x89, 0x8a, 0x91, 0x0a, 0x83, 0x65, 0xdf, 0xbd, 0xef, 0x7d, 0xef, 0x7b, 0xe7, - 0xef, 0x1d, 0x58, 0xa2, 0xc4, 0x23, 0xbc, 0x07, 0x09, 0x3d, 0x0c, 0x91, 0x24, 0x8c, 0xc2, 0xe3, - 0x16, 0x94, 0x7d, 0x3b, 0xe6, 0x4c, 0x32, 0x7d, 0x41, 0x45, 0xed, 0x3c, 0x6a, 0x1f, 0xb7, 0xea, - 0x8f, 0x03, 0x16, 0xb0, 0x34, 0x0e, 0x93, 0x2f, 0x05, 0xad, 0x2f, 0x05, 0x8c, 0x05, 0x21, 0x86, - 0x28, 0x26, 0x10, 0x51, 0xca, 0x64, 0x8a, 0x17, 0x59, 0x74, 0xb9, 0xa8, 0xcc, 0x35, 0xab, 0x02, - 0x19, 0x5d, 0x26, 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x60, 0xb2, 0x2d, 0x02, 0xfd, 0x44, 0x03, 0x73, 0xff, 0x0e, 0xdb, 0x4a, 0xa1, 0x81, 0x6e, 0xf6, - 0x5e, 0x87, 0xff, 0x09, 0xcc, 0x8f, 0x60, 0xf9, 0xe3, 0xf7, 0xdf, 0x9f, 0x27, 0x9e, 0x5b, 0xcf, - 0x60, 0xe1, 0x8d, 0x94, 0x66, 0xe9, 0x5f, 0x34, 0xb0, 0x50, 0x34, 0x9b, 0x6b, 0xb7, 0x55, 0x2b, - 0x00, 0xd7, 0x37, 0xef, 0x00, 0xce, 0xe5, 0xc1, 0x54, 0xde, 0xaa, 0xb5, 0x72, 0x53, 0x1e, 0xf6, - 0x89, 0x5c, 0xcf, 0x97, 0xeb, 0x71, 0x9a, 0xe8, 0xec, 0x9d, 0x5d, 0x18, 0xda, 0xf9, 0x85, 0xa1, - 0xfd, 0xba, 0x30, 0xb4, 0x93, 0x4b, 0xa3, 0x74, 0x7e, 0x69, 0x94, 0x7e, 0x5c, 0x1a, 0xa5, 0x7d, - 0x38, 0xe6, 0xb4, 0xd7, 0x29, 0xd9, 0xf6, 0x11, 0x22, 0x74, 0x44, 0xdc, 0x1f, 0xa3, 0x4e, 0x6d, - 0xe7, 0x55, 0xd2, 0xeb, 0x6f, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x43, 0x97, 0xb5, - 0xac, 0x05, 0x00, 0x00, + // 597 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x31, 0x6f, 0xd3, 0x4c, + 0x18, 0xc7, 0xe3, 0xb6, 0x6f, 0xde, 0xf6, 0x10, 0xb4, 0xb9, 0x42, 0x65, 0x85, 0xe0, 0x44, 0xae, + 0x44, 0x53, 0xaa, 0xf8, 0x94, 0x76, 0xeb, 0x18, 0x5a, 0xa4, 0x0c, 0x41, 0x91, 0xc5, 0x00, 0x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x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -639,69 +544,6 @@ func (m *MsgEditInflationParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgBurn) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgBurn) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBurn) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Coin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgBurnResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgBurnResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgBurnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -785,30 +627,6 @@ func (m *MsgEditInflationParamsResponse) Size() (n int) { return n } -func (m *MsgBurn) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Coin.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgBurnResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1299,171 +1117,6 @@ func (m *MsgEditInflationParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgBurn) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgBurn: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBurn: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Coin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgBurnResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgBurnResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgBurnResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/sudo/types/state.pb.go b/x/sudo/types/state.pb.go index 033a1c4b9..99b71715a 100644 --- a/x/sudo/types/state.pb.go +++ b/x/sudo/types/state.pb.go @@ -63,7 +63,7 @@ func (m *Sudoers) XXX_DiscardUnknown() { var xxx_messageInfo_Sudoers proto.InternalMessageInfo -func (m *Sudoers) GetRootAddr() string { +func (m *Sudoers) GetRoot() string { if m != nil { return m.Root }