-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
Co-authored-by: yito88 <[email protected]> noble-assets/noble#301
@@ -5,6 +5,10 @@ on: | |||
push: | |||
branches: [master] | |||
|
|||
permissions: | |||
contents: write |
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.
the addition of this line seems to be causing test failures. @johnletey Could you take a look?
@@ -0,0 +1,195 @@ | |||
package fiattokenfactory |
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.
No objection to code restructuring, but curious how these functions would be used outside fiattokenfactory. Any existing use cases you have in mind?
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!