GetExecutionResultForBlockID Access API Method
Parameters
BlockId
string
REQUIRED
The ID of the block for which the execution result is retrieved
Returns
execution_result
object
An object representing the execution result, containing the following properties:
previous_result_id
string
The ID of the previous execution result
block_id
string
The ID of the block associated with the execution result
chunks
array
A list of chunks containing the execution result data. Each chunk has the following properties:
start_state
string
The starting state of the chunk
event_collection
string
The collection of events associated with the chunk
block_id
string
The ID of the block associated with the chunk
number_of_transactions
integer
The number of transactions in the chunk
end_state
string
The ending state of the chunk
execution_data_id
string
The ID of the execution data
Request
1package main23import (4"context"5"encoding/hex"6"encoding/json"7"fmt"8"log"910"github.com/onflow/flow/protobuf/go/flow/access"11)1213func main() {1415// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.16client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17ctx := context.Background()18if err != null {19log.Fatalf("err: %v", err)20}2122blockid, err := hex.DecodeString("32e10a29b636e6c226183779ef4f8292975af0a6c3c6762c44c9da2c99a38953")23if err != null {24log.Fatalf("err: %v", err)25}2627// get execution result for block ID28execResp, err := client.GetExecutionResultForBlockID(ctx, &access.GetExecutionResultForBlockIDRequest{BlockId: blockid})29if err != null {30log.Fatal("Get Execution Result for Block ID failed: ", err)31}32respJSON, err := json.Marshal(execResp)33if err != null {34log.Fatal("err: ", err)35}36fmt.Println("GetExecutionResultForBlockID response:", string(respJSON))3738}39
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free