Skip to content

Conversation

@Arrowana
Copy link
Contributor

@Arrowana Arrowana commented Jul 10, 2025

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

@Arrowana Arrowana changed the title Remove unnecessary transfer hook account info Remove unnecessary transfer hook token program account info Jul 10, 2025
@yugure-orca
Copy link
Collaborator

@Arrowana
Thanks for the PR!

@yugure-orca
Copy link
Collaborator

yugure-orca commented Jul 15, 2025

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.

@Arrowana
Copy link
Contributor Author

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
This would simplify tx building even further.

@yugure-orca
Copy link
Collaborator

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 This would simplify tx building even further.

Cool, good to know.
Thanks again!

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.

@yugure-orca yugure-orca merged commit 95e9ddb into orca-so:main Aug 13, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants