Skip to content

Commit d330c9b

Browse files
committed
schemas: use errors field for eth_simulate
1 parent 0b60e60 commit d330c9b

File tree

2 files changed

+42
-51
lines changed

2 files changed

+42
-51
lines changed

src/eth/execute.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,5 @@
111111
name: Result of calls
112112
schema:
113113
$ref: '#/components/schemas/EthSimulateResult'
114+
errors:
115+
$ref: '#/components/schemas/EthSimulateErrors'

src/schemas/execute.yaml

Lines changed: 40 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,7 @@ Withdrawal:
168168
$ref: '#/components/schemas/uint64'
169169
EthSimulateResult:
170170
title: Full results of eth_simulate
171-
type: array
172-
oneOf:
173-
- $ref: '#/components/schemas/EthSimulateBlockResultInvalid'
174-
- $ref: '#/components/schemas/EthSimulateBlockResultSuccess'
171+
$ref: '#/components/schemas/EthSimulateBlockResultSuccess'
175172
EthSimulateBlockResultSuccess:
176173
title: Full results of eth_simulate
177174
type: array
@@ -190,53 +187,45 @@ EthSimulateBlockResultSingleSuccess:
190187
calls:
191188
title: Call Results
192189
$ref: '#/components/schemas/CallResults'
193-
EthSimulateBlockResultInvalid:
194-
title: Result of eth_simulate not being valid
195-
description: The error messages are suggestions and a client might decide to return a different errror message than specified here. However, the error codes are enforced by this specification.
196-
type: object
197-
required:
198-
- error
199-
properties:
200-
error:
201-
oneOf:
202-
- code: -32000
203-
message: Invalid request
204-
- code: -32602
205-
message: Missing or invalid parameters
206-
- code: -32005
207-
message: Transactions maxFeePerGas is too low
208-
- code: -32015
209-
messagE: Execution error
210-
- code: -32016
211-
message: Timeout
212-
- code: -32603
213-
message: The Ethereum node encountered an internal error
214-
- code: -38010
215-
message: Transactions nonce is too low
216-
- code: -38011
217-
message: Transactions nonce is too high
218-
- code: -38012
219-
message: Transactions baseFeePerGas is too low
220-
- code: -38013
221-
message: Not enough gas provided to pay for intrinsic gas for a transaction
222-
- code: -38014
223-
message: Insufficient funds to pay for gas fees and value for a transaction
224-
- code: -38015
225-
message: Block gas limit exceeded by the block's transactions
226-
- code: -38020
227-
message: Block number in sequence did not increase
228-
- code: -38021
229-
message: Block timestamp in sequence did not increase or stay the same
230-
- code: -38022
231-
message: MovePrecompileToAddress referenced itself in replacement
232-
- code: -38023
233-
message: Multiple MovePrecompileToAddress referencing the same address to replace
234-
- code: -38024
235-
message: Sender is not an EOA
236-
- code: -38025
237-
message: Max init code size exceeded
238-
- code: -38026
239-
message: Client adjustable limit exceeded
190+
EthSimulateErrors:
191+
- code: -32000
192+
message: Invalid request
193+
- code: -32602
194+
message: Missing or invalid parameters
195+
- code: -32005
196+
message: Transactions maxFeePerGas is too low
197+
- code: -32015
198+
message: Execution error
199+
- code: -32016
200+
message: Timeout
201+
- code: -32603
202+
message: The Ethereum node encountered an internal error
203+
- code: -38010
204+
message: Transactions nonce is too low
205+
- code: -38011
206+
message: Transactions nonce is too high
207+
- code: -38012
208+
message: Transactions baseFeePerGas is too low
209+
- code: -38013
210+
message: Not enough gas provided to pay for intrinsic gas for a transaction
211+
- code: -38014
212+
message: Insufficient funds to pay for gas fees and value for a transaction
213+
- code: -38015
214+
message: Block gas limit exceeded by the block's transactions
215+
- code: -38020
216+
message: Block number in sequence did not increase
217+
- code: -38021
218+
message: Block timestamp in sequence did not increase or stay the same
219+
- code: -38022
220+
message: MovePrecompileToAddress referenced itself in replacement
221+
- code: -38023
222+
message: Multiple MovePrecompileToAddress referencing the same address to replace
223+
- code: -38024
224+
message: Sender is not an EOA
225+
- code: -38025
226+
message: Max init code size exceeded
227+
- code: -38026
228+
message: Client adjustable limit exceeded
240229
CallResults:
241230
title: Results of eth_simulate within block
242231
type: array

0 commit comments

Comments
 (0)