From 990e92f1b213144c094a83132a9733c1199015b4 Mon Sep 17 00:00:00 2001 From: Rian Hughes Date: Wed, 22 Nov 2023 17:12:25 +0300 Subject: [PATCH] Rpcv06 trace file (#471) * rpcv06 incorporate updates from trace_api_openrpc.json * add CallType enum --- rpc/types_trace.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rpc/types_trace.go b/rpc/types_trace.go index 5c84c22a..3a98588c 100644 --- a/rpc/types_trace.go +++ b/rpc/types_trace.go @@ -65,6 +65,7 @@ type DeployAccountTxnTrace struct { type L1HandlerTxnTrace struct { //the trace of the __execute__ call or constructor call, depending on the transaction type (none for declare transactions) FunctionInvocation FnInvocation `json:"function_invocation"` + StateDiff StateDiff `json:"state_diff"` Type TransactionType `json:"type"` } @@ -79,8 +80,9 @@ const ( type CallType string const ( - LibraryCall CallType = "LIBRARY_CALL" - Call CallType = "CALL" + CallTypeLibraryCall CallType = "LIBRARY_CALL" + CallTypeCall CallType = "CALL" + CallTypeDelegate CallType = "DELEGATE" ) type FnInvocation struct { @@ -107,6 +109,9 @@ type FnInvocation struct { // The messages sent by this invocation to L1 L1Messages []OrderedMsg `json:"messages"` + + // Resources consumed by the internal call + ExecutionResources ExecutionResources `json:"execution_resources"` } // A single pair of transaction hash and corresponding trace