-
Notifications
You must be signed in to change notification settings - Fork 51
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
Conversation
- use empty gas prices for sim tests
@StrathCole Hats down. The PR looks good to me, well implemented and cover the requirements of the simplified tax handling with reverse charge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 56 out of 56 changed files in this pull request and generated no suggestions.
@TropicalDog17 lets review the tests and add more test cases to this PR |
- improve fee check handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 41 out of 56 changed files in this pull request and generated no suggestions.
Files not reviewed (15)
- client/docs/swagger-ui/swagger.yaml: Language not supported
- contrib/updates/prepare_cosmovisor.sh: Language not supported
- custom/auth/ante/fee_burntax.go: Evaluated as low risk
- custom/auth/ante/expected_keeper.go: Evaluated as low risk
- custom/auth/ante/fee_test.go: Evaluated as low risk
- custom/wasm/keeper/handler_plugin.go: Evaluated as low risk
- app/upgrades/v10/constants.go: Evaluated as low risk
- custom/auth/tx/service.go: Evaluated as low risk
- custom/auth/ante/ante_test.go: Evaluated as low risk
- custom/auth/ante/integration_test.go: Evaluated as low risk
- custom/auth/ante/ante.go: Evaluated as low risk
- custom/auth/ante/fee_tax.go: Evaluated as low risk
- custom/auth/client/utils/feeutils.go: Evaluated as low risk
- custom/auth/post/post.go: Evaluated as low risk
- app/keepers/keepers.go: Evaluated as low risk
Comments skipped due to low confidence (2)
custom/auth/ante/fee.go:63
- [nitpick] The variable name reverseCharge is ambiguous. It should be renamed to isReverseCharge.
reverseCharge := false
custom/auth/ante/fee.go:64
- [nitpick] The variable name refundNonTaxableTax is ambiguous. It should be renamed to shouldRefundNonTaxableTax.
refundNonTaxableTax := false
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
TaxKeeper
to theAppKeepers
structure and initialized it in theNewAppKeepers
function inapp/keepers/keepers.go
. [1] [2]appModules
,simulationModules
,orderBeginBlockers
,orderEndBlockers
, andorderInitGenesis
inapp/modules.go
. [1] [2] [3] [4] [5]Changes in AnteHandler
HandlerOptions
andNewAnteHandler
incustom/auth/ante/ante.go
to include and check forTaxKeeper
. [1] [2]FeeDecorator
to account for taxes and handle scenarios where fees are insufficient to cover both gas and taxes incustom/auth/ante/fee.go
. [1] [2] [3]Import Statements
app/keepers/keepers.go
,app/modules.go
,custom/auth/ante/ante.go
, andcustom/auth/ante/fee.go
). [1] [2] [3] [4]Initialization and Configuration
NewAppKeepers
andinitParamsKeeper
functions inapp/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.