@@ -94,23 +94,6 @@ func encodeTransactionEip7702(s: TransactionArgs, pk: PrivateKey): seq[byte] =
9494 tr.authorizationList = s.authorizationList.value
9595 rlp.encode (tr)
9696
97- func encodeTransactionEip7873 (s: TransactionArgs , pk: PrivateKey ): seq [byte ] =
98- var tr = Transaction (txType: TxEip7873 )
99- tr.gasLimit = s.gas.get (0 .Quantity ).GasInt
100- tr.maxPriorityFeePerGas = s.maxPriorityFeePerGas.get (0 .Quantity ).GasInt
101- tr.maxFeePerGas = s.maxFeePerGas.get (0 .Quantity ).GasInt
102- tr.to = s.to
103- if s.value.isSome:
104- tr.value = s.value.value
105- tr.nonce = uint64 (s.nonce.get (0 .Quantity ))
106- tr.payload = s.payload
107- tr.chainId = s.chainId.get (0 .u256)
108- tr.signature = tr.sign (pk, true )
109- if s.accessList.isSome:
110- tr.accessList = s.accessList.value
111- tr.initCodes = s.initCodes.value
112- rlp.encode (tr)
113-
11497func encodeTransaction * (s: TransactionArgs , pk: PrivateKey , txType: TxType ): seq [byte ] =
11598 case txType
11699 of TxLegacy :
@@ -123,12 +106,8 @@ func encodeTransaction*(s: TransactionArgs, pk: PrivateKey, txType: TxType): seq
123106 encodeTransactionEip4844 (s, pk)
124107 of TxEip7702 :
125108 encodeTransactionEip7702 (s, pk)
126- of TxEip7873 :
127- encodeTransactionEip7873 (s, pk)
128109
129110func txType (s: TransactionArgs ): TxType =
130- if s.initCodes.isSome:
131- return TxEip7873
132111 if s.authorizationList.isSome:
133112 return TxEip7702
134113 if s.blobVersionedHashes.isSome:
0 commit comments