Skip to content

Commit 49f0b9d

Browse files
committed
fix(jsonrpc): report 256-bit integer fields in OpenRPC specification
Added 'UnsignedInteger256' schema for uint256 reference it in field 'Voucher.value'. Updated these 'EvmAdvance' uint256 fields to reference 'UnsignedInteger256': - chain_id - block_number - block_timestamp - prev_randao Kept 'EvmAdvance.index' and other genuine uint64 indexes on 'UnsignedInteger'.
1 parent 4627556 commit 49f0b9d

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

internal/jsonrpc/jsonrpc-discover.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,7 +1956,7 @@
19561956
"type": "object",
19571957
"properties": {
19581958
"chain_id": {
1959-
"$ref": "#/components/schemas/UnsignedInteger"
1959+
"$ref": "#/components/schemas/UnsignedInteger256"
19601960
},
19611961
"application_contract": {
19621962
"$ref": "#/components/schemas/EthereumAddress"
@@ -1965,13 +1965,13 @@
19651965
"$ref": "#/components/schemas/EthereumAddress"
19661966
},
19671967
"block_number": {
1968-
"$ref": "#/components/schemas/UnsignedInteger"
1968+
"$ref": "#/components/schemas/UnsignedInteger256"
19691969
},
19701970
"block_timestamp": {
1971-
"$ref": "#/components/schemas/UnsignedInteger"
1971+
"$ref": "#/components/schemas/UnsignedInteger256"
19721972
},
19731973
"prev_randao": {
1974-
"$ref": "#/components/schemas/ByteArray"
1974+
"$ref": "#/components/schemas/UnsignedInteger256"
19751975
},
19761976
"index": {
19771977
"$ref": "#/components/schemas/UnsignedInteger"
@@ -2104,7 +2104,8 @@
21042104
"$ref": "#/components/schemas/EthereumAddress"
21052105
},
21062106
"value": {
2107-
"type": "string"
2107+
"$ref": "#/components/schemas/UnsignedInteger256",
2108+
"description": "Amount of Wei transferred by the voucher's call"
21082109
},
21092110
"payload": {
21102111
"$ref": "#/components/schemas/ByteArray"
@@ -2441,6 +2442,12 @@
24412442
"format": "hex-uint64",
24422443
"pattern": "^0x[a-fA-F0-9]{1,16}$"
24432444
},
2445+
"UnsignedInteger256": {
2446+
"type": "string",
2447+
"format": "hex-uint256",
2448+
"pattern": "^0x[a-fA-F0-9]{1,64}$",
2449+
"description": "256-bit unsigned integer, hex encoded (the node emits minimal hex)"
2450+
},
24442451
"FunctionSelector": {
24452452
"type": "string",
24462453
"format": "hex-byte",

0 commit comments

Comments
 (0)