@@ -24,6 +24,7 @@ import (
2424 "math/bits"
2525
2626 "github.com/holiman/uint256"
27+
2728 "github.com/ledgerwatch/erigon-lib/chain"
2829 libcommon "github.com/ledgerwatch/erigon-lib/common"
2930 types2 "github.com/ledgerwatch/erigon-lib/types"
@@ -35,6 +36,7 @@ import (
3536
3637type DynamicFeeTransaction struct {
3738 CommonTx
39+ ChainID * uint256.Int
3840 Tip * uint256.Int
3941 FeeCap * uint256.Int
4042 AccessList types2.AccessList
@@ -78,14 +80,14 @@ func (tx DynamicFeeTransaction) copy() *DynamicFeeTransaction {
7880 TransactionMisc : TransactionMisc {
7981 time : tx .time ,
8082 },
81- ChainID : new (uint256.Int ),
82- Nonce : tx .Nonce ,
83- To : tx .To , // TODO: copy pointed-to address
84- Data : common .CopyBytes (tx .Data ),
85- Gas : tx .Gas ,
83+ Nonce : tx .Nonce ,
84+ To : tx .To , // TODO: copy pointed-to address
85+ Data : common .CopyBytes (tx .Data ),
86+ Gas : tx .Gas ,
8687 // These are copied below.
8788 Value : new (uint256.Int ),
8889 },
90+ ChainID : new (uint256.Int ),
8991 AccessList : make (types2.AccessList , len (tx .AccessList )),
9092 Tip : new (uint256.Int ),
9193 FeeCap : new (uint256.Int ),
@@ -471,14 +473,14 @@ func (tx *DynamicFeeTransaction) Sender(signer Signer) (libcommon.Address, error
471473func NewEIP1559Transaction (chainID uint256.Int , nonce uint64 , to libcommon.Address , amount * uint256.Int , gasLimit uint64 , gasPrice * uint256.Int , gasTip * uint256.Int , gasFeeCap * uint256.Int , data []byte ) * DynamicFeeTransaction {
472474 return & DynamicFeeTransaction {
473475 CommonTx : CommonTx {
474- ChainID : & chainID ,
475- Nonce : nonce ,
476- To : & to ,
477- Value : amount ,
478- Gas : gasLimit ,
479- Data : data ,
476+ Nonce : nonce ,
477+ To : & to ,
478+ Value : amount ,
479+ Gas : gasLimit ,
480+ Data : data ,
480481 },
481- Tip : gasTip ,
482- FeeCap : gasFeeCap ,
482+ ChainID : & chainID ,
483+ Tip : gasTip ,
484+ FeeCap : gasFeeCap ,
483485 }
484486}
0 commit comments