Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] GetBlockWithOpts using GetParsedTransaction not working in the version v1.8.4 #163

Open
elvis-hp opened this issue Nov 14, 2023 · 2 comments

Comments

@elvis-hp
Copy link

elvis-hp commented Nov 14, 2023

received the error: "detailedTx.GetParsedTransaction data is not in JSONParsed encoding"
Code:

            var maxUint uint64 = 0
            blockInfo, err := e.RpcClient.GetBlockWithOpts(context.Background(), fromBlock, &rpc.GetBlockOpts{
              MaxSupportedTransactionVersion: &maxUint,
            })
            for _, tx := range blockInfo.Transactions {
		txParsed, err := tx.GetParsedTransaction()
		if err != nil {
			fmt.Println("detailedTx.GetParsedTransaction", err)
			continue
		}			
	}
@0xvbetsun
Copy link

@elvis-hp This functionality is not fully implemented.
BTW, you can log an error instead of ignoring it, maybe it'll help you

blockInfo, err := e.RpcClient.GetBlockWithOpts(context.Background(), fromBlock, &rpc.GetBlockOpts{
    MaxSupportedTransactionVersion: &maxUint,
 })
+if err != nil {
+   log.Fatal(err)
+}

I'll have a couple of free hours this weekend, so I'll try to extend this functionality and add more options for parsing transactions with meta

@gagliardetto
Copy link
Owner

yep, the jsonParsed format is not implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants