Add newPayload4 and getPayload4 convenience API (#142)
This commit is contained in:
parent
e049d14855
commit
9e370474fb
|
@ -51,6 +51,9 @@ createRpcSigsFromNim(RpcClient):
|
||||||
proc engine_newPayloadV3(payload: ExecutionPayload,
|
proc engine_newPayloadV3(payload: ExecutionPayload,
|
||||||
expectedBlobVersionedHashes: Option[seq[VersionedHash]],
|
expectedBlobVersionedHashes: Option[seq[VersionedHash]],
|
||||||
parentBeaconBlockRoot: Option[FixedBytes[32]]): PayloadStatusV1
|
parentBeaconBlockRoot: Option[FixedBytes[32]]): PayloadStatusV1
|
||||||
|
proc engine_newPayloadV4(payload: ExecutionPayload,
|
||||||
|
expectedBlobVersionedHashes: Option[seq[VersionedHash]],
|
||||||
|
parentBeaconBlockRoot: Option[FixedBytes[32]]): PayloadStatusV1
|
||||||
proc engine_forkchoiceUpdatedV2(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributes]): ForkchoiceUpdatedResponse
|
proc engine_forkchoiceUpdatedV2(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributes]): ForkchoiceUpdatedResponse
|
||||||
proc engine_forkchoiceUpdatedV3(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributes]): ForkchoiceUpdatedResponse
|
proc engine_forkchoiceUpdatedV3(forkchoiceState: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributes]): ForkchoiceUpdatedResponse
|
||||||
|
|
||||||
|
@ -96,6 +99,12 @@ template getPayload*(
|
||||||
payloadId: PayloadID): Future[GetPayloadV3Response] =
|
payloadId: PayloadID): Future[GetPayloadV3Response] =
|
||||||
engine_getPayloadV3(rpcClient, payloadId)
|
engine_getPayloadV3(rpcClient, payloadId)
|
||||||
|
|
||||||
|
template getPayload*(
|
||||||
|
rpcClient: RpcClient,
|
||||||
|
T: type GetPayloadV4Response,
|
||||||
|
payloadId: PayloadID): Future[GetPayloadV4Response] =
|
||||||
|
engine_getPayloadV4(rpcClient, payloadId)
|
||||||
|
|
||||||
template newPayload*(
|
template newPayload*(
|
||||||
rpcClient: RpcClient,
|
rpcClient: RpcClient,
|
||||||
payload: ExecutionPayloadV1): Future[PayloadStatusV1] =
|
payload: ExecutionPayloadV1): Future[PayloadStatusV1] =
|
||||||
|
@ -114,6 +123,14 @@ template newPayload*(
|
||||||
engine_newPayloadV3(
|
engine_newPayloadV3(
|
||||||
rpcClient, payload, versionedHashes, parentBeaconBlockRoot)
|
rpcClient, payload, versionedHashes, parentBeaconBlockRoot)
|
||||||
|
|
||||||
|
template newPayload*(
|
||||||
|
rpcClient: RpcClient,
|
||||||
|
payload: ExecutionPayloadV4,
|
||||||
|
versionedHashes: seq[VersionedHash],
|
||||||
|
parentBeaconBlockRoot: FixedBytes[32]): Future[PayloadStatusV1] =
|
||||||
|
engine_newPayloadV4(
|
||||||
|
rpcClient, payload, versionedHashes, parentBeaconBlockRoot)
|
||||||
|
|
||||||
template exchangeCapabilities*(
|
template exchangeCapabilities*(
|
||||||
rpcClient: RpcClient,
|
rpcClient: RpcClient,
|
||||||
methods: seq[string]): Future[seq[string]] =
|
methods: seq[string]): Future[seq[string]] =
|
||||||
|
|
Loading…
Reference in New Issue