|
12 | 12 | typetraits, uri, json], |
13 | 13 | # Nimble packages: |
14 | 14 | chronos, json, metrics, chronicles/timings, |
15 | | - web3, web3/ethtypes as web3Types, web3/ethhexstrings, web3/engine_api, |
| 15 | + web3, web3/ethtypes as web3Types, web3/ethhexstrings, |
16 | 16 | eth/common/eth_types, |
17 | 17 | eth/async_utils, stew/byteutils, |
18 | 18 | # Local modules: |
@@ -403,38 +403,6 @@ proc getBlockByNumber*(p: Web3DataProviderRef, |
403 | 403 | except ValueError as exc: raiseAssert exc.msg # Never fails |
404 | 404 | p.web3.provider.eth_getBlockByNumber(hexNumber, false) |
405 | 405 |
|
406 | | -proc preparePayload*(p: Web3DataProviderRef, |
407 | | - parentHash: Eth2Digest, |
408 | | - timestamp: uint64, |
409 | | - randomData: array[32, byte], |
410 | | - feeRecipient: Eth1Address): Future[PreparePayloadResponse] = |
411 | | - p.web3.provider.engine_preparePayload(PayloadAttributes( |
412 | | - parentHash: parentHash.asBlockHash, |
413 | | - timestamp: Quantity timestamp, |
414 | | - random: FixedBytes[32] randomData, |
415 | | - feeRecipient: feeRecipient)) |
416 | | - |
417 | | -proc getPayload*(p: Web3DataProviderRef, |
418 | | - payloadId: Quantity): Future[engine_api.ExecutionPayload] = |
419 | | - p.web3.provider.engine_getPayload(payloadId) |
420 | | - |
421 | | -proc executePayload*(p: Web3DataProviderRef, |
422 | | - payload: engine_api.ExecutionPayload): Future[ExecutePayloadResponse] = |
423 | | - p.web3.provider.engine_executePayload(payload) |
424 | | - |
425 | | -proc consensusValidated*(p: Web3DataProviderRef, |
426 | | - blockHash: BlockHash, |
427 | | - status: BlockValidationStatus): Future[JsonNode] = |
428 | | - p.web3.provider.engine_consensusValidated(BlockValidationResult( |
429 | | - blockHash: blockHash, |
430 | | - status: $status)) |
431 | | - |
432 | | -proc forkchoiceUpdated*(p: Web3DataProviderRef, |
433 | | - headBlock, finalizedBlock: Eth2Digest): Future[JsonNode] = |
434 | | - p.web3.provider.engine_forkchoiceUpdated(ForkChoiceUpdate( |
435 | | - headBlockHash: headBlock.asBlockHash, |
436 | | - finalizedBlockHash: finalizedBlock.asBlockHash)) |
437 | | - |
438 | 406 | template readJsonField(j: JsonNode, fieldName: string, ValueType: type): untyped = |
439 | 407 | var res: ValueType |
440 | 408 | fromJson(j[fieldName], fieldName, res) |
|
0 commit comments