Skip to content

Commit f3b589f

Browse files
committed
eth: fix invalid eth simulate schema
1 parent d41fdf1 commit f3b589f

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

src/schemas/block.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Block:
2020
- size
2121
- transactions
2222
- uncles
23-
additionalProperties: false
2423
properties:
2524
hash:
2625
title: Hash

src/schemas/execute.yaml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
EthSimulatePayload:
22
title: Arguments for multi call
3-
required:
4-
- blockStateCalls
53
properties:
64
blockStateCalls:
75
title: Block State Calls
@@ -149,7 +147,7 @@ Withdrawals:
149147
description: This array can have a maximum length of 16.
150148
type: array
151149
items:
152-
- $ref: '#/components/schemas/Withdrawal'
150+
$ref: '#/components/schemas/Withdrawal'
153151
Withdrawal:
154152
title: A withdrawal made by a validator
155153
type: object
@@ -168,7 +166,7 @@ Withdrawal:
168166
$ref: '#/components/schemas/uint64'
169167
EthSimulateResult:
170168
title: Full results of multi call
171-
type: object
169+
type: array
172170
oneOf:
173171
- $ref: '#/components/schemas/EthSimulateBlockResultInvalid'
174172
- $ref: '#/components/schemas/EthSimulateBlockResultSuccess'
@@ -182,7 +180,8 @@ EthSimulateBlockResultSingleSuccess:
182180
type: object
183181
allOf:
184182
- $ref: '#/components/schemas/Block'
185-
- title: Eth Simulate call results
183+
- type: object
184+
title: Eth Simulate call results
186185
required:
187186
- calls
188187
properties:
@@ -240,7 +239,7 @@ CallResults:
240239
title: Results of multi call within block
241240
type: array
242241
items:
243-
oneOf:
242+
anyOf:
244243
- $ref: '#/components/schemas/CallResultFailure'
245244
- $ref: '#/components/schemas/CallResultSuccess'
246245
CallResultFailure:
@@ -265,10 +264,19 @@ CallResultFailure:
265264
$ref: '#/components/schemas/uint64'
266265
error:
267266
oneOf:
268-
- code: -32000
269-
message: 'Execution reverted'
270-
- code: -32015
271-
message: 'VM execution error'
267+
- type: object
268+
properties:
269+
code:
270+
const: -32000
271+
message:
272+
type: string
273+
required: [code, message]
274+
- type: object
275+
properties:
276+
code:
277+
const: -32015
278+
message:
279+
type: string
272280
CallResultSuccess:
273281
title: Result of call success
274282
type: object
@@ -298,7 +306,7 @@ CallResultLog:
298306
type: object
299307
required:
300308
- logIndex
301-
- blockhash
309+
- blockHash
302310
- blockNumber
303311
- transactionHash
304312
- transactionIndex

0 commit comments

Comments
 (0)