UNPKG

@tatumio/tatum

Version:

Tatum JS SDK

62 lines (61 loc) 5.16 kB
import { BigNumber } from 'bignumber.js'; import { BlockNumber, EvmBasedRpcInterface, JsonRpcResponse, LogFilter, TraceOptions, TraceType, TxPayload } from '../../../dto'; import { Logger } from '../../../service/logger/logger.types'; export declare abstract class AbstractEvmRpc implements EvmBasedRpcInterface { protected abstract logger: Logger; protected abstract rpcCall<T>(method: string, params?: unknown[]): Promise<T>; blockNumber(): Promise<JsonRpcResponse<any>>; call(callObject: TxPayload, blockNumber?: BlockNumber): Promise<JsonRpcResponse<string>>; chainId(): Promise<JsonRpcResponse<BigNumber>>; clientVersion(): Promise<JsonRpcResponse<string>>; debugGetBadBlocks(): Promise<JsonRpcResponse<any>>; debugStorageRangeAt(blockHash: string, txIndex: number, contractAddress: string, startKey: string, maxResult: number): Promise<JsonRpcResponse<any>>; debugTraceBlock(rplBlock: string, traceOptions?: TraceOptions): Promise<JsonRpcResponse<any>>; debugTraceBlockByHash(blockHash: string, traceOptions?: TraceOptions): Promise<JsonRpcResponse<any>>; debugTraceBlockByNumber(blockHash: string | number, traceOptions?: TraceOptions): Promise<JsonRpcResponse<any>>; debugTraceCall(callObject: TxPayload, blockNumber: BlockNumber, traceOptions?: TraceOptions): Promise<JsonRpcResponse<any>>; debugTraceTransaction(txHash: string, traceOptions?: TraceOptions): Promise<JsonRpcResponse<any>>; estimateGas(callObject: TxPayload): Promise<JsonRpcResponse<BigNumber>>; gasPrice(): Promise<JsonRpcResponse<BigNumber>>; maxPriorityFeePerGas(): Promise<JsonRpcResponse<BigNumber>>; getBalance(address: string, blockNumber?: BlockNumber): Promise<JsonRpcResponse<BigNumber>>; getTokenDecimals(tokenAddress: string): Promise<JsonRpcResponse<BigNumber>>; getTokenSymbol(tokenAddress: string): Promise<JsonRpcResponse<string>>; getTokenName(tokenAddress: string): Promise<JsonRpcResponse<string>>; getTokenCap(tokenAddress: string): Promise<JsonRpcResponse<BigNumber>>; getTokenTotalSupply(tokenAddress: string): Promise<JsonRpcResponse<BigNumber>>; supportsInterfaceERC1155(tokenAddress: string): Promise<JsonRpcResponse<boolean>>; getContractAddress(txHash: string): Promise<string | null>; getBlockByHash(blockHash: string, includeTransactions?: boolean): Promise<JsonRpcResponse<any>>; getBlockTransactionCountByHash(blockHash: string): Promise<JsonRpcResponse<number>>; getBlockByNumber(blockNumber: BlockNumber, full?: boolean): Promise<JsonRpcResponse<any>>; getBlockTransactionCountByNumber(blockNumber: BlockNumber): Promise<JsonRpcResponse<number>>; getCode(address: string, blockNumber?: BlockNumber): Promise<JsonRpcResponse<string>>; getLogs(filter: LogFilter): Promise<JsonRpcResponse<any>>; getProof(address: string, storageKeys: string[], blockNumber?: BlockNumber): Promise<JsonRpcResponse<any>>; getStorageAt(address: string, position: string, blockNumber?: BlockNumber): Promise<JsonRpcResponse<string>>; getTransactionByBlockHashAndIndex(blockHash: string, index: number): Promise<JsonRpcResponse<any>>; getTransactionByBlockNumberAndIndex(blockNumber: string | number, index: number): Promise<JsonRpcResponse<any>>; getTransactionByHash(txHash: string): Promise<JsonRpcResponse<any>>; getTransactionCount(address: string, blockNumber?: BlockNumber): Promise<JsonRpcResponse<BigNumber>>; getTransactionReceipt(transactionHash: string): Promise<JsonRpcResponse<any>>; getBlockReceipts(blockNumber: string | number): Promise<JsonRpcResponse<any>>; getUncleByBlockHashAndIndex(blockHash: string, index: number): Promise<JsonRpcResponse<any>>; getUncleByBlockNumberAndIndex(blockNumber: string | number, index: number): Promise<JsonRpcResponse<any>>; getUncleCountByBlockHash(blockHash: string): Promise<JsonRpcResponse<string>>; getUncleCountByBlockNumber(blockNumber: string | number): Promise<JsonRpcResponse<string>>; protocolVersion(): Promise<JsonRpcResponse<string>>; sendRawTransaction(signedTransactionData: string): Promise<JsonRpcResponse<string>>; sha3(data: string): Promise<JsonRpcResponse<string>>; syncing(): Promise<JsonRpcResponse<any>>; traceBlock(blockNumber: BlockNumber, traceOptions?: TraceOptions): Promise<JsonRpcResponse<any>>; traceCall(callObject: TxPayload, traceTypes: TraceType[], blockNumber?: BlockNumber): Promise<JsonRpcResponse<any>>; traceCallMany(callObject: TxPayload[], traceType: TraceType[][], blockNumber: BlockNumber): Promise<JsonRpcResponse<any>>; traceRawTransaction(signedTransactionData: string, traceOptions: TraceType[]): Promise<JsonRpcResponse<any>>; traceReplayBlockTransactions(blockNumber: BlockNumber, traceOptions: TraceType[]): Promise<JsonRpcResponse<any>>; traceReplayTransaction(txHash: string, traceOptions: TraceType[]): Promise<JsonRpcResponse<any>>; traceTransaction(txHash: string): Promise<JsonRpcResponse<any>>; txPoolContent(): Promise<JsonRpcResponse<any>>; txPoolInspect(): Promise<JsonRpcResponse<any>>; txPoolStatus(): Promise<JsonRpcResponse<any>>; }