Skip to content

Commit 719fb48

Browse files
committed
alpha.7 engine API
1 parent 94a3c2b commit 719fb48

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

web3/engine_api_callsigs.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#core
1+
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#core
22

33
import ethtypes, engine_api_types
44

55
proc engine_newPayloadV1(payload: ExecutionPayloadV1): PayloadStatusV1
66
proc engine_forkchoiceUpdatedV1(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributesV1]): ForkchoiceUpdatedResponse
77
proc engine_getPayloadV1(payloadId: PayloadID): ExecutionPayloadV1
8+
proc engine_exchangeTransitionConfigurationV1(transitionConfiguration: TransitionConfigurationV1): TransitionConfigurationV1

web3/engine_api_types.nim

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import
22
std/options,
3+
stint,
34
ethtypes
45

56
export
67
ethtypes
78

89
type
9-
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#payloadattributesv1
10+
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#payloadattributesv1
1011
PayloadAttributesV1* = object
1112
timestamp*: Quantity
1213
random*: FixedBytes[32]
1314
suggestedFeeRecipient*: Address
1415

15-
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#payloadstatusv1
16+
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#payloadstatusv1
1617
PayloadExecutionStatus* {.pure.} = enum
1718
valid = "VALID"
1819
invalid = "INVALID"
@@ -26,21 +27,27 @@ type
2627
latestValidHash*: Option[BlockHash]
2728
validationError*: Option[string]
2829

29-
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#forkchoicestatev1
30+
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#forkchoicestatev1
3031
ForkchoiceStateV1* = object
3132
headBlockHash*: BlockHash
3233
safeBlockHash*: BlockHash
3334
finalizedBlockHash*: BlockHash
3435

35-
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#response-1
36+
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#response-1
3637
PayloadID* = FixedBytes[8]
3738

3839
ForkchoiceUpdatedResponse* = object
3940
payloadStatus*: PayloadStatusV1
4041
payloadId*: Option[PayloadID]
4142

43+
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#transitionconfigurationv1
44+
TransitionConfigurationV1* = object
45+
terminalTotalDifficulty*: Uint256
46+
terminalBlockHash*: BlockHash
47+
terminalBlockNumber*: Quantity
48+
4249
const
43-
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#errors
50+
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#errors
4451
engineApiParseError* = - 32700
4552
engineApiInvalidRequest* = -32600
4653
engineApiMethodNotFound* = -32601

web3/ethtypes.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ type
203203

204204
TypedTransaction* = distinct seq[byte]
205205

206-
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#executionpayloadv1
206+
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#executionpayloadv1
207207
ExecutionPayloadV1* = object
208208
parentHash*: BlockHash
209209
feeRecipient*: Address

0 commit comments

Comments
 (0)