Skip to content

Commit 7de20af

Browse files
authored
rm EIP-7873 support (#206)
1 parent 8460999 commit 7de20af

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

web3/eth_api_types.nim

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ type
7171
# EIP-7702
7272
authorizationList*: Opt[seq[Authorization]]
7373

74-
# EIP-7873
75-
initCodes*: Opt[seq[seq[byte]]]
76-
7774
## A block header object
7875
BlockHeader* = ref object
7976
number*: Quantity
@@ -169,7 +166,6 @@ type
169166
maxFeePerBlobGas*: Opt[UInt256] # EIP-4844
170167
blobVersionedHashes*: Opt[seq[VersionedHash]] # EIP-4844
171168
authorizationList*: Opt[seq[Authorization]] # EIP-7702
172-
initCodes*: Opt[seq[seq[byte]]] # EIP-7873
173169

174170
ReceiptObject* = ref object # A transaction receipt object, or null when no receipt was found:
175171
transactionHash*: Hash32 # hash of the transaction.

web3/transaction_signing.nim

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
11497
func 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

129110
func 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

Comments
 (0)