import { ContractBase } from '../../contracts/ContractBase'; import { IAccount } from '../../models/TAccount'; import { TEth } from '../../models/TEth'; import { SafeTx } from '../../safe/SafeTx'; import { TxWriter } from '../../txs/TxWriter'; import { ETimelockTxStatus, ITimelockTx, ITimelockTxParams, ITimelockService } from './ITimelockService'; export declare class TimelockServiceFallbackSafe implements ITimelockService { private safeTx; private options?; constructor(safeTx: SafeTx, options?: { simulate?: boolean; execute?: boolean; dir?: string; }); getPendingByTitle(title: string): Promise<{ status: ETimelockTxStatus; schedule: ITimelockTx; }>; executePendingByTitle(sender: IAccount, title: string): Promise<{ tx: TxWriter; schedule: ITimelockTx; }>; executePending(sender: IAccount, txParams: ITimelockTx): Promise<{ tx: TxWriter; schedule: ITimelockTx; }>; /** Schedules-Wait-Execute a task distinguished by the unique task name * * 1. if schedule doesn't exist, create it * 2. if schedule date NOT yet ready, exit * 3. if schedule date IS ready, execute it * 4. if executed, exit */ process>(uniqueTaskName: string, sender: IAccount, contract: T, method: TMethodName, ...params: T[TMethodName] extends (sender: IAccount, ...args: infer A) => any ? A : never): Promise<{ prevStatus: ETimelockTxStatus; status: ETimelockTxStatus; schedule: ITimelockTx; tx?: TEth.Hex; }>; /** Schedules-Wait-Execute a task distinguished by the unique task name * * 1. if schedule doesn't exist, create it * 2. if schedule date NOT yet ready, exit * 3. if schedule date IS ready, execute it * 4. if executed, exit */ processBatch>(uniqueTaskName: string, sender: IAccount, batch: Pick[]): Promise<{ prevStatus: ETimelockTxStatus; status: ETimelockTxStatus; schedule: ITimelockTx; tx?: TEth.Hex; }>; private processTxParams; scheduleCall>(sender: IAccount, contract: T, method: TMethodName, ...params: T[TMethodName] extends (sender: IAccount, ...args: infer A) => any ? A : never): Promise; /** * E.g. `.scheduleCallBatch(title, sender, [ c1.$data().foo(sender), c2.$data().bar(sender, param1) ])` */ scheduleCallBatch(title: string, sender: IAccount, batch: Pick[]): Promise; executeCall>(sender: IAccount, contract: T, method: TMethodName, ...params: T[TMethodName] extends (sender: IAccount, ...args: infer A) => any ? A : never): Promise<{ tx: TxWriter; schedule: ITimelockTx; }>; /** * E.g. `.scheduleCallBatch(title, sender, [ c1.$data().foo(sender), c2.$data().bar(sender, param1) ])` */ executeCallBatch(title: string, sender: IAccount, batch: Pick[]): Promise<{ tx: TxWriter; schedule: ITimelockTx; }>; schedule(params: ITimelockTxParams): Promise; execute(params: ITimelockTxParams): Promise<{ tx: TxWriter; schedule: ITimelockTx; }>; cancel(sender: IAccount, id: TEth.Hex, opts?: { storage?: boolean; }): Promise; clearSchedules(): Promise; updateSchedule(txInfo: Partial): Promise; debugMoveToSchedule(txInfo: ITimelockTx): Promise; private getTxParamsNormalized; private getTxParamsNormalizedFromContract; private getTxParamsNormalizedFromContractBatch; } type WriteMethodKeys = { [P in keyof T]: T[P] extends ((sender: IAccount, ...args: any[]) => (Promise)) ? P : never; }[keyof T]; export {};