> ## Documentation Index
> Fetch the complete documentation index at: https://cobo.com/developers/llms.txt
> Use this file to discover all available pages before exploring further.

# Call smart contract

> This operation creates a transaction to interact with a smart contract on the blockchain.

You need to provide details such as the source address, destination address, and the calldata. You can specify the fee-related properties to limit the transaction fee. A transaction request for tracking is returned upon successful operation.

For smart contract call examples, you can refer to [Batch transfers using smart contracts](/v2/guides/transactions/batch-transfer) and [Swap tokens on Solana using Jupiter](/v2/guides/transactions/sol-jupiter-swap).

<Note>This operation uses `request_id` to prevent duplicate contract call requests. The `request_id` must be unique within the same organization. Duplicate requests with the same `request_id` will be rejected with an error and will not be executed again.</Note>

<Info>
Supported actions vary by blockchain:
- EVM chains — Support deploying contracts and calling contract functions.
- Solana — Supports calling contract functions only.
- TRON — Supports calling contract functions only.
- Stellar — Supports XLM trustline creation only.
- Cosmos — Supports initiating Cosmos native message-based transactions, such as transfers and staking operations.
</Info>

<Note>Currently, this operation only applies to transactions from Custodial Wallets (Web3 Wallets), MPC Wallets, or Smart Contract Wallets. Refer to the `destination` property for supported contract types.</Note>

<Info>If you initiate a transaction from a Smart Contract Wallet, a relevant transaction will be triggered from the Delegate to the Cobo Safe's address of the Smart Contract Wallet, with a transfer amount of <code>0</code>.</Info>


<Tip>
  Try [Cobo WaaS Skill](/v2/guides/overview/cobo-waas-skill) in your AI coding assistant (Claude Code, Cursor, etc.). Describe your needs in natural language to auto-generate production-ready SDK code and debug faster 🚀
</Tip>

<RequestExample>
  ```python Python theme={null}
  import cobo_waas2
  from cobo_waas2.models.contract_call_params import ContractCallParams
  from cobo_waas2.models.create_transfer_transaction201_response import (
      CreateTransferTransaction201Response,
  )
  from cobo_waas2.rest import ApiException
  from pprint import pprint

  # See configuration.py for a list of all supported configurations.
  configuration = cobo_waas2.Configuration(
      # Replace `<YOUR_PRIVATE_KEY>` with your private key
      api_private_key="<YOUR_PRIVATE_KEY>",
      # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
      host="https://api.dev.cobo.com/v2",
  )
  # Enter a context with an instance of the API client
  with cobo_waas2.ApiClient(configuration) as api_client:
      # Create an instance of the API class
      api_instance = cobo_waas2.TransactionsApi(api_client)
      contract_call_params = cobo_waas2.ContractCallParams(
          request_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
          chain_id="ETH",
          source=cobo_waas2.ContractCallSource(
              cobo_waas2.MpcContractCallSource(
                  source_type="Org-Controlled",
                  wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  address="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
              )
          ),
          destination=cobo_waas2.ContractCallDestination(
              cobo_waas2.EvmContractCallDestination(
                  destination_type="EVM_Contract",
                  address="0x0406db8351aa6839169bb363f63c2c808fee8f99",
                  calldata="0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO",
              )
          ),
      )

      try:
          # Call smart contract
          api_response = api_instance.create_contract_call_transaction(
              contract_call_params=contract_call_params
          )
          print("The response of TransactionsApi->create_contract_call_transaction:\n")
          pprint(api_response)
      except Exception as e:
          print(
              "Exception when calling TransactionsApi->create_contract_call_transaction: %s\n"
              % e
          )

  ```

  ```java Java theme={null}
  // Import classes:
  import com.cobo.waas2.ApiClient;
  import com.cobo.waas2.ApiException;
  import com.cobo.waas2.Configuration;
  import com.cobo.waas2.Env;
  import com.cobo.waas2.api.TransactionsApi;
  import com.cobo.waas2.model.*;
  import java.util.UUID;

  public class Example {
    public static void main(String[] args) {
      ApiClient defaultClient = Configuration.getDefaultApiClient();
      // Select the development environment. To use the production environment, replace `Env.DEV` with
      // `Env.PROD
      defaultClient.setEnv(Env.DEV);

      // Replace `<YOUR_PRIVATE_KEY>` with your private key
      defaultClient.setPrivKey("<YOUR_PRIVATE_KEY>");
      TransactionsApi apiInstance = new TransactionsApi();
      ContractCallParams contractCallParams =
          new ContractCallParams()
              .requestId("f47ac10b-58cc-4372-a567-0e02b2c3d479")
              .chainId("ETH")
              .source(
                  new ContractCallSource(
                      new MpcContractCallSource()
                          .sourceType(ContractCallSourceType.ORG_CONTROLLED)
                          .walletId(UUID.fromString("f47ac10b-58cc-4372-a567-0e02b2c3d479"))
                          .address("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")))
              .destination(
                  new ContractCallDestination(
                      new EvmContractCallDestination()
                          .destinationType(ContractCallDestinationType.EVM_CONTRACT)
                          .address("0x0406db8351aa6839169bb363f63c2c808fee8f99")
                          .calldata(
                              "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO")));
      try {
        CreateTransferTransaction201Response result =
            apiInstance.createContractCallTransaction(contractCallParams);
        System.out.println(result);
      } catch (ApiException e) {
        System.err.println("Exception when calling TransactionsApi#createContractCallTransaction");
        System.err.println("Status code: " + e.getCode());
        System.err.println("Reason: " + e.getResponseBody());
        System.err.println("Response headers: " + e.getResponseHeaders());
        e.printStackTrace();
      }
    }
  }

  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
  	"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
  	"os"
  )

  func main() {
  	contractCallParams := *coboWaas2.NewContractCallParams("f47ac10b-58cc-4372-a567-0e02b2c3d479", "ETH", coboWaas2.ContractCallSource{CustodialWeb3ContractCallSource: coboWaas2.NewCustodialWeb3ContractCallSource(coboWaas2.ContractCallSourceType("Web3"), "f47ac10b-58cc-4372-a567-0e02b2c3d479", "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")}, coboWaas2.ContractCallDestination{CosmosContractCallDestination: coboWaas2.NewCosmosContractCallDestination(coboWaas2.ContractCallDestinationType("EVM_Contract"), []coboWaas2.CosmosContractCallMessage{*coboWaas2.NewCosmosContractCallMessage("/babylon.btcstaking.v1.MsgCreateBTCDelegation", "eyJ0eXBlIjoiYmFiY29zZS5idGNzdGFnaW5nLnYxLk1zZ0NyZWF0ZUJUQ0RlbGVnYXRpb24iLCJtZXNzYWdlIjp7ImNvbW1hbmRfaWQiOiJjb21tYW5kX2lkIiwibWVzc2FnZV92YWx1ZSI6Im1lc3NhZ2VfdmFsdWUiLCJtZXNzYWdlX3R5cGUiOiJtZXNzYWdlX3R5cGUifX0=")})})

  	configuration := coboWaas2.NewConfiguration()
  	// Initialize the API client
  	apiClient := coboWaas2.NewAPIClient(configuration)
  	ctx := context.Background()

  	// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
  	ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
  	// Replace `<YOUR_PRIVATE_KEY>` with your private key
  	ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
  		Secret: "<YOUR_PRIVATE_KEY>",
  	})
  	resp, r, err := apiClient.TransactionsAPI.CreateContractCallTransaction(ctx).
  		ContractCallParams(contractCallParams).
  		Execute()
  	if err != nil {
  		fmt.Fprintf(
  			os.Stderr,
  			"Error when calling `TransactionsAPI.CreateContractCallTransaction``: %v\n",
  			err,
  		)
  		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
  	}
  	// response from `CreateContractCallTransaction`: CreateTransferTransaction201Response
  	fmt.Fprintf(
  		os.Stdout,
  		"Response from `TransactionsAPI.CreateContractCallTransaction`: %v\n",
  		resp,
  	)
  }

  ```

  ```javascript JavaScript theme={null}
  const CoboWaas2 = require("@cobo/cobo-waas2");
  // Initialize the API client
  const apiClient = CoboWaas2.ApiClient.instance;
  // Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
  apiClient.setEnv(CoboWaas2.Env.DEV);
  // Replace `<YOUR_PRIVATE_KEY>` with your private key
  apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
  // Call the API
  const apiInstance = new CoboWaas2.TransactionsApi();
  const opts = {
    ContractCallParams: CoboWaas2.ContractCallParams.constructFromObject({
      request_id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      chain_id: "ETH",
      source: {
        source_type: "Org-Controlled",
        wallet_id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        address: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      },
      destination: {
        destination_type: "EVM_Contract",
        address: "0x0406db8351aa6839169bb363f63c2c808fee8f99",
        calldata:
          "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO",
      },
    }),
  };
  apiInstance.createContractCallTransaction(opts).then(
    (data) => {
      console.log("API called successfully. Returned data: " + data);
    },
    (error) => {
      console.error(error);
    },
  );

  ```
</RequestExample>


## OpenAPI

````yaml post /transactions/contract_call
openapi: 3.0.3
info:
  title: Cobo Wallet as a Service 2.0
  description: >
    The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo's
    WaaS API offering. It enables you to access Cobo's full suite of crypto
    wallet technologies with powerful and flexible access controls. By
    encapsulating complex security protocols and streamlining blockchain
    interactions, this API allows you to concentrate on your core business
    activities without worrying about the safety of your assets. The WaaS 2.0
    API presents the following key features:


    - A unified API for Cobo's [all four wallet
    types](https://manuals.cobo.com/en/portal/introduction#an-all-in-one-wallet-platform)

    - Support for 80+ chains and 3000+ tokens

    - A comprehensive selection of webhook events

    - Flexible usage models for MPC Wallets, including [Organization-Controlled
    Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ocw/introduction)
    and [User-Controlled
    Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/ucw/introduction)

    - Programmatic control of smart contract wallets such as Safe{Wallet} with
    fine-grained access controls

    - Seamlessly transfer funds across multiple exchanges, including Binance,
    OKX, Bybit, Deribit, and more


    For more information about the WaaS 2.0 API, see [Introduction to WaaS
    2.0](https://www.cobo.com/developers/v2/guides/overview/introduction).
  termsOfService: https://cobo.com/waas/tos/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: Cobo WaaS
    url: https://www.cobo.com/waas
    email: help@cobo.com
  version: 1.0.0
servers:
  - url: https://api.dev.cobo.com/v2
    description: Development environment
  - url: https://api.cobo.com/v2
    description: Production environment
security:
  - CoboAuth: []
tags:
  - name: Organizations
    description: Operations related to Organizations.
  - name: Wallets
    description: Operations related to all wallets.
  - name: Wallets - MPC Wallets
    description: Operations related to mpc wallet.
  - name: Wallets - Exchange Wallet
    description: Operations related to exchange wallet.
  - name: Wallets - Smart Contract Wallets
    description: Operations related to smart contract wallet.
  - name: Transactions
    description: Operations related to all transactions.
  - name: Developers - Webhooks
    description: Operations related to webhooks.
  - name: Stakings
    description: Operations related to staking.
  - name: OAuth
    description: Operations related to OAuth.
  - name: Developers
    description: Operations related to developers.
  - name: AddressBooks
    description: Operations related to address books.
  - name: TravelRule
    description: Operations related to travel rule.
  - name: GraphQL
    description: Operations related to executing GraphQL queries and mutations.
  - name: PrimeBroker
    description: Operations related to prime broker.
  - name: AppWorkflows
    description: Operations related to app workflow.
  - name: FeeStation
    description: Operations related to fee station.
  - name: Payment
    description: Operations related to payment.
  - name: Batch Payouts
    description: Operations related to batch payouts.
  - name: Tokenization
    description: Operations related to tokenization.
  - name: AutoSweep
    description: Operations related to auto sweep.
  - name: Compliance
    description: Operations related to compliance.
paths:
  /transactions/contract_call:
    post:
      tags:
        - Transactions
      summary: Call smart contract
      description: >
        This operation creates a transaction to interact with a smart contract
        on the blockchain.


        You need to provide details such as the source address, destination
        address, and the calldata. You can specify the fee-related properties to
        limit the transaction fee. A transaction request for tracking is
        returned upon successful operation.


        For smart contract call examples, you can refer to [Batch transfers
        using smart contracts](/v2/guides/transactions/batch-transfer) and [Swap
        tokens on Solana using
        Jupiter](/v2/guides/transactions/sol-jupiter-swap).


        <Note>This operation uses `request_id` to prevent duplicate contract
        call requests. The `request_id` must be unique within the same
        organization. Duplicate requests with the same `request_id` will be
        rejected with an error and will not be executed again.</Note>


        <Info>

        Supported actions vary by blockchain:

        - EVM chains — Support deploying contracts and calling contract
        functions.

        - Solana — Supports calling contract functions only.

        - TRON — Supports calling contract functions only.

        - Stellar — Supports XLM trustline creation only.

        - Cosmos — Supports initiating Cosmos native message-based transactions,
        such as transfers and staking operations.

        </Info>


        <Note>Currently, this operation only applies to transactions from
        Custodial Wallets (Web3 Wallets), MPC Wallets, or Smart Contract
        Wallets. Refer to the `destination` property for supported contract
        types.</Note>


        <Info>If you initiate a transaction from a Smart Contract Wallet, a
        relevant transaction will be triggered from the Delegate to the Cobo
        Safe's address of the Smart Contract Wallet, with a transfer amount of
        <code>0</code>.</Info>
      operationId: create_contract_call_transaction
      requestBody:
        $ref: '#/components/requestBodies/createSmartContractCallBody'
      responses:
        '201':
          $ref: '#/components/responses/createTransactionRequestResponse'
        4XX:
          $ref: '#/components/responses/badRequestError'
        5XX:
          $ref: '#/components/responses/internalServerError'
      security:
        - CoboAuth: []
        - OAuth2:
            - transaction.contract_call
components:
  requestBodies:
    createSmartContractCallBody:
      description: The request body for making a contract call.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ContractCallParams'
  responses:
    createTransactionRequestResponse:
      description: The request was successful.
      content:
        application/json:
          schema:
            type: object
            required:
              - request_id
              - transaction_id
              - status
            properties:
              request_id:
                type: string
                description: >-
                  The request ID that is used to track a transaction request.
                  The request ID is provided by you and must be unique within
                  your organization.
                example: f47ac10b-58cc-4372-a567-0e02b2c3d479
              transaction_id:
                type: string
                description: The transaction ID.
                example: c986cb3b-1301-412f-9450-13a52c43a95f
              status:
                $ref: '#/components/schemas/TransactionStatus'
    badRequestError:
      description: >-
        Bad request. Your request contains malformed syntax or invalid
        parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    internalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ContractCallParams:
      type: object
      description: The information about a transaction that interacts with a smart contract
      title: Contract call
      required:
        - request_id
        - request_type
        - chain_id
        - source
        - destination
      properties:
        request_id:
          type: string
          description: >-
            A client-defined unique request identifier (idempotency key) used to
            prevent duplicate contract call requests. It must be unique within
            the same organization. Requests with the same request ID will be
            rejected with an error.
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        chain_id:
          type: string
          description: >-
            The chain ID, which is the unique identifier of a blockchain. You
            can retrieve the IDs of all the chains you can use by calling [List
            enabled
            chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).
          example: ETH
        source:
          $ref: '#/components/schemas/ContractCallSource'
        destination:
          $ref: '#/components/schemas/ContractCallDestination'
        description:
          type: string
          description: >-
            The description of the contract call transaction. Maximum length is
            2048 characters for MPC Wallets and Custodial Wallets (Web3
            Wallets), and 1000 characters for Custodial Wallets (Asset Wallets).
          example: Transaction to call a smart contract initiated from a wallet
        category_names:
          type: array
          description: The custom category for you to identify your transactions.
          items:
            type: string
            example: Trading
        fee:
          $ref: '#/components/schemas/TransactionRequestFee'
        transaction_process_type:
          $ref: '#/components/schemas/TransactionProcessType'
        auto_fuel:
          $ref: '#/components/schemas/AutoFuelType'
        pre_check:
          $ref: '#/components/schemas/PreCheck'
    TransactionStatus:
      type: string
      enum:
        - Submitted
        - PendingScreening
        - PendingAuthorization
        - PendingSignature
        - Broadcasting
        - Confirming
        - Completed
        - Failed
        - Rejected
        - Pending
      example: Submitted
      description: >
        The transaction status. For more details including sub-statuses, please
        refer to [Transaction statuses and
        sub-statuses](https://www.cobo.com/developers/v2/guides/transactions/status).
    ErrorResponse:
      type: object
      description: The response of a failed request.
      required:
        - error_code
        - error_message
        - error_id
      properties:
        error_code:
          type: integer
          description: >-
            The error code. Refer to [Error codes and status
            codes](https://www.cobo.com/developers/v2/api-references/error-codes)
            for more details.
        error_message:
          type: string
          description: The error description.
        error_id:
          type: string
          description: >-
            The error log ID. You can provide the error ID when submitting a
            ticket to help Cobo to locate the issue.
          example: 0b6ddf19083c4bd1a9ca01bec44b24dd
    ContractCallSource:
      oneOf:
        - $ref: '#/components/schemas/MpcContractCallSource'
        - $ref: '#/components/schemas/SafeContractCallSource'
        - $ref: '#/components/schemas/CustodialWeb3ContractCallSource'
      discriminator:
        propertyName: source_type
        mapping:
          Org-Controlled:
            $ref: '#/components/schemas/MpcContractCallSource'
          User-Controlled:
            $ref: '#/components/schemas/MpcContractCallSource'
          Safe{Wallet}:
            $ref: '#/components/schemas/SafeContractCallSource'
          Web3:
            $ref: '#/components/schemas/CustodialWeb3ContractCallSource'
    ContractCallDestination:
      oneOf:
        - $ref: '#/components/schemas/EvmContractCallDestination'
        - $ref: '#/components/schemas/SolContractCallDestination'
        - $ref: '#/components/schemas/StellarContractCallDestination'
        - $ref: '#/components/schemas/TronContractCallDestination'
        - $ref: '#/components/schemas/CosmosContractCallDestination'
      discriminator:
        propertyName: destination_type
        mapping:
          EVM_Contract:
            $ref: '#/components/schemas/EvmContractCallDestination'
          SOL_Contract:
            $ref: '#/components/schemas/SolContractCallDestination'
          STELLAR_Contract:
            $ref: '#/components/schemas/StellarContractCallDestination'
          TRON_Contract:
            $ref: '#/components/schemas/TronContractCallDestination'
          COSMOS_Contract:
            $ref: '#/components/schemas/CosmosContractCallDestination'
    TransactionRequestFee:
      oneOf:
        - $ref: '#/components/schemas/TransactionRequestFixedFee'
        - $ref: '#/components/schemas/TransactionRequestEvmEip1559Fee'
        - $ref: '#/components/schemas/TransactionRequestEvmLegacyFee'
        - $ref: '#/components/schemas/TransactionRequestUtxoFee'
        - $ref: '#/components/schemas/TransactionRequestSOLFee'
        - $ref: '#/components/schemas/TransactionRequestFILFee'
      discriminator:
        propertyName: fee_type
        mapping:
          Fixed:
            $ref: '#/components/schemas/TransactionRequestFixedFee'
          EVM_EIP_1559:
            $ref: '#/components/schemas/TransactionRequestEvmEip1559Fee'
          EVM_Legacy:
            $ref: '#/components/schemas/TransactionRequestEvmLegacyFee'
          UTXO:
            $ref: '#/components/schemas/TransactionRequestUtxoFee'
          SOL:
            $ref: '#/components/schemas/TransactionRequestSOLFee'
          FIL:
            $ref: '#/components/schemas/TransactionRequestFILFee'
    TransactionProcessType:
      type: string
      enum:
        - AutoProcess
        - BuildOnly
      example: AutoProcess
      description: >
        Transaction processing type. Possible values are:

        - `AutoProcess` (default): After the transaction is constructed, it will
        be automatically signed and broadcast.  

        - `BuildOnly`: Set to this value if you want to build the transaction
        first without automatically signing and broadcasting it. You can
        manually call the [Sign and broadcast
        transaction](https://www.cobo.com/developers/v2/api-references/transactions/sign-and-broadcast-transaction)
        operation to complete the signing and broadcasting process.
    AutoFuelType:
      type: string
      enum:
        - PassiveAutoFuel
        - ProActiveAutoFuel
        - UsePortalPreference
        - DisableAutoFuel
      example: PassiveAutoFuel
      description: >
        The mode of transaction fee payment using Fee Station. Currently, Fee
        Station supports transactions made with MPC Wallets on EVM-compatible
        chains, TRON, and Solana.

        For more details, refer to [Fee
        Station](https://manuals.cobo.com/en/portal/fee-station/introduction).


        - `ProActiveAutoFuel`: Always use Fee Station to pay transaction fees.  

        - `PassiveAutoFuel`: Use Fee Station only when the source address
        balance is insufficient to cover transaction fees.  

        - `UsePortalPreference`: Use fueling strategy based on the Portal
        configuration.  

        - `DisableAutoFuel`: Do not use Fee Station for transaction fee payment
        under any circumstances.  


        If this parameter is **not specified**, it defaults to the behavior of
        `UsePortalPreference`.


        **Note**: TRON and Solana does not support `PassiveAutoFuel` due to its
        fee delegation mechanism.
    PreCheck:
      type: object
      description: Some validation settings for creating a transaction.
      properties:
        skip_checks:
          type: array
          description: Selection to skip verification.
          items:
            $ref: '#/components/schemas/SkipCheckType'
    MpcContractCallSource:
      title: Org-Controlled/User-Controlled
      allOf:
        - $ref: '#/components/schemas/BaseContractCallSource'
        - type: object
          properties:
            mpc_used_key_share_holder_group:
              $ref: '#/components/schemas/MpcSigningGroup'
    SafeContractCallSource:
      title: Safe{Wallet}
      description: >
        The information about the transaction source type `Safe{Wallet}`. Refer
        to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Switch between the tabs to display the properties for different
        transaction sources.
      allOf:
        - $ref: '#/components/schemas/BaseContractCallSource'
        - type: object
          required:
            - delegate
          properties:
            delegate:
              $ref: '#/components/schemas/CoboSafeDelegate'
    CustodialWeb3ContractCallSource:
      title: Web3
      allOf:
        - $ref: '#/components/schemas/BaseContractCallSource'
    EvmContractCallDestination:
      title: EVM_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - address
        - calldata
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        address:
          type: string
          description: >
            The destination address.


            If you are deploying a new contract on an EVM chain, set this
            address to `0x0000000000000000000000000000000000000000`.
          example: '0x0406db8351aa6839169bb363f63c2c808fee8f99'
        value:
          type: string
          description: >
            The transfer amount. For example, if you trade 1.5 ETH, then the
            value is `1.5`.
          example: '1.5'
        calldata:
          type: string
          description: >
            The data used to invoke a specific function or method within the
            specified contract at the destination address, with a maximum length
            of 65,000 characters.
          example: >-
            0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO
    SolContractCallDestination:
      title: SOL_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - instructions
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        instructions:
          type: array
          items:
            $ref: '#/components/schemas/SolContractCallInstruction'
        address_lookup_table_accounts:
          type: array
          items:
            $ref: '#/components/schemas/SolContractCallAddressLookupTableAccount'
    StellarContractCallDestination:
      title: STELLAR_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - contract_param
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        contract_param:
          $ref: '#/components/schemas/StellarContractCallContractParam'
    TronContractCallDestination:
      title: TRON_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - address
        - calldata
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        address:
          type: string
          description: The destination address.
          example: '0x0406db8351aa6839169bb363f63c2c808fee8f99'
        value:
          type: string
          description: >
            The transfer amount. For example, if you trade 1.5 TRX, then the
            value is `1.5`.
          example: '1.5'
        calldata:
          type: string
          description: >
            The data that is used to invoke a specific function or method within
            the specified contract at the destination address.
          example: >-
            0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO
    CosmosContractCallDestination:
      title: COSMOS_Contract
      type: object
      description: >-
        The information about the transaction destination. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
      required:
        - destination_type
        - cosmos_messages
      properties:
        destination_type:
          $ref: '#/components/schemas/ContractCallDestinationType'
        cosmos_messages:
          type: array
          items:
            $ref: '#/components/schemas/CosmosContractCallMessage'
    TransactionRequestFixedFee:
      type: object
      description: >
        The preset properties to limit transaction fee.


        In the fixed fee model, the transaction fee is a fixed amount within a
        certain amount of period regardless of the transaction size or network
        congestion, which can vary between different chains. For more
        information about the fixed fee model, refer to [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).


        You can specify the maximum fee amount to limit the transaction fee. The
        transaction will fail if the transaction fee exceeds the specified
        maximum fee amount.


        Switch between the tabs to display the properties for different
        transaction fee models.
      title: Fixed
      required:
        - fee_type
        - token_id
      allOf:
        - type: object
          properties:
            fee_type:
              $ref: '#/components/schemas/FeeType'
            token_id:
              type: string
              description: The token used to pay the transaction fee.
              example: TRON
        - $ref: '#/components/schemas/MaxFeeAmount'
    TransactionRequestEvmEip1559Fee:
      type: object
      description: >
        The preset properties to limit transaction fee.


        For more information about the EIP-1559 fee model, refer to [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).


        You can specify the maximum gas fee per gas unit, maximum priority fee
        per gas unit, and the gas limit to limit the gas price, priority fee per
        gas unit, gas units used in the transaction. 


        Switch between the tabs to display the properties for different
        transaction fee models.
      title: EVM_EIP_1559
      required:
        - fee_type
        - token_id
        - max_fee_per_gas
        - max_priority_fee_per_gas
      allOf:
        - type: object
          properties:
            fee_type:
              $ref: '#/components/schemas/FeeType'
            token_id:
              type: string
              description: The token used to pay the transaction fee.
              example: ETH
            gas_limit:
              type: string
              description: >-
                The gas limit. It represents the maximum number of gas units
                that you are willing to pay for the execution of a transaction
                or Ethereum Virtual Machine (EVM) operation. The gas unit cost
                of each operation varies.
              example: '21000'
        - $ref: '#/components/schemas/EvmEip1559FeeBasePrice'
    TransactionRequestEvmLegacyFee:
      type: object
      description: >
        The preset properties to limit transaction fee.


        For more information about the Legacy fee model, refer to [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).


        You can specify the gas limit to limit the gas units used in the
        transaction.


        Switch between the tabs to display the properties for different
        transaction fee models.
      required:
        - fee_type
        - token_id
        - gas_price
      title: EVM_Legacy
      allOf:
        - type: object
          properties:
            fee_type:
              $ref: '#/components/schemas/FeeType'
            token_id:
              type: string
              description: The token used to pay the transaction fee.
              example: ETH
            gas_limit:
              type: string
              description: >-
                The gas limit. It represents the maximum number of gas units
                that you are willing to pay for the execution of a transaction
                or Ethereum Virtual Machine (EVM) operation. The gas unit cost
                of each operation varies.
              example: '21000'
        - $ref: '#/components/schemas/EvmLegacyFeeBasePrice'
    TransactionRequestUtxoFee:
      type: object
      description: >
        The preset properties to limit transaction fee.


        For more information about the UTXO fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).


        You can specify the maximum fee amount to limit the transaction fee. The
        transaction will fail if the transaction fee exceeds the specified
        maximum fee amount.


        Switch between the tabs to display the properties for different
        transaction fee models.
      required:
        - fee_type
        - token_id
      title: UTXO
      allOf:
        - type: object
          properties:
            fee_type:
              $ref: '#/components/schemas/FeeType'
            token_id:
              type: string
              description: The token used to pay the transaction fee.
              example: BTC
            max_fee_amount:
              type: string
              description: >-
                The maximum fee that you are willing to pay for the transaction.
                Provide the value without applying precision. The transaction
                will fail if the transaction fee exceeds the maximum fee.
              example: '0.1'
        - $ref: '#/components/schemas/UtxoFeeBasePrice'
    TransactionRequestSOLFee:
      type: object
      description: >
        The preset properties to limit transaction fee.


        For more information about the SOL fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).


        You can specify CU price and CU limit to adjust the priority and
        resource allocation of your transaction.


        Switch between the tabs to display the properties for different
        transaction fee models.
      title: SOL
      required:
        - fee_type
        - token_id
        - compute_unit_price
        - compute_unit_limit
      allOf:
        - type: object
          properties:
            fee_type:
              $ref: '#/components/schemas/FeeType'
            token_id:
              type: string
              description: The token used to pay the transaction fee.
              example: ETH
        - $ref: '#/components/schemas/SOLComputeUnit'
    TransactionRequestFILFee:
      type: object
      description: >
        The preset properties to limit transaction fee.


        For more information about the FIL fee model, see [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).


        You can specify the gas fee cap, gas premium, and gas limit to control
        fee behavior and prioritization.


        Switch between the tabs to display the properties for different
        transaction fee models.
      title: FIL
      required:
        - fee_type
        - token_id
        - gas_fee_cap
        - gas_premium
      allOf:
        - type: object
          properties:
            fee_type:
              $ref: '#/components/schemas/FeeType'
            token_id:
              type: string
              description: The token used to pay the transaction fee.
              example: ETH
        - $ref: '#/components/schemas/FILPrice'
    SkipCheckType:
      type: string
      enum:
        - OnchainFeeBalance
      example: OnchainFeeBalance
      description: |
        The skip check type. Possible values include:
          - `OnchainFeeBalance`: The system does not verify whether the balance is sufficient to pay the on-chain transaction fees; currently, this only applies to the TRON chain for MPC and Custodial Web3 wallets.
    BaseContractCallSource:
      type: object
      description: >
        The information about the transaction source type. Refer to [Transaction
        sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Switch between the tabs to display the properties for different
        transaction sources.
      required:
        - source_type
        - wallet_id
        - address
      properties:
        source_type:
          $ref: '#/components/schemas/ContractCallSourceType'
        wallet_id:
          type: string
          format: uuid
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
          description: The wallet ID.
        address:
          type: string
          description: The wallet address.
          example: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045'
    MpcSigningGroup:
      type: object
      description: The information about the Signing Group of an MPC Wallet.
      required:
        - used_key_share_holder_group_id
      properties:
        used_key_share_holder_group_id:
          type: string
          description: The ID of the Signing Group.
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
        used_tss_node_ids:
          type: array
          items:
            type: string
            example: cobo5yb7BNEBwwp5XXedbhnzQfvQtp132W4dH4Jz4x4eDp4KA
          description: >-
            The ID of the TSS Nodes that are required to participate in the
            signature.
    CoboSafeDelegate:
      oneOf:
        - $ref: '#/components/schemas/MPCDelegate'
      discriminator:
        propertyName: delegate_type
        mapping:
          Org-Controlled:
            $ref: '#/components/schemas/MPCDelegate'
          User-Controlled:
            $ref: '#/components/schemas/MPCDelegate'
    ContractCallDestinationType:
      type: string
      enum:
        - EVM_Contract
        - SOL_Contract
        - STELLAR_Contract
        - TRON_Contract
        - COSMOS_Contract
      example: EVM_Contract
      description: >
        The type of the contract format. Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.
    SolContractCallInstruction:
      title: SOL Instruction
      type: object
      description: The information about the Solana instruction.
      required:
        - accounts
        - data
        - program_id
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/SolContractCallAccount'
        data:
          type: string
          description: >
            The Base64-encoded instruction data used for interacting with a
            Solana program.
          example: >-
            37u9WtQpcm6ULa3WRQHmj49EPs4if7o9f1jSRVZpm2dvihR9C8jY4NqEwXUbLwx15HBSNcP1
        program_id:
          type: string
          description: |
            The address of the Solana program (smart contract). 
          example: MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr
    SolContractCallAddressLookupTableAccount:
      title: SOL Address Lookup Table Account
      type: object
      description: The information about a Solana Address Lookup Table account.
      required:
        - alt_account_key
        - addresses
      properties:
        alt_account_key:
          type: string
          description: >-
            The on-chain public key of the Address Lookup Table (ALT) account,
            identifying the specific lookup table.
          example: ALT1Xyz9A1b2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q
        addresses:
          type: array
          items:
            type: string
            example: G7a1b2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9
          description: >-
            An array of stored account addresses within the lookup table, which
            can be referenced in transactions by index.
    StellarContractCallContractParam:
      oneOf:
        - $ref: '#/components/schemas/StellarContractCallTrustLineParam'
      discriminator:
        propertyName: contract_type
        mapping:
          TrustLine:
            $ref: '#/components/schemas/StellarContractCallTrustLineParam'
    CosmosContractCallMessage:
      title: Cosmos Message
      type: object
      description: The information about the Cosmos message.
      required:
        - type_url
        - message
      properties:
        type_url:
          type: string
          description: |
            The type URL of the Cosmos message.
          example: /babylon.btcstaking.v1.MsgCreateBTCDelegation
        message:
          type: string
          description: |
            The Base64-encoded Cosmos message.
          example: >-
            eyJ0eXBlIjoiYmFiY29zZS5idGNzdGFnaW5nLnYxLk1zZ0NyZWF0ZUJUQ0RlbGVnYXRpb24iLCJtZXNzYWdlIjp7ImNvbW1hbmRfaWQiOiJjb21tYW5kX2lkIiwibWVzc2FnZV92YWx1ZSI6Im1lc3NhZ2VfdmFsdWUiLCJtZXNzYWdlX3R5cGUiOiJtZXNzYWdlX3R5cGUifX0=
    FeeType:
      type: string
      enum:
        - Fixed
        - EVM_EIP_1559
        - EVM_Legacy
        - UTXO
        - SOL
        - FIL
      example: EVM_EIP_1559
      default: EVM_EIP_1559
      description: >
        The fee model. Possible values include:

        - `Fixed`: The fixed fee model. 

        - `EVM_EIP_1559`: The EIP-1559 fee model.

        - `EVM_Legacy`: The legacy fee model.

        - `UTXO`: The fee model used in UTXO-based blockchains, such as Bitcoin.

        - `SOL`: The fee model used in Solana.

        - `FIL`: The fee model used in Filecoin.



        Each fee model requires a different set of properties. Switch between
        the above tabs for details.


        To learn more about the fee models, refer to [Fee
        models](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees#fee-models).
    MaxFeeAmount:
      type: object
      properties:
        max_fee_amount:
          type: string
          description: >-
            The maximum fee that you are willing to pay for the transaction.
            Provide the value without applying precision. The transaction will
            fail if the transaction fee exceeds the maximum fee.
          example: '0.1'
    EvmEip1559FeeBasePrice:
      type: object
      properties:
        max_fee_per_gas:
          type: string
          description: The maximum gas fee per gas unit used on the chain, in wei.
          example: '9000000000000'
        max_priority_fee_per_gas:
          type: string
          description: >-
            The maximum priority fee per gas unit used, in wei. The maximum
            priority fee represents the highest amount of miner tips that you
            are willing to pay for your transaction.
          example: '1000000000000'
    EvmLegacyFeeBasePrice:
      type: object
      properties:
        gas_price:
          type: string
          description: >-
            The gas price, in wei. The gas price represents the amount of ETH
            that must be paid to validators for processing transactions per gas
            unit used.
          example: '100000000'
    UtxoFeeBasePrice:
      type: object
      properties:
        fee_rate:
          type: string
          description: >-
            The fee rate in sat/vByte. The fee rate represents the satoshis you
            are willing to pay for each byte of data that your transaction will
            consume on the blockchain.
          example: '50'
    SOLComputeUnit:
      type: object
      properties:
        compute_unit_price:
          type: string
          description: >-
            The price paid per compute unit. This value determines the priority
            fee for the transaction, allowing you to increase inclusion
            probability in congested conditions.
          example: '0.0001'
        compute_unit_limit:
          type: string
          description: >-
            The maximum number of compute units your transaction is allowed to
            consume. It sets an upper bound on computational resource usage to
            prevent overload.
          example: '200000'
    FILPrice:
      type: object
      properties:
        gas_premium:
          type: string
          description: >-
            An optional tip you can include to prioritize your transaction. The
            gas premium incentivizes miners to include your transaction sooner
            than those offering only the base fee.
          example: '0.0001'
        gas_fee_cap:
          type: string
          description: The maximum gas price you are willing to pay per unit of gas.
          example: '0.00035'
        gas_limit:
          type: string
          description: The maximum amount of gas your transaction is allowed to consume.
          example: '500'
    ContractCallSourceType:
      type: string
      enum:
        - Web3
        - Org-Controlled
        - User-Controlled
        - Safe{Wallet}
      example: Org-Controlled
      description: >
        The type of the source. Refer to [Transaction sources and
        destinations](https://www.cobo.com/developers/v2/guides/transactions/sources-and-destinations)
        for a detailed introduction about the supported sources and destinations
        for each transaction type.


        Each source type requires a different set of properties. Switch between
        the above tabs for details.
    MPCDelegate:
      title: MPC Wallet Delegate
      description: >-
        The information about the MPC Wallet as the Delegate. You can call the
        [List
        Delegates](https://www.cobo.com/developers/v2/api-references/wallets--smart-contract-wallets/list-delegates)
        operation to retrieve the applicable Delegates.
      type: object
      required:
        - delegate_type
        - wallet_id
        - address
      properties:
        delegate_type:
          $ref: '#/components/schemas/CoboSafeDelegateType'
        wallet_id:
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
          description: >-
            The wallet ID of the Delegate. This is required when initiating a
            transfer or contract call from Smart Contract Wallets
            (Safe{Wallet}).
        address:
          type: string
          example: '0x1234567890123456789012345678901234567890'
          description: >-
            The wallet address of the Delegate. This is required when initiating
            a transfer or contract call from Smart Contract Wallets
            (Safe{Wallet}).
    SolContractCallAccount:
      title: SOL Instruction Account
      type: object
      description: The information about the account involved in a Solana instruction.
      required:
        - pubkey
        - is_signer
        - is_writable
      properties:
        pubkey:
          type: string
          description: >
            The public key of the account. If the account is a signer of this
            transaction, this property must be the same as the value of the
            `source.address` property.
          example: E4MhQWiqCLER3fFZNf8LyQFpLWW3BRxtsR5eps3c3vNS
        is_signer:
          type: boolean
          description: |
            Whether the account is the signer of this transaction:
            - `true`: The account is a signer.
            - `false`: The account is not a signer.
          example: true
        is_writable:
          type: boolean
          description: |
            Whether the account can be modified by the instruction:
            - `true`: The account can be modified by the instruction.
            - `false`: The account cannot be modified by the instruction.
          example: true
    StellarContractCallTrustLineParam:
      title: Stellar_TrustLine_Param
      type: object
      description: Parameters related to Stellar trustline operations.
      required:
        - contract_type
        - token_id
        - operation_type
      properties:
        contract_type:
          $ref: '#/components/schemas/StellarContractCallContractType'
        token_id:
          type: string
          description: The token ID, which is the unique identifier of a token.
          example: XLM_USDC
        operation_type:
          $ref: '#/components/schemas/StellarContractCallTrustLineOperationType'
    CoboSafeDelegateType:
      type: string
      enum:
        - Org-Controlled
        - User-Controlled
      example: Org-Controlled
      default: Org-Controlled
      description: |
        The wallet subtype of the Delegate. Possible values include:
        - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets).
        - `User-Controlled`: MPC Wallets (User-Controlled Wallets).
    StellarContractCallContractType:
      type: string
      enum:
        - TrustLine
      example: TrustLine
      description: |
        The type of the Stellar contract.
    StellarContractCallTrustLineOperationType:
      type: string
      enum:
        - ChangeTrust
      example: ChangeTrust
      description: |
        Operations to manage trustlines on the Stellar network.
  securitySchemes:
    CoboAuth:
      type: apiKey
      in: header
      name: BIZ-API-KEY
      description: >
        The API key. For more details, refer to [API
        key](https://www.cobo.com/developers/v2/guides/overview/cobo-auth#api-key).


        In the API playground, enter your [API
        secret](https://www.cobo.com/developers/v2/guides/overview/cobo-auth#api-secret),
        and your API key will be accordingly calculated.
    OAuth2:
      type: oauth2
      description: >-
        The [Org Access
        Token](https://www.cobo.com/developers/v2/apps/org-access-tokens). Use
        this authorization method only if you are developing Cobo Portal Apps
        for installation and use across different organizations.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.cobo.com/authorize
          tokenUrl: https://auth.cobo.com/oauth/token
          scopes:
            address_book.read: Read address book
            api_key.read: Read API key information
            callback.read: Read callback message
            callback.resend: Resend callback message
            wallet.create: Create wallet
            wallet.read: Read wallet information
            wallet.update: Update wallet information
            wallet.delete: Delete wallet information
            wallet.create_address: Create wallet address
            wallet.manage_utxo: Manage UTXO
            mpc_project.create: Create MPC project
            mpc_project.read: Read MPC project information
            mpc_project.update: Update MPC project information
            mpc_vault.create: Create MPC Vault
            mpc_vault.read: Read MPC Vault information
            mpc_vault.update: Update MPC Vault information
            mpc_key_group.create: Create MPC key group
            mpc_key_group.read: Read MPC key group information
            mpc_key_group.update: Update MPC key group information
            mpc_key_group.delete: Delete MPC key group information
            transaction.read: Read transaction information
            transaction.withdraw: Make withdrawals
            transaction.estimate_fee: Estimate transaction fee
            transaction.contract_call: Initiate contract calls
            transaction.message_sign: Initiate message signings
            transaction.stake: Stake assets
            transaction.unstake: Unstake assets
            transaction.unstake_withdraw: Withdraw unstaked assets
            transaction.manage: Manage ongoing transactions
            transaction.update: Update transaction notes
            travel_rule.read: Read travel rule information
            travel_rule.edit: Edit travel rule information
            webhook.read: Read webhook URLs/events
            webhook.edit: Edit webhook URLs
            webhook.resend: Resend webhook events
            payment_orders_payin.create: Create pay-in order
            payment_orders_payin.read: Read pay-in order information
            payment_orders_payin.update: Update pay-in order
            payment_orders_refund.create: Create payment refund order
            payment_orders_refund.read: Read payment refund order information
            payment_settlement.create: Create payment settlement request
            payment_settlement.read: Read payment settlement request information
            payment_merchant.create: Create payment merchant
            payment_merchant.read: Read payment merchant information
            payment_merchant.update: Update payment merchant
            payment_forced_sweep.create: Create payment force sweep request
            payment_forced_sweep.read: Read payment force sweep request information
            compliance_funds.refund: Refund compliance funds request
            compliance_funds.isolate: Isolate compliance funds request
            compliance_funds.unfreeze: Unfreeze compliance funds request
            compliance_funds.read: Read compliance funds request information
            compliance_kyt_review.update: Update KYT review status
            compliance_kyt_decisions.update: Update KYT decision status
            compliance_kyt_status.read: Read KYT screening status
            compliance_kya_screenings.create: Create KYA address screening requests
            compliance_kya_screenings.read: Read KYA address screening results

````