Skip to main content
Builds, simulates, signs, and sends a state-changing contract method call, exposing the full lifecycle as a status field rather than a single boolean. Requires a connected wallet.

Parameters

Return value

Example

Concurrent sends

Two sends from the same wallet fired at once (a double-clicked button, two components each triggering one) are automatically queued so they don’t claim the same account sequence number and fail. A send waiting its turn reports status: "queued". If one call’s args or authorization depend on what a previous call wrote, await the first sendAsync before starting the second.

Surviving a page reload

If the page reloads while a send is "submitting", SorokitProvider picks it back up on mount and polls for its outcome. Nothing needs to be wired up for this.

Caching and invalidation

On success, every useContractCall query for the same contractId is invalidated automatically, so reads reflect the new state without a manual refetch.