Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tokenfactory events (backport #6195) #6197

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.