-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recipient checker logics to bank send (#526)
## Describe your changes and provide context Allow checkers to be registered with bank send keeper so that certain recipients can be blocked. For example, to block a temp address (created by EVM module before address association) from receiving after its main address is associated, one would register a checker as follows: ``` app.BankKeeper.RegisterRecipientChecker(func(ctx sdk.Context, recipient sdk.AccAddress) bool { castEvmAddress := common.BytesToAddress(recipient) _, isAssociated := app.EvmKeeper.GetSeiAddress(ctx, castEvmAddress) return !isAssociated }) ``` ## Testing performed to validate your change unit test
- Loading branch information
Showing
3 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters