-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transfer hook: add new offchain helper
This PR adds a new offchain helper for adding the necessary account metas for an `ExecuteInstruction` to the SPL Transfer Hook interface, deprecating the old one. As described in #6064, the offchain helper in Token2022 was using the original offchain helper from the SPL Transfer Hook interface incorrectly when resolving extra account metas for a transfer. In order to provide a safer, more robust helper, this new function takes the instruction, fetch account data function, as well as the individual arguments for `instruction::execute(..)`. This will help to ensure Token2022 as well as anyone else using the helpers from the SPL Transfer Hook interface are properly resolving the necessary additional accounts. Note: Although deprecated, the original helper in the SPL Transfer Hook interface is not broken. It's just less safe to use than this new helper, since it can easily be misused.
- Loading branch information
Joe C
authored
Jan 11, 2024
1 parent
0efab24
commit 8076018
Showing
4 changed files
with
258 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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