$ anchor idl init -f target/idl/program.json `solana address -k target/deploy/program-keypair.json`
Error: RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: invalid program argument [3 log messages]
Caused by:
RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: invalid program argument [3 log messages]
I have been unable to find:
- the error
-32002
specific to this case - the log messages mentioned in the brackets
- what does Instruction 0 mean
- which program argument is invalid
- any solution in general
Solang version: v0.3.2
Anchor-cli version: v0.28.0
Solana-cli version: v1.16.17
edit to add my instruction 0:
{
"name": "new",
"accounts": [
{
"name": "dataAccount",
"isMut": true,
"isSigner": true,
"isOptional": false
},
{
"name": "payer",
"isMut": true,
"isSigner": true,
"isOptional": false
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false,
"isOptional": false
}
],
"args": []
}
edit: I experimented with changing the function order and its arguments and the problem is still there, suggesting to me a compatibility issue.
edit:
You can reproduce this by trying to deploy the program created with:
anchor init program --solidity