@@ -738,51 +738,54 @@ func (t *TransactionsByPriceAndNonce) Pop() {
738738//
739739// NOTE: In a future PR this will be removed.
740740type Message struct {
741- to * common.Address
742- from common.Address
743- nonce uint64
744- amount * big.Int
745- gasLimit uint64
746- gasPrice * big.Int
747- gasFeeCap * big.Int
748- gasTipCap * big.Int
749- data []byte
750- accessList AccessList
751- dataHashes []common.Hash
752- isFake bool
753- }
754-
755- func NewMessage (from common.Address , to * common.Address , nonce uint64 , amount * big.Int , gasLimit uint64 , gasPrice , gasFeeCap , gasTipCap * big.Int , data []byte , accessList AccessList , dataHashes []common.Hash , isFake bool ) Message {
741+ to * common.Address
742+ from common.Address
743+ nonce uint64
744+ amount * big.Int
745+ gasLimit uint64
746+ gasPrice * big.Int
747+ gasFeeCap * big.Int
748+ gasTipCap * big.Int
749+ maxFeePerDataGas * big.Int
750+ data []byte
751+ accessList AccessList
752+ dataHashes []common.Hash
753+ isFake bool
754+ }
755+
756+ func NewMessage (from common.Address , to * common.Address , nonce uint64 , amount * big.Int , gasLimit uint64 , gasPrice , gasFeeCap , gasTipCap , maxFeePerDataGas * big.Int , data []byte , accessList AccessList , dataHashes []common.Hash , isFake bool ) Message {
756757 return Message {
757- from : from ,
758- to : to ,
759- nonce : nonce ,
760- amount : amount ,
761- gasLimit : gasLimit ,
762- gasPrice : gasPrice ,
763- gasFeeCap : gasFeeCap ,
764- gasTipCap : gasTipCap ,
765- data : data ,
766- accessList : accessList ,
767- dataHashes : dataHashes ,
768- isFake : isFake ,
758+ from : from ,
759+ to : to ,
760+ nonce : nonce ,
761+ amount : amount ,
762+ gasLimit : gasLimit ,
763+ gasPrice : gasPrice ,
764+ gasFeeCap : gasFeeCap ,
765+ gasTipCap : gasTipCap ,
766+ maxFeePerDataGas : maxFeePerDataGas ,
767+ data : data ,
768+ accessList : accessList ,
769+ dataHashes : dataHashes ,
770+ isFake : isFake ,
769771 }
770772}
771773
772774// AsMessage returns the transaction as a core.Message.
773775func (tx * Transaction ) AsMessage (s Signer , baseFee * big.Int ) (Message , error ) {
774776 msg := Message {
775- nonce : tx .Nonce (),
776- gasLimit : tx .Gas (),
777- gasPrice : new (big.Int ).Set (tx .GasPrice ()),
778- gasFeeCap : new (big.Int ).Set (tx .GasFeeCap ()),
779- gasTipCap : new (big.Int ).Set (tx .GasTipCap ()),
780- to : tx .To (),
781- amount : tx .Value (),
782- data : tx .Data (),
783- accessList : tx .AccessList (),
784- dataHashes : tx .DataHashes (),
785- isFake : false ,
777+ nonce : tx .Nonce (),
778+ gasLimit : tx .Gas (),
779+ gasPrice : new (big.Int ).Set (tx .GasPrice ()),
780+ gasFeeCap : new (big.Int ).Set (tx .GasFeeCap ()),
781+ gasTipCap : new (big.Int ).Set (tx .GasTipCap ()),
782+ maxFeePerDataGas : new (big.Int ).Set (tx .MaxFeePerDataGas ()),
783+ to : tx .To (),
784+ amount : tx .Value (),
785+ data : tx .Data (),
786+ accessList : tx .AccessList (),
787+ dataHashes : tx .DataHashes (),
788+ isFake : false ,
786789 }
787790 // If baseFee provided, set gasPrice to effectiveGasPrice.
788791 if baseFee != nil {
@@ -793,18 +796,19 @@ func (tx *Transaction) AsMessage(s Signer, baseFee *big.Int) (Message, error) {
793796 return msg , err
794797}
795798
796- func (m Message ) From () common.Address { return m .from }
797- func (m Message ) To () * common.Address { return m .to }
798- func (m Message ) GasPrice () * big.Int { return m .gasPrice }
799- func (m Message ) GasFeeCap () * big.Int { return m .gasFeeCap }
800- func (m Message ) GasTipCap () * big.Int { return m .gasTipCap }
801- func (m Message ) Value () * big.Int { return m .amount }
802- func (m Message ) Gas () uint64 { return m .gasLimit }
803- func (m Message ) Nonce () uint64 { return m .nonce }
804- func (m Message ) Data () []byte { return m .data }
805- func (m Message ) AccessList () AccessList { return m .accessList }
806- func (m Message ) DataHashes () []common.Hash { return m .dataHashes }
807- func (m Message ) IsFake () bool { return m .isFake }
799+ func (m Message ) From () common.Address { return m .from }
800+ func (m Message ) To () * common.Address { return m .to }
801+ func (m Message ) GasPrice () * big.Int { return m .gasPrice }
802+ func (m Message ) GasFeeCap () * big.Int { return m .gasFeeCap }
803+ func (m Message ) GasTipCap () * big.Int { return m .gasTipCap }
804+ func (m Message ) MaxFeePerDataGas () * big.Int { return m .maxFeePerDataGas }
805+ func (m Message ) Value () * big.Int { return m .amount }
806+ func (m Message ) Gas () uint64 { return m .gasLimit }
807+ func (m Message ) Nonce () uint64 { return m .nonce }
808+ func (m Message ) Data () []byte { return m .data }
809+ func (m Message ) AccessList () AccessList { return m .accessList }
810+ func (m Message ) DataHashes () []common.Hash { return m .dataHashes }
811+ func (m Message ) IsFake () bool { return m .isFake }
808812
809813// copyAddressPtr copies an address.
810814func copyAddressPtr (a * common.Address ) * common.Address {
0 commit comments