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

refactor: various ante handler improvements #20

Closed
wants to merge 5 commits into from
Closed

refactor: various ante handler improvements #20

wants to merge 5 commits into from

Conversation

johnletey
Copy link
Contributor

@johnletey johnletey commented Feb 5, 2024

This PR improves the FiatTokenFactory Ante Handler used in Noble today.

For those not aware, ante handlers are used to accept/reject transactions on a Cosmos SDK chain.

The FiatTokenFactory uses them to check if $USDC is paused or if the sender/receiver of $USDC is blacklisted.

Breakdown of Changes

In aa5e5c1, we fix the ante handlers by adding support for Authz messages.

In 06375f8, we improve the ante handler by correctly checking if we can decode the IBC receiver address. As the $USDC blacklist only applies to Noble, when sending to other chains via IBC, we can skip the check if we can't decode the address. Thanks to @yito88 and the Heliax team for reporting this!

In a4baa47, we improve the ante handlers by making them reusable in other codebases (like the Noble chain) — making this repository the true truth of source.

Additionally, developer tooling was updated to the latest version (with zero effect on the codebase) to improvement development experience!

@@ -5,6 +5,10 @@ on:
push:
branches: [master]

permissions:
contents: write
Copy link
Contributor

Choose a reason for hiding this comment

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

the addition of this line seems to be causing test failures. @johnletey Could you take a look?

@@ -0,0 +1,195 @@
package fiattokenfactory
Copy link
Contributor

Choose a reason for hiding this comment

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

No objection to code restructuring, but curious how these functions would be used outside fiattokenfactory. Any existing use cases you have in mind?

@johnletey
Copy link
Contributor Author

These changes were implemented in #22 (14edf83).

@johnletey johnletey closed this Mar 13, 2024
@johnletey johnletey deleted the ante-changes branch March 13, 2024 12:47
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