1Shot icon

1Shot

Interact with the blockchain and web3 via 1Shot API

Actions5

Overview

The 1Shot node enables interaction with blockchain and web3 services via the 1Shot API. It supports multiple resources including Transactions, Escrow Wallets, and 1Shot Prompts, allowing users to execute or read blockchain transactions, manage escrow wallets, and search or assure tools related to smart contracts.

Specifically, the Assure Tools operation under the 1Shot Prompt resource helps ensure that the necessary tools (such as contract descriptions and escrow wallets) are available for a given smart contract on a specified blockchain network. This is useful in scenarios where you want to prepare or validate tooling before executing complex blockchain interactions, such as automated contract calls or transaction orchestration.

Practical examples:

  • Assuring that the correct contract description and escrow wallet are set up for a DeFi smart contract on Ethereum mainnet.
  • Preparing tooling for a newly deployed contract on Avalanche Fuji testnet before running transactions.
  • Validating and fetching the highest-ranked prompt description for a contract if no specific prompt ID is provided.

Properties

Name Meaning
Chain Name or ID Select the blockchain network by name or specify its Chain ID. Options include Ethereum (1), Sepolia (11155111), Base (8453), Base Sepolia (84531), Avalanche (43114), and Avalanche Fuji (43113).
Contract Address The address of the smart contract on the selected blockchain for which you want to assure tools.
Prompt ID Optional. The ID of a specific prompt (contract description) to use. If omitted, the highest-ranked contract description for the chain and contract address will be used automatically.
Escrow Wallet ID Optional. The ID of the escrow wallet to associate with any newly created tools during the assurance process.

Output

The node outputs JSON data representing the response from the 1Shot API for the assure tools request. This typically includes details about the assured contract tools, such as confirmed contract descriptions, escrow wallet associations, and any metadata related to the tooling setup.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential configured for authenticating with the 1Shot API using OAuth2.
  • The node makes HTTP requests to the 1Shot API endpoint at https://api.1shotapi.com/v0.
  • Proper configuration of the OAuth2 credentials with access tokens is necessary for successful API communication.

Troubleshooting

  • Common issues:

    • Invalid or missing API authentication token can cause authorization failures.
    • Incorrect or malformed contract addresses may lead to errors or empty responses.
    • Providing an invalid Chain ID or unsupported network will result in failed requests.
    • Omitting required parameters like contract address or chain ID will cause validation errors.
  • Error messages:

    • "Unsupported resource" or "Unsupported operation" indicates misconfiguration of resource or operation parameters.
    • HTTP 403 errors usually mean expired or invalid OAuth2 tokens; refreshing credentials or re-authenticating resolves this.
    • API response errors related to contract or wallet IDs suggest verifying those inputs against your 1Shot account data.

Links and References

Discussion