Skip to content

Commit

Permalink
regenerate proto
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Sep 8, 2023
1 parent c8b026b commit 4a75db1
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 127 deletions.
137 changes: 69 additions & 68 deletions api/cosmos/bank/v1beta1/tx.pulsar.go

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

4 changes: 4 additions & 0 deletions api/cosmos/bank/v1beta1/tx_grpc.pb.go

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

3 changes: 1 addition & 2 deletions proto/cosmos/bank/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,12 @@ message MsgSetSendEnabledResponse {}
// Since: cosmos-sdk 0.51
message MsgBurn {
option (cosmos.msg.v1.signer) = "from_address";
option (amino.name) = "cosmos-sdk/MsgBurn";

option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
repeated cosmos.base.v1beta1.Coin amount = 2 [(amino.dont_omitempty) = true, (amino.encoding) = "legacy_coins"];
repeated cosmos.base.v1beta1.Coin amount = 2;
}

// MsgBurnResponse defines the Msg/Burn response type.
Expand Down
12 changes: 6 additions & 6 deletions x/bank/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ func (suite *KeeperTestSuite) mockMintCoins(moduleAcc *authtypes.ModuleAccount)

func (suite *KeeperTestSuite) mockSendCoinsFromModuleToAccount(moduleAcc *authtypes.ModuleAccount, accAddr sdk.AccAddress) {
suite.authKeeper.EXPECT().GetModuleAddress(moduleAcc.Name).Return(moduleAcc.GetAddress())
suite.authKeeper.EXPECT().GetAccount(suite.ctx, moduleAcc.GetAddress()).Return(moduleAcc).AnyTimes()
suite.authKeeper.EXPECT().GetAccount(suite.ctx, moduleAcc.GetAddress()).Return(moduleAcc)
suite.authKeeper.EXPECT().HasAccount(suite.ctx, accAddr).Return(true)
}

func (suite *KeeperTestSuite) mockBurnCoins(moduleAcc *authtypes.ModuleAccount) {
suite.authKeeper.EXPECT().GetAccount(suite.ctx, moduleAcc.GetAddress()).Return(moduleAcc).AnyTimes()
suite.authKeeper.EXPECT().GetAccount(suite.ctx, moduleAcc.GetAddress()).Return(moduleAcc)
}

func (suite *KeeperTestSuite) mockSendCoinsFromModuleToModule(sender, receiver *authtypes.ModuleAccount) {
Expand Down Expand Up @@ -562,13 +562,13 @@ func (suite *KeeperTestSuite) TestSupply_BurnCoins() {
supplyAfterInflation, _, err := keeper.GetPaginatedTotalSupply(ctx, &query.PageRequest{})
require.NoError(err)

authKeeper.EXPECT().GetAccount(ctx, []byte{}).Return(nil).MaxTimes(1)
require.Error(keeper.BurnCoins(ctx, []byte{}, initCoins), "no account")
authKeeper.EXPECT().GetAccount(ctx, sdk.AccAddress{}).Return(nil)
require.Error(keeper.BurnCoins(ctx, sdk.AccAddress{}, initCoins), "no account")

authKeeper.EXPECT().GetAccount(ctx, minterAcc.GetAddress()).Return(minterAcc).MaxTimes(1)
authKeeper.EXPECT().GetAccount(ctx, minterAcc.GetAddress()).Return(minterAcc.BaseAccount)
require.Error(keeper.BurnCoins(ctx, minterAcc.GetAddress(), initCoins), "invalid permission")

authKeeper.EXPECT().GetAccount(ctx, randomAcc.GetAddress()).Return(randomAcc)
authKeeper.EXPECT().GetAccount(ctx, randomAcc.GetAddress()).Return(randomAcc.BaseAccount)
require.Error(keeper.BurnCoins(ctx, randomAcc.GetAddress(), supplyAfterInflation), "random permission")

suite.mockBurnCoins(burnerAcc)
Expand Down
Loading

0 comments on commit 4a75db1

Please sign in to comment.