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

feat(fees): enable fees to be deducted from unclaimed staking rewards #1405

Merged
merged 83 commits into from
Mar 1, 2023

Conversation

MalteHerrmann
Copy link
Contributor

@MalteHerrmann MalteHerrmann commented Feb 17, 2023

Description

This PR introduces the mechanics to achieve milestone 1 of the "fee subscription" initiative, which enables transaction fees to be deducted from unclaimed staking rewards.

  • Implement functionality
    • Cosmos Tx
    • EVM Tx
    • Method to withdraw a sufficient amount of staking rewards
  • Cover with tests (left for last because of ongoing refactors in the codebase)
    • Cosmos Tx
    • EVM Tx
    • Unit tests for reward withdrawal function

Closes ENG-1199

app/ante/cosmos/fees.go Fixed Show fixed Hide fixed
app/ante/cosmos/fees.go Fixed Show fixed Hide fixed
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/evm/eth.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/utils/claim_rewards.go Outdated Show resolved Hide resolved
app/ante/utils/claim_rewards.go Outdated Show resolved Hide resolved
Copy link
Contributor

@facs95 facs95 left a comment

Choose a reason for hiding this comment

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

LGTM besides comments

app/ante/cosmos/fees.go Show resolved Hide resolved
app/ante/utils/claim_rewards.go Outdated Show resolved Hide resolved
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK. Pending additional unit tests on app/ante/cosmos/fees.go

app/ante/cosmos/fees.go Show resolved Hide resolved
app/ante/utils/claim_rewards.go Outdated Show resolved Hide resolved
app/ante/utils/claim_rewards.go Outdated Show resolved Hide resolved
app/ante/utils/claim_rewards.go Outdated Show resolved Hide resolved
app/ante/utils/claim_rewards.go Show resolved Hide resolved
app/ante/utils/claim_rewards.go Outdated Show resolved Hide resolved
app/ante/cosmos/fees.go Show resolved Hide resolved
app/ante/cosmos/fees.go Show resolved Hide resolved
app/ante/cosmos/fees.go Show resolved Hide resolved
Vvaradinov and others added 4 commits February 28, 2023 16:07
* chore(tests) add insufficient fees unit test

* chore(tests) add min gas price == 0 unit test

* chore(tests) add fee granter tests

* fix lint issues

* fix cosmos tests

* add fees unit test case

* add zero fees unit test case

* add unit test without freegrant keeper
Copy link
Contributor

@GAtom22 GAtom22 left a comment

Choose a reason for hiding this comment

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

LGTM! Left a few comments and questions

app/ante/cosmos/fees.go Outdated Show resolved Hide resolved
app/ante/evm/fee_checker.go Show resolved Hide resolved
app/ante/setup_test.go Outdated Show resolved Hide resolved
app/ante/utils/claim_rewards.go Outdated Show resolved Hide resolved
app/ante/utils/setup_test.go Outdated Show resolved Hide resolved
app/ante/utils/setup_test.go Outdated Show resolved Hide resolved
@fedekunze fedekunze merged commit 4da4a04 into main Mar 1, 2023
@fedekunze fedekunze deleted the fee-subscription-milestone-1 branch March 1, 2023 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants