Questions tagged [anchor-program-idl]
The anchor-program-idl tag has no usage guidance.
23
questions
0
votes
0
answers
12
views
no method named `try_to_vec` found for reference `&UpdateArgs` in the current scope
Here is my idl:
use solana_idlgen::idlgen;
idlgen!({
"version": "0.1.0",
"name": "wba_prereq",
"instructions": [
{
&...
2
votes
1
answer
41
views
Unable to upload Solang generated idl
$ 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: ...
1
vote
1
answer
30
views
Reference for supported IDL types
Is there a reference for supported anchor IDL types, just like we have for the space reference. Trying to use a slice [usize; 32] but getting the error
IdlError: Type not found: {"type":{&...
1
vote
1
answer
48
views
Fallback functions are not supported. error 101 (Anchor)
I have a very weird use case.
I have a method in a program, my method is call "bid"
When i try to call it with program.transaction.bid(...) it worked 2 times, and it's not working anymore, i ...
4
votes
1
answer
80
views
how can i send a transaction to a solana program using flutter/dart
I have a solana program to which I want to send parameters and also different accounts, however I have not found how to do it, in this case I am using this flutter/dart library.
Flutter Packages
[...
2
votes
2
answers
61
views
Using the #[constant] macro in anchor depending on feature flag
Does anyone know if there is a method to produce an IDL that has different constants depending on the feature flag?
I have tried variations of
#[cfg(not(feature = "mainnet"))]
#[constant]
...
3
votes
1
answer
123
views
Can't anchor idl init
when I try to anchor IDL init, i get stuck permanently trying to finalize the txn.
anchor idl init --filepath ./target/idl/solotesting2.json Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS --provider....
3
votes
1
answer
53
views
Is it possible to retrieve an IDL using getAccountInfo() without brute forcing anchor decode() on the accounts
Is there a pattern in which account the IDL is stored in?
0
votes
0
answers
22
views
memindahkkan addrees baru solana yang lama
url http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getSignatureStatuses",
&...
4
votes
1
answer
361
views
How can I get the discriminator of an instruction in an Anchor Solana IDL?
First of all can someone explain to me what a discriminator is, in the context of Solana instructions, in simple terms?
Second, how can I get the discriminator of an instruction in an Anchor Solana ...
2
votes
0
answers
29
views
What is `store` and `store_bump` [closed]
this is like a parent of the program ID , with a new thing which I am not aware of called store, and store_bump, can someone tell me what is this, the child program is
...
1
vote
1
answer
51
views
Trouble initializing solana contract on front-end client
I have a very simple program which stores GIFs in a solana contract. Before I can get the gifs, however, I believe I need to call the "initialize" function in my front-end. I have created ...
3
votes
1
answer
350
views
Anchor IDL address missing from json
Is it just me or did the "metadata": {"address: Pubkey} key-value pair from the generated json disappear when running anchor build?
1
vote
0
answers
109
views
How to use program id as seeds for a PDA
I am trying to use my program_id as one of my seeds for a PDA in my code. Here is a sample
pub const seed: &str = "seed"
pub struct PoolAccounts<'info> {
/// CHECK: This is a ...
2
votes
1
answer
51
views
How to check for a list of wallets that interacted with a specific program id
As the title says
Let's say I have a program id and I want to see a list of wallets that interacted with and filter by the type of interaction, how do I do so?
1
vote
1
answer
239
views
How to decode anchor zero copy account with idl?
The zero copy version of the following struct adds 4 bytes of padding between arg_1 and arg_2. This makes the idl not able to decode the struct correctly as arg_2 is being decoded based on the 4 bytes ...
2
votes
1
answer
30
views
Is there a way to tell anchor to ignore a field on deserilize?
We are facing an issue. Appreciate it if you can give some suggestions.
We have several AccountExample in mainnet/devnet.
It is created the following way.
#[account]
pub struct AccountExample {
...
0
votes
1
answer
84
views
Anchor: Change Localnet to Devnet
so we delpoyed our code onto devnet, and now I am wondering how to interact with it. The main problem I have is connecting to the provider.
Code:
const provider = anchor.AnchorProvider.env();
anchor....
0
votes
1
answer
61
views
How do I include the Decimal struct in the anchor idl?
I have copied the math section from the token lending program here
https://github.com/solana-labs/solana-program-library/tree/master/token-lending/program/src/math
Decimal struct is as below
// U192 ...
0
votes
1
answer
52
views
Is there any way to fetch all anchor idl's?
Is there any way to get all anchor idl's? Right now the CLI supports the command anchor idl fetch <account>, but I'd like something like anchor idl fetch --all, or a way to fetch all anchor ...
0
votes
2
answers
84
views
Anchor cluster provider issue
I have setup the Anchor.toml fiel for the devnet but got the error in the test cases some thing like "request to http://localhost:8899/ failed, reason: connect ECONNREFUSED 127.0.0.1:8899", ...
1
vote
1
answer
179
views
Pass tuple enum to instruction data
I pass custom struct including tuple enum to instruction:
#[derive(Debug, AnchorSerialize, AnchorDeserialize)]
pub enum FeedValue {
Boolean(bool),
U8(u8),
U16(u16),
U32(u32),
U64(...
1
vote
1
answer
250
views
How to parse base64 program data from getParsedAccountInfo?
I've been trying to figure out a way to programmatically derive the descriptive "label" given a program's base58 address, e.g. cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ => NFT Candy ...