Skip to main content
5 votes
Accepted

How to verify data on chain with Solana

The solution is to use something called Program Derived Addresses. What Are They? Your program has its own unique address space to which it can allocate Program Derived Addresses. These are derived ...
HelmetFace's user avatar
  • 1,807
3 votes

Blocks on testnet have no transactions

The transactions field in UIConfirmedBlock being of type Option means that this field can either contain some data (Some(LongTransactionType)) or be empty (None). If you're consistently getting None, ...
Mitch's user avatar
  • 848
2 votes
Accepted

Connection to solana cluster using the ThinClient of the rust client library giving timeout error?

It looks like the tpu address is most likely incorrect. When you start your local validator, it should give the address, ie: solana-test-validator Ledger location: test-ledger Log: test-ledger/...
Jon C's user avatar
  • 19.6k
2 votes

Buffer undefined when using Javascript SDK in Cloudflare Worker

You'll have to add a shim for Buffer. Install @rollup/plugin-inject and import it into vite.config.js import inject from '@rollup/plugin-inject'; Add a build property to the config object: build: { ...
C.OG's user avatar
  • 2,907
2 votes
Accepted

Blocks on testnet have no transactions

If you want to fetch devnet transactions, you need to change your API to point to that cluster https://api.devnet.solana.com As the name suggests, the EncodedTransactionWithStatusMeta is the encoded ...
Jimii's user avatar
  • 7,712
1 vote
Accepted

AttributeError: 'dict' object has no attribute 'encoding' when trying to pull transfers for a token

You either need to manually add encoding value in your opts dictionary or simply use TokenAccountOpts and pass it in your options. Specifying "encoding" for get_token_accounts_by_owner ...
Syed Aabis Akhtar's user avatar
1 vote

Proper usage of `getProgramAccounts` via Rust SDK. Cannot execute RPC call from SDK

If you read the first error message, it complains about the returned data being too large for base58. // Err(ClientError { request: Some(GetProgramAccounts), kind: RpcError(RpcResponseError { code: -...
Arowana's user avatar
  • 2,373
1 vote
Accepted

Proper usage of `getProgramAccounts` via Rust SDK. Cannot execute RPC call from SDK

The only way how I managed to retrieve the data I wanted, was to bypass the get_program_accounts helper on the SDK client, as it was unable to properly parse the returned data. Here is the code that ...
Roberts Ivanovs's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible