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 onchain helper
As another step for solving #6064, the onchain helpers now need to be replaced. This PR makes that change in the SPL Transfer Hook interface. Specifically, this commit adds a new `add_extra_accounts_for_execute_cpi(..)` helper and deprecates the old one. Like its offchain counterpart, this new helper requires the arguments for `instruction::execute(..)` in order to validate that a proper `ExecuteInstruction` is being resolved, thus ensuring proper account resolution. This function, like its now-deprecated sibling, is designed specifically to add extra accounts to an `ExecuteInstruction` CPI instruction. It's expected that the instruction being provided is a CPI instruction for another program, and that program will CPI to the transfer hook program in question. Details about this have been added to the helper's documentation.
- Loading branch information