Skip to content

Commit 64e8795

Browse files
chore: add eth_getBlockReceipts method to OpenRPC definitions (#3792)
Signed-off-by: Michał Walczak <[email protected]> Co-authored-by: konstantinabl <[email protected]>
1 parent 0dc6105 commit 64e8795

File tree

1 file changed

+62
-6
lines changed

1 file changed

+62
-6
lines changed

docs/openrpc.json

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,36 @@
342342
}
343343
}
344344
},
345+
{
346+
"name": "eth_getBlockReceipts",
347+
"summary": "Returns the receipts of a block by number or hash.",
348+
"params": [
349+
{
350+
"name": "Block",
351+
"required": true,
352+
"schema": {
353+
"$ref": "#/components/schemas/BlockNumberOrTagOrHash"
354+
}
355+
}
356+
],
357+
"result": {
358+
"name": "Receipts information",
359+
"schema": {
360+
"oneOf": [
361+
{
362+
"$ref": "#/components/schemas/notFound"
363+
},
364+
{
365+
"title": "Receipts information",
366+
"type": "array",
367+
"items": {
368+
"$ref": "#/components/schemas/ReceiptInfo"
369+
}
370+
}
371+
]
372+
}
373+
}
374+
},
345375
{
346376
"name": "eth_getBlockTransactionCountByHash",
347377
"summary": "Returns the number of transactions in a block from a block matching the given block hash.",
@@ -1356,6 +1386,10 @@
13561386
},
13571387
"required": ["from", "gas", "input"]
13581388
},
1389+
"notFound": {
1390+
"title": "Not Found (null)",
1391+
"type": "null"
1392+
},
13591393
"Block": {
13601394
"title": "Block object",
13611395
"type": "object",
@@ -1508,7 +1542,7 @@
15081542
]
15091543
},
15101544
"BlockNumberOrTagOrHash": {
1511-
"title": "Block number or tag",
1545+
"title": "Block number, tag, or block hash",
15121546
"oneOf": [
15131547
{
15141548
"title": "Block number",
@@ -1885,7 +1919,7 @@
18851919
},
18861920
"ReceiptInfo": {
18871921
"type": "object",
1888-
"title": "Receipt info",
1922+
"title": "Receipt information",
18891923
"required": [
18901924
"blockHash",
18911925
"blockNumber",
@@ -1898,7 +1932,12 @@
18981932
"transactionIndex",
18991933
"effectiveGasPrice"
19001934
],
1935+
"additionalProperties": false,
19011936
"properties": {
1937+
"type": {
1938+
"title": "type",
1939+
"$ref": "#/components/schemas/byte"
1940+
},
19021941
"transactionHash": {
19031942
"title": "transaction hash",
19041943
"$ref": "#/components/schemas/hash32"
@@ -1922,7 +1961,16 @@
19221961
"to": {
19231962
"title": "to",
19241963
"description": "Address of the receiver or null in a contract creation transaction.",
1925-
"$ref": "#/components/schemas/address"
1964+
"oneOf": [
1965+
{
1966+
"title": "Contract Creation (null)",
1967+
"type": "null"
1968+
},
1969+
{
1970+
"title": "Recipient Address",
1971+
"$ref": "#/components/schemas/address"
1972+
}
1973+
]
19261974
},
19271975
"cumulativeGasUsed": {
19281976
"title": "cumulative gas used",
@@ -1937,7 +1985,15 @@
19371985
"contractAddress": {
19381986
"title": "contract address",
19391987
"description": "The contract address created, if the transaction was a contract creation, otherwise null.",
1940-
"$ref": "#/components/schemas/address"
1988+
"oneOf": [
1989+
{
1990+
"$ref": "#/components/schemas/address"
1991+
},
1992+
{
1993+
"title": "Null",
1994+
"type": "null"
1995+
}
1996+
]
19411997
},
19421998
"logs": {
19431999
"title": "logs",
@@ -1953,7 +2009,7 @@
19532009
"root": {
19542010
"title": "state root",
19552011
"description": "The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.",
1956-
"$ref": "#/components/schemas/bytes32"
2012+
"$ref": "#/components/schemas/hash32"
19572013
},
19582014
"status": {
19592015
"title": "status",
@@ -1962,7 +2018,7 @@
19622018
},
19632019
"effectiveGasPrice": {
19642020
"title": "effective gas price",
1965-
"description": "The actual value per gas deducted from the senders account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).",
2021+
"description": "The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).",
19662022
"$ref": "#/components/schemas/uint"
19672023
}
19682024
}

0 commit comments

Comments
 (0)