diff --git a/web3/engine_api_callsigs.nim b/web3/engine_api_callsigs.nim index 405dab7..b11b3d7 100644 --- a/web3/engine_api_callsigs.nim +++ b/web3/engine_api_callsigs.nim @@ -1,7 +1,8 @@ -# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#core +# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#core import ethtypes, engine_api_types proc engine_newPayloadV1(payload: ExecutionPayloadV1): PayloadStatusV1 proc engine_forkchoiceUpdatedV1(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributesV1]): ForkchoiceUpdatedResponse proc engine_getPayloadV1(payloadId: PayloadID): ExecutionPayloadV1 +proc engine_exchangeTransitionConfigurationV1(transitionConfiguration: TransitionConfigurationV1): TransitionConfigurationV1 diff --git a/web3/engine_api_types.nim b/web3/engine_api_types.nim index 133b92e..7c82642 100644 --- a/web3/engine_api_types.nim +++ b/web3/engine_api_types.nim @@ -1,18 +1,19 @@ import std/options, + stint, ethtypes export ethtypes type - # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#payloadattributesv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#payloadattributesv1 PayloadAttributesV1* = object timestamp*: Quantity random*: FixedBytes[32] suggestedFeeRecipient*: Address - # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#payloadstatusv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#payloadstatusv1 PayloadExecutionStatus* {.pure.} = enum valid = "VALID" invalid = "INVALID" @@ -26,21 +27,27 @@ type latestValidHash*: Option[BlockHash] validationError*: Option[string] - # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#forkchoicestatev1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#forkchoicestatev1 ForkchoiceStateV1* = object headBlockHash*: BlockHash safeBlockHash*: BlockHash finalizedBlockHash*: BlockHash - # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#response-1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#response-1 PayloadID* = FixedBytes[8] ForkchoiceUpdatedResponse* = object payloadStatus*: PayloadStatusV1 payloadId*: Option[PayloadID] + # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#transitionconfigurationv1 + TransitionConfigurationV1* = object + terminalTotalDifficulty*: Uint256 + terminalBlockHash*: BlockHash + terminalBlockNumber*: Quantity + const - # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#errors + # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#errors engineApiParseError* = - 32700 engineApiInvalidRequest* = -32600 engineApiMethodNotFound* = -32601 diff --git a/web3/ethtypes.nim b/web3/ethtypes.nim index bea9bdb..c8e2cb1 100644 --- a/web3/ethtypes.nim +++ b/web3/ethtypes.nim @@ -203,7 +203,7 @@ type TypedTransaction* = distinct seq[byte] - # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.6/src/engine/specification.md#executionpayloadv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.7/src/engine/specification.md#executionpayloadv1 ExecutionPayloadV1* = object parentHash*: BlockHash feeRecipient*: Address