1Shot API Submit & Wait icon

1Shot API Submit & Wait

Execute a contract method and wait for the transaction to complete

Execute

AI-generated

Overview

This node executes a specified smart contract method on the blockchain and waits for the transaction to complete. It is useful for blockchain automation workflows where you need to interact with smart contracts by calling their methods with specific parameters and optionally wait for the transaction confirmation. For example, it can be used to transfer tokens, update contract state, or trigger contract functions programmatically.

Use Case Examples

  1. Execute a token transfer method on an Ethereum smart contract by specifying the method name and parameters such as recipient address and amount.
  2. Call a contract method to update user data on a blockchain-based application, passing the required parameters as a JSON object.

Properties

Name Meaning
Contract Method Name or ID The identifier or name of the smart contract method to execute. This can be selected from a list or specified dynamically using an expression.
Parameters A JSON object containing the parameters to pass to the contract method. For example, recipient address and amount for a token transfer.
Additional Fields Optional fields to customize the contract method execution, including Wallet ID to specify which wallet to use, Memo text to include with the transaction, Contract Address Override to specify a different contract address, Value to send native tokens along with the method call, Authorization List for ERC-7702 authorizations, and Gas Limit to set the gas limit for the transaction.

Output

JSON

  • result
    • transactionHash - The hash of the transaction submitted to the blockchain.
    • status - The status of the transaction execution (e.g., success or failure).
    • receipt - The transaction receipt containing details about the execution.
    • error - Error details if the transaction failed.

Dependencies

  • An OAuth2 API credential for authentication with the 1Shot API service.

Troubleshooting

  • Common issues include invalid contract method ID or parameters causing transaction failure.
  • Insufficient gas limit or wallet balance may cause the transaction to fail.
  • Errors related to authorization list if ERC-7702 authorizations are incorrect or missing.
  • API authentication errors if the OAuth2 credential is not properly configured.

Discussion