Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CPI to other BPF programs #5

Closed
buffalojoec opened this issue Jun 22, 2024 · 0 comments · Fixed by #8
Closed

Support CPI to other BPF programs #5

buffalojoec opened this issue Jun 22, 2024 · 0 comments · Fixed by #8

Comments

@buffalojoec
Copy link
Owner

Because of this little hack, CPI only works to builtin programs right now.

const PROGRAM_ACCOUNTS_LEN: usize = 1;
const PROGRAM_INDICES: &[u16] = &[0];

We'll need to add some logic to extract program accounts, similar to:

https://github.com/anza-xyz/agave/blob/2443048c5cd926581fdc2a26a25006120d16477c/svm/src/transaction_processor.rs#L492

Note this would also involve adding the target BPF program to the cache.

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 a pull request may close this issue.

1 participant