Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions using Cross-Program Invocation (CPI) to make calls between on-chain programs
4
votes
Accepted
What is the difference between making a CPI using Anchor's CpiContext::new_with_signer vs in...
It is used to make CPI calls.
new_with_signer() creates and returns an Anchor CPI context. … That part is done by the CPI methods that Anchor generates, e.g. my_program::cpi::my_instruction(). This method receives the context and will actually call invoked_signed. …
6
votes
Accepted
How to use the Anchor's `features = ["cpi"]`?
The cpi feature simply toggles whether the cpi module is generated or not. … (the full list is here) to provide a similar experience to the generated cpi feature for non-Anchor programs. …
7
votes
Accepted
How to include other programs and test CPIs on localnet using Anchor?
I assume you mean to test in your local test validator, using anchor test.
You cannot simply copy-paste the spl_token program because it is not an Anchor program.
There are a couple of ways to go abou …