1Shot icon

1Shot

Interact with the blockchain and web3 via 1Shot API

Actions5

Overview

This node integrates with the 1Shot API to execute blockchain transactions programmatically. Specifically, for the Transaction - Execute operation, it allows users to trigger a transaction on the blockchain by specifying a transaction ID and parameters required for that transaction.

Common scenarios where this node is beneficial include:

  • Automating token transfers or contract interactions without manual intervention.
  • Executing predefined blockchain transactions as part of larger workflows.
  • Integrating blockchain operations into business processes, such as payments or escrow releases.

For example, a user might use this node to execute a payment transaction by providing the transaction ID and parameters like recipient address and amount, automating payouts in a decentralized finance (DeFi) application.

Properties

Name Meaning
Endpoint Name or ID Select or specify the unique identifier of the transaction to execute. This can be chosen from a loaded list or provided dynamically via an expression.
Parameters JSON object containing the parameters to pass to the transaction function. For example, specifying recipient addresses, amounts, or other transaction-specific data.
Additional Fields Optional extra fields to customize the transaction execution:
Escrow Wallet ID: ID of an escrow wallet to use for the transaction.
Memo: Optional text note to include with the transaction.
Authorization List: JSON array of authorizations related to ERC-7702 standard for the transaction.

Output

The node outputs a JSON object representing the response from the 1Shot API after executing the transaction. This typically includes details about the transaction status, transaction hash, confirmations, or any error messages returned by the API.

If the transaction involves binary data (e.g., signed transaction payloads), it would be included in the JSON response or handled internally by the API, but this node does not explicitly output separate binary data.

Dependencies

  • Requires an active connection to the 1Shot API service.
  • Needs an OAuth2 API credential configured in n8n to authenticate requests.
  • The base URL for API requests is https://api.1shotapi.com/v0.
  • The node uses authenticated HTTP POST requests to execute transactions.

Troubleshooting

  • Invalid Transaction ID: If the specified transaction ID does not exist or is malformed, the API will return an error. Verify the transaction ID is correct and accessible.
  • Malformed Parameters JSON: The Parameters field must be valid JSON. Errors parsing this input will cause request failures. Use proper JSON formatting.
  • Authentication Errors: If the OAuth2 token is missing, expired, or invalid, the API will respond with authorization errors (HTTP 403). Ensure credentials are correctly set up and refreshed.
  • Unsupported Operations: Using an unsupported operation with the transaction resource will throw an error indicating the operation is not supported.
  • API Rate Limits or Network Issues: Temporary network problems or hitting API rate limits may cause request failures. Retry logic or error handling in workflows is recommended.

Links and References

Discussion