diff --git a/web3/engine_api_callsigs.nim b/web3/engine_api_callsigs.nim index 713c412..d4ada4c 100644 --- a/web3/engine_api_callsigs.nim +++ b/web3/engine_api_callsigs.nim @@ -3,5 +3,5 @@ import ethtypes, engine_api_types proc engine_executePayloadV1(payload: ExecutionPayloadV1): ExecutePayloadResponse -proc engine_forkchoiceUpdatedV1(forkchoiceState: ForkchoiceStateV1): ForkchoiceUpdatedResponse +proc engine_forkchoiceUpdatedV1(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributesV1]): ForkchoiceUpdatedResponse proc engine_getPayloadV1(payloadId: Quantity): ExecutionPayloadV1 diff --git a/web3/engine_api_types.nim b/web3/engine_api_types.nim index bdba758..ed1c2ed 100644 --- a/web3/engine_api_types.nim +++ b/web3/engine_api_types.nim @@ -1,6 +1,7 @@ -# https://github.com/ethereum/execution-apis/blob/main/src/engine/interop/specification.md +# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.4/src/engine/specification.md import + std/options, ethtypes export @@ -8,7 +9,7 @@ export type # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.4/src/engine/specification.md#payloadattributesv1 - PayloadAttributes* = object + PayloadAttributesV1* = object timestamp*: Quantity random*: FixedBytes[32] feeRecipient*: Address @@ -20,8 +21,8 @@ type ExecutePayloadResponse* = object status*: string - latestValidHash*: BlockHash - message*: string + latestValidHash*: Option[BlockHash] + message*: Option[string] # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.4/src/engine/specification.md#forkchoicestatev1 ForkchoiceStateV1* = object @@ -35,7 +36,7 @@ type ForkchoiceUpdatedResponse* = object status*: ForkchoiceUpdatedStatus - payloadId*: Quantity + payloadId*: Option[Quantity] const # https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.4/src/engine/specification.md#errors