Executing From An Instance
Execute operations from a Hats Account instance. Only wearers of the instance's hat can call the following functions.
execute
Execute an operation.
Arguments:
account
- Viem account (Address for JSON-RPC accounts or Account for other types).instance
- The Hats Account instance.operation
- An object of type Operation, which includes the operation's execution data.
Response:
An object of type ExecutionResult, includes:
status
- "success" if transaction was successful, "reverted" if transaction reverted.transactionHash
- transaction's hash.
executeBatch
Execute a batch of operations.
Arguments:
account
- Viem account (Address for JSON-RPC accounts or Account for other types).instance
- The Hats Account instance.operations
- An array of Operation objects, each includes an operation's execution data.
Response:
An object of type ExecutionResult, includes:
status
- "success" if transaction was successful, "reverted" if transaction reverted.transactionHash
- transaction's hash.
Last updated