import { RecordOf, List, Map as ImMap } from 'immutable'; import { CompiledCode, ExecState, HexString, IMemReader, ISession, IStorage, NewTxData } from './interfaces'; interface TxInfo { readonly origin: bigint; readonly gasPrice: bigint; readonly forceTimestamp: number | undefined; readonly timestampDelta: number | undefined; readonly forceBasefee: bigint | undefined; readonly difficulty: bigint; } interface State { readonly session: ISession; readonly currentTx: TxInfo; readonly storages: ImMap; readonly callStack: List; readonly contracts: ImMap; } interface Stack { readonly calldata: IMemReader; readonly static: boolean; readonly callValue: bigint; readonly address: bigint; readonly caller: bigint; readonly retdatasize: number; readonly currentStorageCtx: bigint; } export declare function newBlockchain(session: ISession): BlockchainState; declare class BlockchainState implements ExecState { private store; constructor(store: RecordOf); get stack(): Stack; get forceTimestamp(): number | undefined; get timestampDelta(): number | undefined; get forceBasefee(): bigint | undefined; get difficulty(): bigint; get callvalue(): bigint; get calldata(): IMemReader; get static(): boolean; get session(): ISession; get gasPrice(): bigint; get caller(): bigint; get shared(): TxInfo; get address(): bigint; get origin(): bigint; private get current0x(); get currentStorage(): IStorage; getContract(hex: HexString | bigint): Promise; private getBytecodeFromCache; setContract(contract: CompiledCode): ExecState; getStorageOf(hex: HexString | bigint): IStorage; private _changeStorage; getStorage(location: bigint): bigint | Promise; getBalance(): bigint | Promise; setStorage(location: bigint, value: bigint): ExecState; transferFrom(from: bigint, to: bigint, value: bigint): Promise; transfer(_to: bigint, value: bigint): Promise; mintValue(toAddress: bigint, value: bigint): BlockchainState; newTx(data: NewTxData): Promise; private pushCallStack; setStorageLocation(address: bigint, storage: IStorage): ExecState; pushCallTo(contract: bigint, callValue: bigint, calldata: Uint8Array, retdatasize: number): Promise; pushDelegatecallTo(contract: bigint, calldata: Uint8Array, retdatasize: number): ExecState; pushStaticcallTo(contract: bigint, calldata: Uint8Array, retdatasize: number): ExecState; private _buildStack; popCallStack(): ExecState; setStorageInstance(contract: bigint, storage: IStorage): void; } export declare function setStorageInstance(inState: ExecState, contract: bigint, storage: IStorage): void; export {};