From 11ba4b92c40131f24e5b43db7eda91bda013b907 Mon Sep 17 00:00:00 2001 From: ddomeke Date: Thu, 5 Jun 2025 12:51:45 +0300 Subject: [PATCH 1/2] TraceCallTransaction fields changed --- etherclient/extras.go | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/etherclient/extras.go b/etherclient/extras.go index bb9875e..1cf9fdd 100644 --- a/etherclient/extras.go +++ b/etherclient/extras.go @@ -20,12 +20,20 @@ import ( // TraceCallTransaction contains the fields of the to-be-simulated transaction. type TraceCallTransaction struct { - From string `json:"from"` - To string `json:"to,omitempty"` - Gas *hexutil.Big `json:"gas,omitempty"` - GasPrice *hexutil.Big `json:"gasPrice,omitempty"` - Value *hexutil.Big `json:"value,omitempty"` - Data string `json:"data"` + From *common.Address `json:"from"` + To *common.Address `json:"to"` + Gas *hexutil.Uint64 `json:"gas"` + GasPrice *hexutil.Big `json:"gasPrice"` + MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"` + MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"` + Value *hexutil.Big `json:"value"` + Nonce *hexutil.Uint64 `json:"nonce"` + + // We accept "data" and "input" for backwards-compatibility reasons. + // "input" is the newer name and should be preferred by clients. + // Issue detail: https://github.com/ethereum/go-ethereum/issues/15628 + Data *hexutil.Bytes `json:"data"` + Input *hexutil.Bytes `json:"input"` // Introduced by AccessListTxType transaction. AccessList *gethtypes.AccessList `json:"accessList,omitempty"` From 680f33099dc230084559bea36a106fa83959323e Mon Sep 17 00:00:00 2001 From: ddomeke Date: Thu, 5 Jun 2025 12:56:18 +0300 Subject: [PATCH 2/2] omitempties added --- etherclient/extras.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etherclient/extras.go b/etherclient/extras.go index 1cf9fdd..7512485 100644 --- a/etherclient/extras.go +++ b/etherclient/extras.go @@ -21,12 +21,12 @@ import ( // TraceCallTransaction contains the fields of the to-be-simulated transaction. type TraceCallTransaction struct { From *common.Address `json:"from"` - To *common.Address `json:"to"` - Gas *hexutil.Uint64 `json:"gas"` - GasPrice *hexutil.Big `json:"gasPrice"` - MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"` - MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"` - Value *hexutil.Big `json:"value"` + To *common.Address `json:"to,omitempty"` + Gas *hexutil.Uint64 `json:"gas,omitempty"` + GasPrice *hexutil.Big `json:"gasPrice,omitempty"` + MaxFeePerGas *hexutil.Big `json:"maxFeePerGas,omitempty"` + MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas,omitempty"` + Value *hexutil.Big `json:"value,omitempty"` Nonce *hexutil.Uint64 `json:"nonce"` // We accept "data" and "input" for backwards-compatibility reasons.