-
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.
token js: create new offchain helper
This is the final PR to round off the changes required to fix #6064. Previously, the offchain helpers for adding extra metas to instructions have been replaced with new ones in the SPL Transfer Hook interface and Token2022. This PR follows suit and adds a new helper to SPL Token JS. The new helper, `addExtraAccountMetasForExecute(..)`, mirrors the Rust helper in SPL Transfer Hook interface, requiring the parameters for an `ExecuteInstruction` to be passed into the function directly. This change also adds a public function for creating an `ExecuteInstruction`, in case developers wish to create such an instruction for directly sending instructions to their transfer hook program. These existing functions have been updated to use the new helper: - `createTransferCheckedWithTransferHookInstruction(..)` - `createTransferCheckedWithFeeAndTransferHookInstruction(..)` Closes #6064
- Loading branch information
Joe C
authored
Jan 11, 2024
1 parent
e988e6f
commit de2e356
Showing
2 changed files
with
674 additions
and
183 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
Oops, something went wrong.