opnet
Version:
The perfect library for building Bitcoin-based applications.
19 lines (18 loc) • 966 B
TypeScript
import { Address, NetEvent } from '../../../node_modules/@btc-vision/transaction/build/index.js';
import { BlockGasParameters } from '../../block/BlockGasParameters.js';
import { ContractEvents } from '../../transactions/interfaces/ITransactionReceipt.js';
import { OPNetEvent } from '../OPNetEvent.js';
import { IAccessList } from './IAccessList.js';
import { ParsedSimulatedTransaction } from './SimulatedTransaction.js';
export interface IContract {
readonly address: Address | string;
get p2op(): string;
currentGasParameters(): Promise<BlockGasParameters>;
setSender(sender: Address): void;
decodeEvents(events: NetEvent[] | ContractEvents): OPNetEvent[];
decodeEvent(event: NetEvent): OPNetEvent;
encodeCalldata(method: string, ...args: unknown[]): Buffer;
setSimulatedHeight(height: bigint | undefined): void;
setTransactionDetails(tx: ParsedSimulatedTransaction): void;
setAccessList(accessList: IAccessList): void;
}