Community Digest

Top new questions this week:

What does anchor error `2003` mean

What does the error for A raw constraint was violated mean? errorCode: { code: 'ConstraintRaw', number: 2003 }, errorMessage: 'A raw constraint was violated',

anchor anchor-test  
user avatar asked by Jimii Score of 1
user avatar answered by Serban Score of 2

How do I get the new SPL token-metadata interface to work with SPL token-2022's metadata-pointer extension?

Just to confirm if I understood all the docs correctly. Basically to get them to work I have to: Have a metadata program that adheres to the token-metadata interface. Critically, it needs to handle ...

metadata token-2022  
user avatar asked by billy Score of 1
user avatar answered by Jon C Score of 1

Is there a way I can use find_program_address used to derive a PDA as an anchor constraint

Suppose I have a PDA that is supposed to be initialized by calling a CPI in my program and I want to validate that the account is valid, is there a way I could add a check to make sure that the ...

anchor pda constraints  
user avatar asked by Jimii Score of 1
user avatar answered by john Score of 1

How to get all controlled programs or tokens by an specified account?

Can I see by API or something else all the programs or tokens when an specified account has authority to mint or update?

solana-program solana-cli  
user avatar asked by Udbdjfj Score of 1
user avatar answered by Jimii Score of 1

What does it mean Lamport?

What does it mean Lamport?. How many Lamports is one Solana?. Is it important?. What is Lamport balance?. How to calculate it?. How many Lamports should I have in my account to be estimated rent ...

account staking fees balance lamports  
user avatar asked by Gus Score of 1
user avatar answered by Jimii Score of 1

Block tokens on someone else's address

I'm looking for a way to block tokens created on the Solana blockchain. Ideally I would like to do this using Python. Please provide code samples. Situation: I need to block an account that has my ...

spl-token spl-token-program spl  
user avatar asked by Atr118 Score of 1
user avatar answered by anchor noob Score of 1

Metadata point for SPL-token

Does anyone have a TS file that I can have that creates a metadata pointer for a token where the address is already known. Almost every exampel I find also creates the token, but I need it to just ...

user avatar asked by Sofus L Score of 1

Greatest hits from previous weeks:

What is the difference between Transfer and TransferChecked instruction from the SPL Token Program?

I'm curious what the practical difference is between the Transfer and TransferChecked instructions, and when should we use one over the other. In this question, I'm using Transfer/TransferChecked as ...

solana-program spl-token transfer transfer-checked spl-token-program  
user avatar asked by beeman Score of 15
user avatar answered by Callum M Score of 17

How do I fix error Syntax Error: Unexpected token '.' when running anchor test

I get the following error when I run anchor test to test my smart contract using typescript: Error snippet abortSignal: options?.abortSignal, ^ SyntaxError: ...

anchor anchor-test javascript typescript  
user avatar asked by dsapalo Score of 1
user avatar answered by dsapalo Score of 1

how to convert pubkey to accountinfo?

I'm writing a program where I'm fetching the program_address (as below) and now I want to convert the publicKey to AccountInfo and use it to do token transfer CPI. let (asset, bump_seed) = Pubkey::...

anchor solana-program anchor-lang anchor-program  
user avatar asked by Gajesh S Naik Score of 7
user avatar answered by Whiteseal Score of 9

Do Solana blockchains have Chain IDs?

Does Solana use Chain IDs the way they are used in EVM blockchains? I cannot find this in the Solana documentation and in the internet. If Solana uses Chain IDs, where can I find them? If not, is ...

user avatar asked by Sasha Shpota Score of 3
user avatar answered by felix Score of 3

How to close SPL token accounts to redeem SOL

I have a bunch of 0 balance SPL token accounts. How do I close these accounts to redeem the rent lamports?

user avatar asked by Son Dang Score of 12
user avatar answered by Quellen Score of 16

Splitting a Solana Keypair into Public and Private Keys

I have the JSON file containing the keypair which has an array containing 64 values: $ cat ~/my-solana-wallet/demo.json [4,182,130,247,119,117,227,207,112,73,170,126,222,197,244,99,215,107,255,202,33,...

keypair json  
user avatar asked by Rajat Score of 5
user avatar answered by AKSHAY DHAYAL Score of 6

SPL-Token crate throws: failed to select a version for the requirement `toml_edit = "^0.18"`

I have been following a tutorial on Solana native development and need to interact with SPL-Token crate at some point. However, I can not build (cargo-build-bpf), it throws: BPF SDK: /Users/user1/....

spl-token rust  
user avatar asked by Oguzhan Score of 4
user avatar answered by Oguzhan Score of 3

Can you answer these questions?

Issues with @solana/spl-tokens pnpm is not saving this package to where I can't connect to the blockchain with the following .js file:

const { Token, TOKEN_PROGRAM_ID } = require("@solana/spl-token"); const { Connection, PublicKey, Keypair } = require("@solana/web3.js"); async function main() { // Your existing ...

user avatar asked by Brennen Segura Score of 1
user avatar answered by Jimii Score of 0

Get all adresses with less than 3000 transactions in a blocks interval

Given a block interval, I want to get every Solana address with less than 3,000 transactions. For the moment, I check every block in the interval and write down the addresses. But I need 3 extra API ...

api data  
user avatar asked by Théo Farnole Score of 1
You're receiving this message because you subscribed to the Solana community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 14 Wall Street, 20th Floor, New York, NY 10005