Skip to content

Commit c04febb

Browse files
Redidacoveemlautarom1lightclientfjl
authored
add EIP-7702 transactions and receipts (#575)
--------- Co-authored-by: Lautaro Emanuel <31224949+emlautarom1@users.noreply.github.com> Co-authored-by: lightclient <lightclient@protonmail.com> Co-authored-by: Felix Lange <fjl@twurst.com>
1 parent f6a6f52 commit c04febb

File tree

1 file changed

+137
-7
lines changed

1 file changed

+137
-7
lines changed

src/schemas/transaction.yaml

Lines changed: 137 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,94 @@
1+
Transaction7702Unsigned:
2+
type: object
3+
title: EIP-7702 transaction
4+
required:
5+
- type
6+
- nonce
7+
- to
8+
- gas
9+
- value
10+
- input
11+
- maxPriorityFeePerGas
12+
- maxFeePerGas
13+
- accessList
14+
- chainId
15+
- authorizationList
16+
properties:
17+
type:
18+
title: type
19+
type: string
20+
pattern: ^0x4$
21+
nonce:
22+
title: nonce
23+
$ref: '#/components/schemas/uint'
24+
to:
25+
title: to address
26+
$ref: '#/components/schemas/address'
27+
gas:
28+
title: gas limit
29+
$ref: '#/components/schemas/uint'
30+
value:
31+
title: value
32+
$ref: '#/components/schemas/uint'
33+
input:
34+
title: input data
35+
$ref: '#/components/schemas/bytes'
36+
maxPriorityFeePerGas:
37+
title: max priority fee per gas
38+
description: Maximum fee per gas the sender is willing to pay to miners in wei
39+
$ref: '#/components/schemas/uint'
40+
maxFeePerGas:
41+
title: max fee per gas
42+
description: The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei
43+
$ref: '#/components/schemas/uint'
44+
gasPrice:
45+
title: gas price
46+
description: The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.
47+
$ref: '#/components/schemas/uint'
48+
accessList:
49+
title: accessList
50+
description: EIP-2930 access lists
51+
$ref: '#/components/schemas/AccessList'
52+
chainId:
53+
title: chainId
54+
description: Chain ID that this transaction is valid on
55+
$ref: '#/components/schemas/uint'
56+
authorizationList:
57+
title: authorizationList
58+
$ref: '#/components/schemas/AuthorizationList'
59+
AuthorizationList:
60+
title: Authorization List
61+
description: List of authorizations for the transaction
62+
type: array
63+
items:
64+
type: object
65+
properties:
66+
chainId:
67+
title: chainId
68+
description: Chain ID on which this transaction is valid
69+
$ref: '#/components/schemas/uint'
70+
nonce:
71+
title: nonce
72+
$ref: '#/components/schemas/uint'
73+
address:
74+
$ref: '#/components/schemas/address'
75+
yParity:
76+
title: yParity
77+
description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature
78+
$ref: '#/components/schemas/byte'
79+
r:
80+
title: r
81+
$ref: '#/components/schemas/uint256'
82+
s:
83+
title: s
84+
$ref: '#/components/schemas/uint256'
85+
required:
86+
- chainId
87+
- nonce
88+
- address
89+
- yParity
90+
- r
91+
- s
192
Transaction4844Unsigned:
293
type: object
394
title: EIP-4844 transaction.
@@ -46,19 +137,23 @@ Transaction4844Unsigned:
46137
title: max fee per blob gas
47138
description: The maximum total fee per gas the sender is willing to pay for blob gas in wei
48139
$ref: '#/components/schemas/uint'
140+
gasPrice:
141+
title: gas price
142+
description: The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.
143+
$ref: '#/components/schemas/uint'
49144
accessList:
50145
title: accessList
51146
description: EIP-2930 access list
52147
$ref: '#/components/schemas/AccessList'
53148
blobVersionedHashes:
54149
title: blobVersionedHashes
55-
description: List of versioned blob hashes associated with the transaction's EIP-4844 data blobs.
150+
description: List of versioned blob hashes associated with the transaction's EIP-4844 data blobs
56151
type: array
57152
items:
58153
$ref: '#/components/schemas/hash32'
59154
chainId:
60155
title: chainId
61-
description: Chain ID that this transaction is valid on.
156+
description: Chain ID that this transaction is valid on
62157
$ref: '#/components/schemas/uint'
63158
AccessListEntry:
64159
title: Access list entry
@@ -229,10 +324,36 @@ TransactionLegacyUnsigned:
229324
$ref: '#/components/schemas/uint'
230325
TransactionUnsigned:
231326
oneOf:
327+
- $ref: '#/components/schemas/Transaction7702Unsigned'
232328
- $ref: '#/components/schemas/Transaction4844Unsigned'
233329
- $ref: '#/components/schemas/Transaction1559Unsigned'
234330
- $ref: '#/components/schemas/Transaction2930Unsigned'
235331
- $ref: '#/components/schemas/TransactionLegacyUnsigned'
332+
Transaction7702Signed:
333+
title: Signed 7702 Transaction
334+
type: object
335+
allOf:
336+
- $ref: '#/components/schemas/Transaction7702Unsigned'
337+
- title: EIP-7702 transaction signature properties.
338+
required:
339+
- yParity
340+
- r
341+
- s
342+
properties:
343+
yParity:
344+
title: yParity
345+
description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
346+
$ref: '#/components/schemas/byte'
347+
v:
348+
title: v
349+
description: For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.
350+
$ref: '#/components/schemas/byte'
351+
r:
352+
title: r
353+
$ref: '#/components/schemas/uint'
354+
s:
355+
title: s
356+
$ref: '#/components/schemas/uint'
236357
Transaction4844Signed:
237358
title: Signed 4844 Transaction
238359
type: object
@@ -247,7 +368,11 @@ Transaction4844Signed:
247368
yParity:
248369
title: yParity
249370
description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
250-
$ref: '#/components/schemas/uint'
371+
$ref: '#/components/schemas/byte'
372+
v:
373+
title: v
374+
description: For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.
375+
$ref: '#/components/schemas/byte'
251376
r:
252377
title: r
253378
$ref: '#/components/schemas/uint'
@@ -268,11 +393,11 @@ Transaction1559Signed:
268393
yParity:
269394
title: yParity
270395
description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
271-
$ref: '#/components/schemas/uint'
396+
$ref: '#/components/schemas/byte'
272397
v:
273398
title: v
274399
description: For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.
275-
$ref: '#/components/schemas/uint'
400+
$ref: '#/components/schemas/byte'
276401
r:
277402
title: r
278403
$ref: '#/components/schemas/uint'
@@ -293,11 +418,11 @@ Transaction2930Signed:
293418
yParity:
294419
title: yParity
295420
description: The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.
296-
$ref: '#/components/schemas/uint'
421+
$ref: '#/components/schemas/byte'
297422
v:
298423
title: v
299424
description: For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.
300-
$ref: '#/components/schemas/uint'
425+
$ref: '#/components/schemas/byte'
301426
r:
302427
title: r
303428
$ref: '#/components/schemas/uint'
@@ -326,6 +451,7 @@ TransactionLegacySigned:
326451
$ref: '#/components/schemas/uint'
327452
TransactionSigned:
328453
oneOf:
454+
- $ref: '#/components/schemas/Transaction7702Signed'
329455
- $ref: '#/components/schemas/Transaction4844Signed'
330456
- $ref: '#/components/schemas/Transaction1559Signed'
331457
- $ref: '#/components/schemas/Transaction2930Signed'
@@ -425,3 +551,7 @@ GenericTransaction:
425551
title: chainId
426552
description: Chain ID that this transaction is valid on.
427553
$ref: '#/components/schemas/uint'
554+
authorizationList:
555+
title: authorizationList
556+
description: EIP-7702 authorization list
557+
$ref: '#/components/schemas/AuthorizationList'

0 commit comments

Comments
 (0)