Remove unnecessary transfer hook token program account info#1004
Conversation
|
@Arrowana |
|
Knowledge update:
note: I tested whether a self-CPI could work without including the program's AccountInfo—just in case it was no longer required—but it didn’t work. In other words, while we can omit it in the CPI context, we still need to receive the program being called as an account, not just as a program_id. |
Correct, it is also planned to completely remove the need to pass a program to be able to cpi into it. https://github.com/solana-foundation/solana-improvement-documents/blob/main/proposals/0163-lift-cpi-caller-restriction.md |
Cool, good to know. Once self-CPI becomes possible, we should be able to emit events without the risk of them being truncated — although there’s still the issue of the event authority.... The PR looks good to me, so planning to merge the PR before the next upgrade. |
|
Notes for SIMD-0163 Lift CPI caller restriction:
|
There is no need for the token program in account info
https://github.com/solana-program/transfer-hook/tree/main/interface
It is not required or necessary