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

Implement a Reverse Charge tax approach #525

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

StrathCole
Copy link
Collaborator

Summary of changes

This is an implementation as an alternative to tax2gas.
It solves similar issues as tax2gas does, but additionally shifts taxation to the recipient side.
Also it removes double-taxation of contracts, i.e. contract calls are no longer taxed, but sending funds from inside contracts to the final wallet destination is.

Copilot Summary

This pull request introduces the integration of a new Tax module into the Terra blockchain application. The changes primarily involve adding the TaxKeeper to various parts of the application and ensuring it is properly initialized and utilized in transaction handling. Below is a summary of the most important changes:

Integration of Tax Module

  • Added TaxKeeper to the AppKeepers structure and initialized it in the NewAppKeepers function in app/keepers/keepers.go. [1] [2]
  • Included the Tax module in the module initialization and setup functions, such as appModules, simulationModules, orderBeginBlockers, orderEndBlockers, and orderInitGenesis in app/modules.go. [1] [2] [3] [4] [5]

Changes in AnteHandler

  • Updated the HandlerOptions and NewAnteHandler in custom/auth/ante/ante.go to include and check for TaxKeeper. [1] [2]
  • Modified the FeeDecorator to account for taxes and handle scenarios where fees are insufficient to cover both gas and taxes in custom/auth/ante/fee.go. [1] [2] [3]

Import Statements

  • Added necessary import statements for the Tax module in various files (app/keepers/keepers.go, app/modules.go, custom/auth/ante/ante.go, and custom/auth/ante/fee.go). [1] [2] [3] [4]

Initialization and Configuration

  • Added the Tax module's store key and subspace initialization in NewAppKeepers and initParamsKeeper functions in app/keepers/keepers.go. [1] [2]

These changes collectively ensure that the new Tax module is fully integrated into the Terra blockchain application, with proper initialization, configuration, and handling within the transaction processing pipeline.

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.

1 participant