GetExecutionResultForBlockID Access API Method
Parameters
BlockId
string
REQUIRED
Loading...
Returns
execution_result
object
Loading...
previous_result_id
string
Loading...
block_id
string
Loading...
chunks
array
Loading...
start_state
string
Loading...
event_collection
string
Loading...
block_id
string
Loading...
number_of_transactions
integer
Loading...
end_state
string
Loading...
execution_data_id
string
Loading...
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 != nil {19log.Fatalf("err: %v", err)20}2122blockid, err := hex.DecodeString("32e10a29b636e6c226183779ef4f8292975af0a6c3c6762c44c9da2c99a38953")23if err != nil {24log.Fatalf("err: %v", err)25}2627// get execution result for block ID28execResp, err := client.GetExecutionResultForBlockID(ctx, &access.GetExecutionResultForBlockIDRequest{BlockId: blockid})29if err != nil {30log.Fatal("Get Execution Result for Block ID failed: ", err)31}32respJSON, err := json.Marshal(execResp)33if err != nil {34log.Fatal("err: ", err)35}36fmt.Println("GetExecutionResultForBlockID response:", string(respJSON))3738}39
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 != nil {19log.Fatalf("err: %v", err)20}2122blockid, err := hex.DecodeString("32e10a29b636e6c226183779ef4f8292975af0a6c3c6762c44c9da2c99a38953")23if err != nil {24log.Fatalf("err: %v", err)25}2627// get execution result for block ID28execResp, err := client.GetExecutionResultForBlockID(ctx, &access.GetExecutionResultForBlockIDRequest{BlockId: blockid})29if err != nil {30log.Fatal("Get Execution Result for Block ID failed: ", err)31}32respJSON, err := json.Marshal(execResp)33if err != nil {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