diff --git a/x/classictax/keeper/taxsplit.go b/x/classictax/keeper/taxsplit.go index a7d1d76af..dcbf1a7c1 100644 --- a/x/classictax/keeper/taxsplit.go +++ b/x/classictax/keeper/taxsplit.go @@ -5,6 +5,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/types" + classictax "github.com/classic-terra/core/v2/x/classictax/types" treasury "github.com/classic-terra/core/v2/x/treasury/types" ) @@ -33,6 +34,15 @@ func (k Keeper) BurnTaxSplit(ctx sdk.Context, taxes sdk.Coins) (err error) { ); err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error()) } + + // emit event + events := sdk.Events{ + sdk.NewEvent( + sdk.EventTypeTx, + sdk.NewAttribute(classictax.AttributeKeyBurned, taxes.String()), + ), + } + ctx.EventManager().EmitEvents(events) } return nil diff --git a/x/classictax/types/events.go b/x/classictax/types/events.go index 1b7c9cdb8..853f10492 100644 --- a/x/classictax/types/events.go +++ b/x/classictax/types/events.go @@ -1,5 +1,6 @@ package types const ( - AttributeKeyTax = "tax" + AttributeKeyTax = "tax" + AttributeKeyBurned = "burned" )