nimbus-eth1/fluffy/rpc/rpc_calls/rpc_eth_calls.nim
Kim De Mey dbe3393f5c
Fix eth/common & web3 related deprecation warnings for fluffy (#2698)
* Fix eth/common & web3 related deprecation warnings for fluffy

This commit uses the new types in the new eth/common/ structure
to remove deprecation warnings.

It is however more than just a mass replace as also all places
where eth/common or eth/common/eth_types or eth/common/eth_types_rlp
got imported have been revised and adjusted to a better per submodule
based import.

There are still a bunch of toMDigest deprecation warnings but that
convertor is not needed for fluffy code anymore so in theory it
should not be used (bug?). It seems to still get imported via export
leaks ffrom imported nimbus code I think.

* Address review comments

* Remove two more unused eth/common imports
2024-10-04 23:21:26 +02:00

50 lines
1.8 KiB
Nim

# fluffy
# Copyright (c) 2021-2024 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
{.push raises: [].}
import
std/json,
stint,
json_serialization/stew/results,
json_rpc/[client, jsonmarshal],
web3/conversions,
web3/eth_api_types
export eth_api_types
createRpcSigsFromNim(RpcClient):
proc web3_clientVersion(): string
proc eth_chainId(): Quantity
proc eth_getBlockByHash(data: Hash32, fullTransactions: bool): Opt[BlockObject]
proc eth_getBlockByNumber(
blockId: BlockIdentifier, fullTransactions: bool
): Opt[BlockObject]
proc eth_getUncleByBlockNumberAndIndex(
blockId: BlockIdentifier, quantity: Quantity
): BlockObject
proc eth_getBlockTransactionCountByHash(data: Hash32): Quantity
proc eth_getTransactionReceipt(data: Hash32): Opt[ReceiptObject]
proc eth_getLogs(filterOptions: FilterOptions): seq[LogObject]
proc eth_getBlockReceipts(blockId: string): Opt[seq[ReceiptObject]]
proc eth_getBlockReceipts(blockId: Quantity): Opt[seq[ReceiptObject]]
proc eth_getBlockReceipts(blockId: RtBlockIdentifier): Opt[seq[ReceiptObject]]
proc eth_getBalance(data: Address, blockId: BlockIdentifier): UInt256
proc eth_getTransactionCount(data: Address, blockId: BlockIdentifier): Quantity
proc eth_getStorageAt(
data: Address, slot: UInt256, blockId: BlockIdentifier
): FixedBytes[32]
proc eth_getCode(data: Address, blockId: BlockIdentifier): seq[byte]
proc eth_getProof(
address: Address, slots: seq[UInt256], blockId: BlockIdentifier
): ProofResponse