Skip to main content

All Questions

Tagged with
0 votes
1 answer
45 views

Tx Reverting Even If Internal CPI Fails

Creating a CPI call, since it returns a Result. If the internal call throws an error, err should have an err() field as per the definition. The whole transaction should not revert, but it is reverting....
Priyanshu Mishra's user avatar
1 vote
2 answers
38 views

Does a CPI method to a program leave any special footprint on the blockchain?

Firstly, do I understand correctly that CPI call is one of the ways to call a method of program? If so, only by examining a TX on the blockchain, will it be possible to distinguish a CPI call to a ...
kriss100's user avatar
2 votes
1 answer
273 views

How are CPI calls charged?

When making CPI calls in my program, I am wondering whether I pay for the transaction cost associated with it. To my understanding my program execution is paused and it goes to executing the cpi-ed ...
Jimii's user avatar
  • 3,907
1 vote
1 answer
143 views

Cannot perform a CPI call using anchor

I tried to make a CPI call from puppret_master to puppet program exactly like the anchor document and i did everything right but "program" AND "cpi" keywords are still unkown for ...
pooria sarkhan's user avatar
4 votes
1 answer
208 views

How can I do one cross-program-invocation with multiple instructions?

in a nutshell I'm wondering how to send one CPI call with a vector of Instructions. Here's an example: I noticed there's a function in the solana_program Rust crate called: solana_program::...
Joe C's user avatar
  • 1,086
1 vote
1 answer
93 views

How do accounts not yet created get loaded by the runtime with Cross Program Invocation?

In the code reproduced below from this link we have client code creating and sending instruction to create a new account: describe("Create a system account", async () => { const ...
dade's user avatar
  • 292
7 votes
2 answers
336 views

What is the use for `program_id` in program's entrypoint

All Solana programs receive its own program_id as a parameter. But I don't see how this is useful, as you can use declare_id to declare it in case you need it. I've also seen that if you get your ...
RowanStone's user avatar