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

Add Fee granter field #7418

Merged
merged 9 commits into from
Oct 5, 2020
6 changes: 3 additions & 3 deletions x/auth/ante/fee_grant.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

// RejectFeeGranterDecorator is a placeholder AnteDecorator for fee grants for
// when that functionality is enabled. Currently it simpy rejects transactions
// which have the Fee.granter field set.
// RejectFeeGranterDecorator is an AnteDecorator which rejects transactions which
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

// have the Fee.granter field set. It is to be used by chains which do not support
// fee grants.
type RejectFeeGranterDecorator struct{}

// NewRejectFeeGranterDecorator returns a new RejectFeeGranterDecorator.
Expand Down
3 changes: 3 additions & 0 deletions x/auth/legacy/legacytx/stdtx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func TestStdTx(t *testing.T) {

feePayer := tx.GetSigners()[0]
require.Equal(t, addr, feePayer)

feeGranter := tx.FeeGranter()
require.Empty(t, feeGranter)
Comment on lines +71 to +72
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
feeGranter := tx.FeeGranter()
require.Empty(t, feeGranter)
require.Empty(t, tx.FeeGranter())

}

func TestStdSignBytes(t *testing.T) {
Expand Down
22 changes: 22 additions & 0 deletions x/auth/tx/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,25 @@ func TestBuilderFeePayer(t *testing.T) {
})
}
}