Skip to main content

New answers tagged

1 vote
Accepted

Error fetching block: ReferenceError: GetBlockConfig is not defined

This looks like a syntax error in JavaScript. Try defining the object separately as: const GetBlockConfig = { commitment: 'finalized', maxSupportedTransactionVersion: 0, rewards: false, ...
Jon C's user avatar
  • 14.6k
1 vote
Accepted

Is it possible to use the latest blockhash to get transaction data for the block its for?

The getBlock RPC method takes in a slot number, so you can't use the blockhash as an input. You'll need to get the current confirmed slot using getSlot https://solana.com/docs/rpc/http/getslot, ie: $ ...
Jon C's user avatar
  • 14.6k

Top 50 recent answers are included