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

Strath/tax2gas gasmeter #519

Closed

Conversation

StrathCole
Copy link
Collaborator

@StrathCole StrathCole commented Sep 23, 2024

Fixes for the tax2gas implementation and gas handling

Copilot Summary

This pull request introduces a new Tax2Gas feature to the Terra application, which includes significant changes to the handling of gas consumption and taxation. The most important changes include the addition of the Tax2GasMeter for gas metering, the implementation of new decorators and handlers, and the adjustment of existing code to integrate with the new Tax2Gas system.

Integration of Tax2Gas Feature:

  • New Gas Meter Implementation:

    • Added Tax2GasMeter to handle gas consumption and taxation (x/tax2gas/types/gas.go).
  • New Ante and Post Handlers:

    • Implemented Tax2GasDecorator and GasRegisterDecorator to manage gas limits and register gas in the context (x/tax2gas/keeper/ante.go).
    • Modified Tax2gasPostDecorator to use Tax2GasMeter for post-transaction gas handling (x/tax2gas/post/post.go). [1] [2] [3] [4]
  • Context and Gas Handling Adjustments:

    • Updated DispatchMsg method to integrate Tax2GasMeter (custom/wasm/keeper/handler_plugin.go). [1] [2]
    • Adjusted AnteHandle method to utilize Tax2GasMeter for gas consumption (x/tax2gas/ante/ante.go). [1] [2]

Configuration and Testing:

  • Configuration Changes:

    • Modified go.mod to update the cosmos-sdk dependency (go.mod).
  • Testing Enhancements:

    • Updated test contexts to use Tax2GasMeter in various test files (wasmbinding/test/tax_test.go, x/tax2gas/ante/ante_test.go, x/tax2gas/ante/fee_test.go). [1] [2] [3] [4]

Code Cleanup:

  • Removed Unnecessary Decorators:
    • Commented out old decorators and replaced them with the new Tax2GasDecorator (custom/auth/ante/ante.go).

These changes collectively introduce the Tax2Gas functionality, enhancing the gas management system within the Terra application.

@StrathCole
Copy link
Collaborator Author

Closed as t2g has been replaced by a different approach.

@StrathCole StrathCole closed this Nov 3, 2024
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.

2 participants