/// import { Block } from "@ethereumjs/block"; import Common from "@ethereumjs/common"; import { TypedTransaction } from "@ethereumjs/tx"; import { Address, BN, ECDSASignature } from "ethereumjs-util"; import EventEmitter from "events"; import { CompilerInput, CompilerOutput } from "../../../types"; import { RpcDebugTracingConfig } from "../../core/jsonrpc/types/input/debugTraceTransaction"; import { MessageTrace } from "../stack-traces/message-trace"; import "./ethereumjs-workarounds"; import { CallParams, EstimateGasResult, FeeHistory, FilterParams, MineBlockResult, NodeConfig, RunCallResult, SendTransactionResult, TransactionParams } from "./node-types"; import { RpcLogOutput, RpcReceiptOutput } from "./output"; export declare class HardhatNode extends EventEmitter { private readonly _vm; private readonly _stateManager; private readonly _blockchain; private readonly _txPool; private _automine; private _minGasPrice; private _blockTimeOffsetSeconds; private _mempoolOrder; private _coinbase; private readonly _configNetworkId; private readonly _configChainId; private readonly _hardforkActivations; private _forkNetworkId?; private _forkBlockNumber?; private _forkClient?; static create(config: NodeConfig): Promise<[Common, HardhatNode]>; private static _validateHardforks; private readonly _localAccounts; private readonly _impersonatedAccounts; private _nextBlockTimestamp; private _userProvidedNextBlockBaseFeePerGas?; private _lastFilterId; private _filters; private _nextSnapshotId; private readonly _snapshots; private readonly _vmTracer; private readonly _vmTraceDecoder; private readonly _solidityTracer; private readonly _consoleLogger; private _failedStackTraces; private _irregularStatesByBlockNumber; private constructor(); getSignedTransaction(txParams: TransactionParams): Promise; sendTransaction(tx: TypedTransaction): Promise; mineBlock(timestamp?: BN): Promise; /** * Mines `count` blocks with a difference of `interval` seconds between their * timestamps. * * Returns an array with the results of the blocks that were really mined (the * ones that were reserved are not included). */ mineBlocks(count?: BN, interval?: BN): Promise; runCall(call: CallParams, blockNumberOrPending: BN | "pending"): Promise; getAccountBalance(address: Address, blockNumberOrPending?: BN | "pending"): Promise; getNextConfirmedNonce(address: Address, blockNumberOrPending: BN | "pending"): Promise; getAccountNextPendingNonce(address: Address): Promise; getCodeFromTrace(trace: MessageTrace | undefined, blockNumberOrPending: BN | "pending"): Promise; getLatestBlock(): Promise; getLatestBlockNumber(): BN; getPendingBlockAndTotalDifficulty(): Promise<[Block, BN]>; getLocalAccountAddresses(): Promise; getBlockGasLimit(): BN; estimateGas(callParams: CallParams, blockNumberOrPending: BN | "pending"): Promise; getGasPrice(): Promise; getMaxPriorityFeePerGas(): Promise; getCoinbaseAddress(): Address; getStorageAt(address: Address, positionIndex: BN, blockNumberOrPending: BN | "pending"): Promise; getBlockByNumber(pending: "pending"): Promise; getBlockByNumber(blockNumberOrPending: BN | "pending"): Promise; getBlockByHash(blockHash: Buffer): Promise; getBlockByTransactionHash(hash: Buffer): Promise; getBlockTotalDifficulty(block: Block): Promise; getCode(address: Address, blockNumberOrPending: BN | "pending"): Promise; getNextBlockTimestamp(): BN; setNextBlockTimestamp(timestamp: BN): void; getTimeIncrement(): BN; setTimeIncrement(timeIncrement: BN): void; increaseTime(increment: BN): void; setUserProvidedNextBlockBaseFeePerGas(baseFeePerGas: BN): void; getUserProvidedNextBlockBaseFeePerGas(): BN | undefined; private _resetUserProvidedNextBlockBaseFeePerGas; getNextBlockBaseFeePerGas(): Promise; getPendingTransaction(hash: Buffer): Promise; getTransactionReceipt(hash: Buffer | string): Promise; getPendingTransactions(): Promise; signPersonalMessage(address: Address, data: Buffer): Promise; signTypedDataV4(address: Address, typedData: any): Promise; getStackTraceFailuresCount(): number; takeSnapshot(): Promise; revertToSnapshot(id: number): Promise; newFilter(filterParams: FilterParams, isSubscription: boolean): Promise; newBlockFilter(isSubscription: boolean): Promise; newPendingTransactionFilter(isSubscription: boolean): Promise; uninstallFilter(filterId: BN, subscription: boolean): Promise; getFilterChanges(filterId: BN): Promise; getFilterLogs(filterId: BN): Promise; getLogs(filterParams: FilterParams): Promise; addCompilationResult(solcVersion: string, compilerInput: CompilerInput, compilerOutput: CompilerOutput): Promise; addImpersonatedAccount(address: Buffer): true; removeImpersonatedAccount(address: Buffer): boolean; setAutomine(automine: boolean): void; getAutomine(): boolean; setBlockGasLimit(gasLimit: BN | number): Promise; setMinGasPrice(minGasPrice: BN): Promise; dropTransaction(hash: Buffer): Promise; setAccountBalance(address: Address, newBalance: BN): Promise; setAccountCode(address: Address, newCode: Buffer): Promise; setNextConfirmedNonce(address: Address, newNonce: BN): Promise; setStorageAt(address: Address, positionIndex: BN, value: Buffer): Promise; traceTransaction(hash: Buffer, config: RpcDebugTracingConfig): Promise; getFeeHistory(blockCount: BN, newestBlock: BN | "pending", rewardPercentiles: number[]): Promise; setCoinbase(coinbase: Address): Promise; private _getGasUsedRatio; private _getRewards; private _addPendingTransaction; private _mineTransaction; private _mineTransactionAndPending; private _mineBlocksUntilTransactionIsIncluded; private _gatherTraces; private _validateAutominedTx; /** * Mines a new block with as many pending txs as possible, adding it to * the VM's blockchain. * * This method reverts any modification to the state manager if it throws. */ private _mineBlockWithPendingTxs; private _getMinimalTransactionFee; private _getFakeTransaction; private _getSnapshotIndex; private _removeSnapshot; private _initLocalAccounts; private _getConsoleLogMessages; private _manageErrors; private _isContractTooLargeStackTrace; private _calculateTimestampAndOffset; private _resetNextBlockTimestamp; private _notifyPendingTransaction; private _getLocalAccountPrivateKey; /** * Saves a block as successfully run. This method requires that the block * was added to the blockchain. */ private _saveBlockAsSuccessfullyRun; private _timestampClashesWithPreviousBlockOne; private _runInBlockContext; private _runInPendingBlockContext; private _setBlockContext; private _restoreBlockContext; private _correctInitialEstimation; private _binarySearchEstimation; /** * This function runs a transaction and reverts all the modifications that it * makes. */ private _runTxAndRevertMutations; private _computeFilterParams; private _newDeadline; private _getNextFilterId; private _filterIdToFiltersKey; private _emitEthEvent; private _getNonce; private _isTransactionMined; private _isTxMinable; private _persistIrregularWorldState; isEip1559Active(blockNumberOrPending?: BN | "pending"): boolean; private _getEstimateGasFeePriceFields; private _selectHardfork; private _getCommonForTracing; } //# sourceMappingURL=node.d.ts.map