refactor: various ante handler improvements #20
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!