Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ export interface DirectTransferInput {
/** JSON string with token metadata for non-standard ERC-20s. */
tokenConfig?: string;
gasLimitMultiplier?: string;
/**
* Dry-run only: estimate gas and detect a revert without signing or broadcasting.
* See docs/api/direct-execution.md for the safe first-write sequence.
*/
simulate?: boolean;
}

export interface DirectContractCallInput {
Expand All @@ -131,6 +136,24 @@ export interface DirectContractCallInput {
/** Wei to send for payable functions. */
value?: string;
gasLimitMultiplier?: string;
/**
* Dry-run only: estimate gas and detect a revert without signing or broadcasting.
* See docs/api/direct-execution.md for the safe first-write sequence.
*/
simulate?: boolean;
}

/** Returned by a direct-execution call made with `simulate: true`. */
export interface DirectSimulationResult {
success: boolean;
status: "simulated";
wouldRevert: boolean;
/** Present when `wouldRevert` is true; carries the raw revert data. */
revertReason?: string;
gasEstimate?: string;
from?: string;
to?: string;
value?: string;
}

export interface DirectCondition {
Expand Down