2024-03-13 15:58:50 +00:00
|
|
|
# fluffy
|
2024-02-28 17:31:45 +00:00
|
|
|
# Copyright (c) 2021-2024 Status Research & Development GmbH
|
2023-12-08 09:35:50 +00:00
|
|
|
# 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.
|
|
|
|
|
2024-03-13 15:58:50 +00:00
|
|
|
{.push raises: [].}
|
2024-02-28 17:31:45 +00:00
|
|
|
|
2024-03-13 15:58:50 +00:00
|
|
|
import
|
|
|
|
std/json,
|
2024-06-10 10:47:09 +00:00
|
|
|
stint,
|
2024-03-13 15:58:50 +00:00
|
|
|
json_serialization/stew/results,
|
|
|
|
json_rpc/[client, jsonmarshal],
|
|
|
|
web3/conversions,
|
|
|
|
web3/eth_api_types
|
2023-03-28 13:50:23 +00:00
|
|
|
|
2024-03-13 15:58:50 +00:00
|
|
|
export eth_api_types
|
|
|
|
|
|
|
|
createRpcSigsFromNim(RpcClient):
|
2024-09-25 14:44:46 +00:00
|
|
|
proc web3_clientVersion(): string
|
2024-03-13 15:58:50 +00:00
|
|
|
proc eth_chainId(): Quantity
|
2024-10-04 21:21:26 +00:00
|
|
|
proc eth_getBlockByHash(data: Hash32, fullTransactions: bool): Opt[BlockObject]
|
2024-03-13 15:58:50 +00:00
|
|
|
proc eth_getBlockByNumber(
|
|
|
|
blockId: BlockIdentifier, fullTransactions: bool
|
|
|
|
): Opt[BlockObject]
|
|
|
|
|
2024-07-18 09:01:40 +00:00
|
|
|
proc eth_getUncleByBlockNumberAndIndex(
|
|
|
|
blockId: BlockIdentifier, quantity: Quantity
|
|
|
|
): BlockObject
|
|
|
|
|
2024-10-04 21:21:26 +00:00
|
|
|
proc eth_getBlockTransactionCountByHash(data: Hash32): Quantity
|
|
|
|
proc eth_getTransactionReceipt(data: Hash32): Opt[ReceiptObject]
|
2024-03-13 15:58:50 +00:00
|
|
|
proc eth_getLogs(filterOptions: FilterOptions): seq[LogObject]
|
|
|
|
|
|
|
|
proc eth_getBlockReceipts(blockId: string): Opt[seq[ReceiptObject]]
|
2024-10-04 21:21:26 +00:00
|
|
|
proc eth_getBlockReceipts(blockId: Quantity): Opt[seq[ReceiptObject]]
|
2024-03-13 15:58:50 +00:00
|
|
|
proc eth_getBlockReceipts(blockId: RtBlockIdentifier): Opt[seq[ReceiptObject]]
|
2024-06-10 10:47:09 +00:00
|
|
|
|
|
|
|
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
|