Skip to content

Commit

Permalink
Fix tokenfactory events (#6195)
Browse files Browse the repository at this point in the history
* Fix event

* Add change log, fix proto

(cherry picked from commit 89be360)
  • Loading branch information
mattverse authored and mergify[bot] committed Aug 28, 2023
1 parent c395875 commit 74468c8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug Fixes
* [#6190](https://github.com/osmosis-labs/osmosis/pull/6190) v19 upgrade handler superfluid fix

* [#6195](https://github.com/osmosis-labs/osmosis/pull/6195) (x/tokenfactory) Fix events for `mintTo` and `burnFrom`
### Misc Improvements

### Minor improvements & Bug Fixes
Expand Down
8 changes: 6 additions & 2 deletions proto/osmosis/tokenfactory/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ message MsgCreateDenomResponse {
}

// MsgMint is the sdk.Msg type for allowing an admin account to mint
// more of a token. For now, we only support minting to the sender account
// more of a token.
// Only the admin of the token factory denom has permission to mint unless
// the denom does not have any admin.
message MsgMint {
option (amino.name) = "osmosis/tokenfactory/mint";

Expand All @@ -62,7 +64,9 @@ message MsgMint {
message MsgMintResponse {}

// MsgBurn is the sdk.Msg type for allowing an admin account to burn
// a token. For now, we only support burning from the sender account.
// a token.
// Only the admin of the token factory denom has permission to burn unless
// the denom does not have any admin.
message MsgBurn {
option (amino.name) = "osmosis/tokenfactory/burn";

Expand Down
4 changes: 2 additions & 2 deletions x/tokenfactory/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (server msgServer) Mint(goCtx context.Context, msg *types.MsgMint) (*types.
ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
types.TypeMsgMint,
sdk.NewAttribute(types.AttributeMintToAddress, msg.Sender),
sdk.NewAttribute(types.AttributeMintToAddress, msg.MintToAddress),
sdk.NewAttribute(types.AttributeAmount, msg.Amount.String()),
),
})
Expand Down Expand Up @@ -110,7 +110,7 @@ func (server msgServer) Burn(goCtx context.Context, msg *types.MsgBurn) (*types.
ctx.EventManager().EmitEvents(sdk.Events{
sdk.NewEvent(
types.TypeMsgBurn,
sdk.NewAttribute(types.AttributeBurnFromAddress, msg.Sender),
sdk.NewAttribute(types.AttributeBurnFromAddress, msg.BurnFromAddress),
sdk.NewAttribute(types.AttributeAmount, msg.Amount.String()),
),
})
Expand Down
8 changes: 6 additions & 2 deletions x/tokenfactory/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 74468c8

Please sign in to comment.