Skip to content

Commit b698ddd

Browse files
Merge pull request #297 from thiagodeev/docs/update-unsigned-integer-descriptions
Docs/update unsigned integer descriptions
2 parents 94a3d13 + 53ba0bf commit b698ddd

File tree

3 files changed

+36
-20
lines changed

3 files changed

+36
-20
lines changed

api/starknet_api_openrpc.json

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,20 +1272,20 @@
12721272
},
12731273
"NUM_AS_HEX": {
12741274
"title": "Number as hex",
1275-
"description": "An integer number in hex format (0x...)",
1275+
"description": "An unsigned integer number in hex format (0x...)",
12761276
"type": "string",
12771277
"pattern": "^0x[a-fA-F0-9]+$"
12781278
},
12791279
"u64": {
12801280
"type": "string",
12811281
"title": "u64",
1282-
"description": "64 bit integers, represented by hex string of length at most 16",
1282+
"description": "64 bit unsigned integers, represented by hex string of length at most 16",
12831283
"pattern": "^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,15})$"
12841284
},
12851285
"u128": {
12861286
"type": "string",
12871287
"title": "u128",
1288-
"description": "128 bit integers, represented by hex string of length at most 32",
1288+
"description": "128 bit unsigned integers, represented by hex string of length at most 32",
12891289
"pattern": "^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,31})$"
12901290
},
12911291
"CHAIN_ID": {
@@ -3298,7 +3298,8 @@
32983298
"function_idx": {
32993299
"title": "Function index",
33003300
"description": "The index of the function in the program",
3301-
"type": "integer"
3301+
"type": "integer",
3302+
"minimum": 0
33023303
}
33033304
},
33043305
"required": ["selector", "function_idx"]
@@ -3384,7 +3385,8 @@
33843385
"offset": {
33853386
"title": "Offset",
33863387
"description": "offset of this property within the struct",
3387-
"type": "integer"
3388+
"type": "integer",
3389+
"minimum": 0
33883390
}
33893391
}
33903392
}
@@ -3676,17 +3678,20 @@
36763678
"l1_gas": {
36773679
"title": "L1Gas",
36783680
"description": "l1 gas consumed by this transaction, used for l2-->l1 messages and state updates if blobs are not used",
3679-
"type": "integer"
3681+
"type": "integer",
3682+
"minimum": 0
36803683
},
36813684
"l1_data_gas": {
36823685
"title": "L1DataGas",
36833686
"description": "data gas consumed by this transaction, 0 if blobs are not used",
3684-
"type": "integer"
3687+
"type": "integer",
3688+
"minimum": 0
36853689
},
36863690
"l2_gas": {
36873691
"title": "L2Gas",
36883692
"description": "l2 gas consumed by this transaction, used for computation and calldata",
3689-
"type": "integer"
3693+
"type": "integer",
3694+
"minimum": 0
36903695
}
36913696
},
36923697
"required": ["l1_gas", "l1_data_gas", "l2_gas"]
@@ -3723,12 +3728,13 @@
37233728
"description": "represents a path to the highest non-zero descendant node",
37243729
"properties": {
37253730
"path": {
3726-
"description": "an integer whose binary representation represents the path from the current node to its highest non-zero descendant (bounded by 2^251)",
3731+
"description": "an unsigned integer whose binary representation represents the path from the current node to its highest non-zero descendant (bounded by 2^251)",
37273732
"$ref": "#/components/schemas/NUM_AS_HEX"
37283733
},
37293734
"length": {
37303735
"description": "the length of the path (bounded by 251)",
3731-
"type": "integer"
3736+
"type": "integer",
3737+
"minimum": 0
37323738
},
37333739
"child": {
37343740
"description": "the hash of the unique non-zero maximal-height descendant node",
@@ -3859,7 +3865,8 @@
38593865
"transaction_index": {
38603866
"title": "Transaction index",
38613867
"description": "The index of the first transaction failing in a sequence of given transactions",
3862-
"type": "integer"
3868+
"type": "integer",
3869+
"minimum": 0
38633870
},
38643871
"execution_error": {
38653872
"title": "revert error",

api/starknet_executables.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@
9393
"items": {
9494
"oneOf": [
9595
{
96-
"type": "integer"
96+
"type": "integer",
97+
"minimum": 0
9798
},
9899
{
99100
"type": "array",
@@ -111,7 +112,8 @@
111112
"type": "array",
112113
"description": "a list of sizes of segments in the bytecode, each segment is hashed individually when computing the bytecode hash",
113114
"items": {
114-
"type": "integer"
115+
"type": "integer",
116+
"minimum": 0
115117
}
116118
}
117119
},
@@ -129,7 +131,8 @@
129131
"offset": {
130132
"title": "Offset",
131133
"description": "The offset of the entry point in the program",
132-
"type": "integer"
134+
"type": "integer",
135+
"minimum": 0
133136
},
134137
"selector": {
135138
"title": "Selector",
@@ -154,7 +157,8 @@
154157
"enum": ["AP", "FP"]
155158
},
156159
"offset": {
157-
"type": "integer"
160+
"type": "integer",
161+
"minimum": 0
158162
}
159163
},
160164
"required": ["register", "offset"]
@@ -182,7 +186,8 @@
182186
"$ref": "#/components/schemas/CellRef"
183187
},
184188
{
185-
"type": "integer"
189+
"type": "integer",
190+
"minimum": 0
186191
}
187192
]
188193
},

api/starknet_trace_api_openrpc.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,8 @@
401401
"order": {
402402
"title": "order",
403403
"description": "the order of the event within the transaction",
404-
"type": "integer"
404+
"type": "integer",
405+
"minimum": 0
405406
}
406407
}
407408
},
@@ -421,7 +422,8 @@
421422
"order": {
422423
"title": "order",
423424
"description": "the order of the message within the transaction",
424-
"type": "integer"
425+
"type": "integer",
426+
"minimum": 0
425427
}
426428
}
427429
},
@@ -438,12 +440,14 @@
438440
"l1_gas": {
439441
"title": "L1Gas",
440442
"description": "l1 gas consumed by this transaction, used for l2-->l1 messages and state updates if blobs are not used",
441-
"type": "integer"
443+
"type": "integer",
444+
"minimum": 0
442445
},
443446
"l2_gas": {
444447
"title": "L2Gas",
445448
"description": "l2 gas consumed by this transaction, used for computation and calldata",
446-
"type": "integer"
449+
"type": "integer",
450+
"minimum": 0
447451
}
448452
},
449453
"required": ["l1_gas", "l2_gas"]

0 commit comments

Comments
 (0)