From 351e01ff58f70ea10421e90924e8ff2e715fb50a Mon Sep 17 00:00:00 2001 From: jsvisa Date: Mon, 14 Oct 2024 16:30:51 +0800 Subject: [PATCH] Revert "eth/tracers: rm the flatCall's notused CreationMethod" This reverts commit 2792a54adeb02032f7eace0032755c9225f75fa5. Signed-off-by: jsvisa --- eth/tracers/native/call_flat.go | 1 + eth/tracers/native/gen_flatcallaction_json.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/eth/tracers/native/call_flat.go b/eth/tracers/native/call_flat.go index 14fe124eec..b7cc60b096 100644 --- a/eth/tracers/native/call_flat.go +++ b/eth/tracers/native/call_flat.go @@ -79,6 +79,7 @@ type flatCallAction struct { SelfDestructed *common.Address `json:"address,omitempty"` Balance *big.Int `json:"balance,omitempty"` CallType string `json:"callType,omitempty"` + CreationMethod string `json:"creationMethod,omitempty"` From *common.Address `json:"from,omitempty"` Gas *uint64 `json:"gas,omitempty"` Init *[]byte `json:"init,omitempty"` diff --git a/eth/tracers/native/gen_flatcallaction_json.go b/eth/tracers/native/gen_flatcallaction_json.go index cb6b465aba..c075606983 100644 --- a/eth/tracers/native/gen_flatcallaction_json.go +++ b/eth/tracers/native/gen_flatcallaction_json.go @@ -20,6 +20,7 @@ func (f flatCallAction) MarshalJSON() ([]byte, error) { SelfDestructed *common.Address `json:"address,omitempty"` Balance *hexutil.Big `json:"balance,omitempty"` CallType string `json:"callType,omitempty"` + CreationMethod string `json:"creationMethod,omitempty"` From *common.Address `json:"from,omitempty"` Gas *hexutil.Uint64 `json:"gas,omitempty"` Init *hexutil.Bytes `json:"init,omitempty"` @@ -34,6 +35,7 @@ func (f flatCallAction) MarshalJSON() ([]byte, error) { enc.SelfDestructed = f.SelfDestructed enc.Balance = (*hexutil.Big)(f.Balance) enc.CallType = f.CallType + enc.CreationMethod = f.CreationMethod enc.From = f.From enc.Gas = (*hexutil.Uint64)(f.Gas) enc.Init = (*hexutil.Bytes)(f.Init) @@ -52,6 +54,7 @@ func (f *flatCallAction) UnmarshalJSON(input []byte) error { SelfDestructed *common.Address `json:"address,omitempty"` Balance *hexutil.Big `json:"balance,omitempty"` CallType *string `json:"callType,omitempty"` + CreationMethod *string `json:"creationMethod,omitempty"` From *common.Address `json:"from,omitempty"` Gas *hexutil.Uint64 `json:"gas,omitempty"` Init *hexutil.Bytes `json:"init,omitempty"` @@ -79,6 +82,9 @@ func (f *flatCallAction) UnmarshalJSON(input []byte) error { if dec.CallType != nil { f.CallType = *dec.CallType } + if dec.CreationMethod != nil { + f.CreationMethod = *dec.CreationMethod + } if dec.From != nil { f.From = dec.From }