1Shot API Submit & Wait icon

1Shot API Submit & Wait

Execute a contract method and wait for the transaction to complete

Execute Batch

AI-generated

Overview

This node operation executes multiple smart contract methods in a single blockchain transaction batch. It is useful for scenarios where you want to perform several contract method calls atomically, ensuring either all succeed or the entire batch is rolled back. For example, it can be used to batch multiple token transfers or contract interactions in one transaction to save on gas fees and improve efficiency.

Use Case Examples

  1. Batch executing multiple contract methods on a blockchain using a specified wallet.
  2. Performing atomic batch transactions where all contract method calls must succeed together.

Properties

Name Meaning
Contract Methods A collection of contract methods to execute in the batch. Each method includes the method name or ID, parameters as a JSON object, and optional fields such as contract address override and value to send with the method.
Wallet Name or ID The wallet to use for executing the batch of contract methods. Can be selected from a list or specified by ID.
Additional Fields Optional settings for the batch execution, including whether the batch is atomic (all must succeed or rollback), a memo text to include with the transaction, a list of ERC-7702 authorizations, and a gas limit for the batch execution.

Output

JSON

  • result - The result of the batch execution, including success or error details.

Dependencies

  • Requires an API key credential for authentication to the 1Shot API service.

Troubleshooting

  • Common issues include invalid contract method IDs or parameters, insufficient gas limit, or wallet authorization errors.
  • Errors may indicate transaction failure or rollback if the batch is atomic and one method fails. Adjust parameters or gas limit accordingly.

Links

Discussion