API ReferenceReact provider and hooksType Alias
WorkflowSettlement
type WorkflowSettlement = | { operations: WalletOperation<AnvilWalletOperationType>[]; status: 'succeeded'; } | { issues: ValidationIssue[]; operations: WalletOperation<AnvilWalletOperationType>[]; status: 'preflight-invalid'; } | { error: BaseError; operations: WalletOperation<AnvilWalletOperationType>[]; status: 'preflight-failed'; } | { operations: WalletOperation<AnvilWalletOperationType>[]; status: 'wallet-failed'; } | { operations: WalletOperation<AnvilWalletOperationType>[]; status: 'wallet-indeterminate'; };Beta
How one run of a workflow ended, whichever phase it reached.
Every variant carries each operation as it stood when the run settled, and status says how far the
run got. A preflight-* status settled before any wallet prompt, so every operation is still queued
and the variant itself carries the reason. wallet-failed and wallet-indeterminate settled after
a prompt, and the detail is on the operation concerned.
A canceled run has no settlement. Cancellation happens before any wallet prompt, when the component that started the run unmounts, the account changes, or a newer run replaces it, so there is nothing for the user to act on.
Union Members
Type Literal
{ operations: WalletOperation < AnvilWalletOperationType > []; status: 'succeeded';}operations
operations: WalletOperation < AnvilWalletOperationType > [];Every operation in the run, as it stood when the run settled.
status
status: 'succeeded';Every operation was confirmed or signed.
Type Literal
{ issues: ValidationIssue[]; operations: WalletOperation<AnvilWalletOperationType>[]; status: "preflight-invalid";}issues
issues: ValidationIssue[];Why validation rejected the request.
operations
operations: WalletOperation < AnvilWalletOperationType > [];Every operation in the run, as it stood when the run settled.
status
status: 'preflight-invalid';Validation against current chain state rejected the request before any wallet prompt.
Type Literal
{ error: BaseError; operations: WalletOperation < AnvilWalletOperationType > []; status: 'preflight-failed';}error
error: BaseError;What stopped the run.
operations
operations: WalletOperation < AnvilWalletOperationType > [];Every operation in the run, as it stood when the run settled.
status
status: 'preflight-failed';The run stopped before any wallet prompt without a verdict on each operation: the checks run at execution failed, or execution threw.
Type Literal
{ operations: WalletOperation < AnvilWalletOperationType > []; status: 'wallet-failed';}operations
operations: WalletOperation < AnvilWalletOperationType > [];Every operation in the run; the failed one carries the detail.
status
status: 'wallet-failed';An operation failed after the wallet prompt, for example because the user rejected it or the transaction reverted.
Type Literal
{ operations: WalletOperation < AnvilWalletOperationType > []; status: 'wallet-indeterminate';}operations
operations: WalletOperation < AnvilWalletOperationType > [];Every operation in the run, as it stood when the run settled.
status
status: 'wallet-indeterminate';An operation is Indeterminate with no transaction hash: the connection failed while it was being
sent, so it may or may not have landed and re-execution cannot resolve it. The user should check
wallet activity before building a new workflow.
Remarks
Beta: it may change or be removed without notice and is not part of the compatibility contract.