Skip to content

Commit

Permalink
Burn fees instead of giving them to validators
Browse files Browse the repository at this point in the history
  • Loading branch information
Cashmaney committed Aug 22, 2023
1 parent ea64f27 commit 9296e09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x/auth/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,11 @@ func DeductFees(bankKeeper types.BankKeeper, ctx sdk.Context, acc types.AccountI
return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error())
}

// Added custom code to just burn the TX fees rather than add them to the pool
err = bankKeeper.BurnCoins(ctx, types.FeeCollectorName, fees)
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, err.Error())
}

return nil
}
2 changes: 2 additions & 0 deletions x/auth/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ import (
// BankKeeper defines the contract needed for supply related APIs (noalias)
type BankKeeper interface {
SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error

BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
}

0 comments on commit 9296e09

Please sign in to comment.