core/types: add "chainID" field to legacy tx JSON encoding (#27452)
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
This commit is contained in:
parent
f3314bb6df
commit
8bbaf882a6
@ -69,6 +69,9 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) {
|
||||
enc.V = (*hexutil.Big)(itx.V)
|
||||
enc.R = (*hexutil.Big)(itx.R)
|
||||
enc.S = (*hexutil.Big)(itx.S)
|
||||
if tx.Protected() {
|
||||
enc.ChainID = (*hexutil.Big)(tx.ChainId())
|
||||
}
|
||||
|
||||
case *AccessListTx:
|
||||
enc.ChainID = (*hexutil.Big)(itx.ChainID)
|
||||
|
Loading…
Reference in New Issue
Block a user