Docs Navigationexpand_more

Dev Platform

Dev Platform: Smart Contract Methods

Deploy and interact with contracts using Dev Platform patterns and prompt-driven workflows.

Smart Contract Methods

Note

Before you can configure endpoints to call contract methods, you need to provision and fund a server wallet.

Contract method endpoints are the core of the 1Shot API. They are REST endpoints you configure to read from and write to smart contracts onchain.

Each contract method endpoint is linked to a single default wallet and can be configured to accept a specific set of input parameters.

Importing contract methods

There are three ways to import a smart contract method into your project:

  1. Find and import it from the 1Shot Prompts directory.
  2. Import a verified contract from the My Smart Contracts page.
  3. Use the method builder from the "My Smart Contracts" page (best if you are interacting with an unverified contract).

Method builder inputs for unverified contracts

When importing an unverified contract, provide the following:

  • A target blockchain network (Ethereum mainnet, BNB Smart Chain, Avalanche, etc.).
  • The contract address you want to interact with.
  • The name of the method you want to call.
  • The input parameters the method expects.
  • Optional: a webhook URL to receive real-time status updates for transactions created by the endpoint.

Calling your contract method endpoint

After an endpoint is configured, trigger it by making a POST request to the 1Shot API with your API key and secret.

Copy the endpoint's CONTRACT_METHOD_ENDPOINT_ID from the 1Shot API dashboard and include it in your request path.