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

# Call contract

> This operation submits a smart contract call from the specified wallet.

For EVM chains, provide `contract_addr`, `value`, and `calldata`. For Solana, provide `instructions` and optionally `address_lookup_table_accounts`.

Supply `request_id` to enable idempotency. If a contract call with the same `request_id` already exists for the same principal, the existing record is returned with `idempotent=true`.

The operation returns `status=200` (`PENDING_APPROVAL`) when an approval policy requires review. Use the `pending_operation_id` to track and resolve the approval.

<Note>Policy evaluation runs before submission. The operation returns an error if a policy denies the contract call.</Note>



## OpenAPI

````yaml post /api/v1/wallets/{wallet_uuid}/contract-call
openapi: 3.1.0
info:
  title: Cobo Agentic Wallet Service
  description: Unified wallet engine for human and agent principals
  version: 1.3.0
servers: []
security: []
paths:
  /api/v1/wallets/{wallet_uuid}/contract-call:
    post:
      tags:
        - Transactions
      summary: Call contract
      description: >-
        This operation submits a smart contract call from the specified wallet.


        For EVM chains, provide `contract_addr`, `value`, and `calldata`. For
        Solana, provide `instructions` and optionally
        `address_lookup_table_accounts`.


        Supply `request_id` to enable idempotency. If a contract call with the
        same `request_id` already exists for the same principal, the existing
        record is returned with `idempotent=true`.


        The operation returns `status=200` (`PENDING_APPROVAL`) when an approval
        policy requires review. Use the `pending_operation_id` to track and
        resolve the approval.


        <Note>Policy evaluation runs before submission. The operation returns an
        error if a policy denies the contract call.</Note>
      operationId: contract_call
      parameters:
        - name: wallet_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              The UUID of the wallet from which to execute the contract call.
              Retrieve this value from the `id` field returned when the wallet
              was created.
            title: Wallet Uuid
          description: >-
            The UUID of the wallet from which to execute the contract call.
            Retrieve this value from the `id` field returned when the wallet was
            created.
        - name: X-API-Key
          in: header
          required: false
          schema:
            title: X-Api-Key
            type: string
            nullable: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractCallCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/StandardResponse_ContractCallSubmitResult_
        '202':
          description: Accepted - Pending Approval
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/StandardResponse_ContractCallSubmitResult_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WrappedValidationError'
components:
  schemas:
    ContractCallCreate:
      properties:
        chain_id:
          type: string
          maxLength: 100
          minLength: 1
          title: Chain Id
          description: >-
            The Cobo chain ID for this contract call (for example, `SETH`,
            `BASE_ETH`, `SOL`). Use the List supported chains operation to
            retrieve all supported chain IDs.
        contract_addr:
          title: Contract Addr
          description: The EVM contract address to call. Required for EVM chains.
          type: string
          maxLength: 255
          nullable: true
        value:
          type: string
          maxLength: 100
          minLength: 1
          title: Value
          description: >-
            The ETH value to send with the call, in whole token units (not wei),
            as a decimal string. Defaults to `0`.
          default: '0'
        calldata:
          title: Calldata
          description: The ABI-encoded calldata for the EVM function call, as a hex string.
          type: string
          maxLength: 8192
          nullable: true
        instructions:
          title: Instructions
          description: The Solana instructions for this call. Required for Solana chains.
          items:
            $ref: '#/components/schemas/SolInstruction'
          type: array
          nullable: true
        address_lookup_table_accounts:
          title: Address Lookup Table Accounts
          description: Optional Solana address lookup table accounts for this call.
          items:
            $ref: '#/components/schemas/SolAddressLookupTableAccount'
          type: array
          nullable: true
        request_id:
          title: Request Id
          description: >-
            A client-supplied identifier for idempotency. If a contract call
            with the same `request_id` already exists for the same principal,
            the existing record is returned.
          type: string
          maxLength: 255
          nullable: true
        fee:
          anyOf:
            - $ref: '#/components/schemas/FeeRequest'
            - type: 'null'
          description: >-
            Optional custom fee parameters. If omitted, the network default is
            used.
        src_addr:
          title: Src Addr
          description: >-
            The source address to call from. If omitted, the server auto-selects
            the wallet address on this chain with the highest available native
            token balance for this chain (explicit `src_addr` always takes
            precedence).
          type: string
          maxLength: 255
          nullable: true
        sponsor:
          title: Sponsor
          description: >-
            Whether to use Cobo Gasless (Fee Station) to cover gas fees. `true`:
            gas fees are sponsored. `false`: gas fees are paid from the wallet.
            Defaults to `true` for human-owned wallets.
          type: boolean
          nullable: true
        gas_provider:
          title: Gas Provider
          description: >-
            The gas provider to use for sponsored transactions. If omitted, the
            server default is used.
          type: string
          maxLength: 50
          nullable: true
        description:
          title: Description
          description: >-
            Optional note stored locally and sent to WaaS as the transaction
            `description` (contract call).
          type: string
          maxLength: 512
          nullable: true
      type: object
      required:
        - chain_id
      title: ContractCallCreate
      description: Request payload for contract call (EVM or Solana).
    StandardResponse_ContractCallSubmitResult_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        result:
          $ref: '#/components/schemas/ContractCallSubmitResult'
        suggestion:
          type: string
          title: Suggestion
          default: ''
        message:
          type: string
          title: Message
          default: ''
        meta:
          $ref: '#/components/schemas/PaginationMeta'
          nullable: true
      type: object
      required:
        - result
      title: StandardResponse[ContractCallSubmitResult]
    WrappedValidationError:
      title: WrappedValidationError
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
          default: false
          title: Success
        error:
          type: object
          title: Error
          required:
            - detail
          properties:
            detail:
              type: array
              title: Detail
              items:
                $ref: '#/components/schemas/ValidationError'
    SolInstruction:
      properties:
        program_id:
          type: string
          minLength: 1
          title: Program Id
          description: The Solana program ID to invoke.
        accounts:
          items:
            $ref: '#/components/schemas/SolInstructionAccount'
          type: array
          title: Accounts
          description: The accounts involved in this instruction.
        data:
          type: string
          minLength: 1
          title: Data
          description: The instruction data as a base64-encoded string.
      type: object
      required:
        - program_id
        - accounts
        - data
      title: SolInstruction
      description: Solana contract call instruction.
    SolAddressLookupTableAccount:
      properties:
        alt_account_key:
          type: string
          minLength: 1
          title: Alt Account Key
          description: The address lookup table's public key.
        addresses:
          items:
            type: string
          type: array
          title: Addresses
          description: The list of addresses in this lookup table.
      type: object
      required:
        - alt_account_key
        - addresses
      title: SolAddressLookupTableAccount
      description: Solana address lookup table account.
    FeeRequest:
      title: FeeRequest
      description: Fee parameters for a transaction. Discriminated by `fee_type`.
      oneOf:
        - $ref: '#/components/schemas/EIP1559FeeRequest'
        - $ref: '#/components/schemas/EVMLegacyFeeRequest'
        - $ref: '#/components/schemas/SOLFeeRequest'
    ContractCallSubmitResult:
      properties:
        id:
          title: Id
          description: >-
            User transaction UUID. This ID is created at submission time,
            including `pending_approval` cases.
          type: string
          format: uuid
          nullable: true
        idempotent:
          type: boolean
          title: Idempotent
          description: >-
            Whether this response was returned from a previously submitted
            request with the same `request_id`. `true`: idempotent replay.
            `false`: new submission.
          default: false
        request_id:
          title: Request Id
          description: >-
            Client-supplied request identifier used for idempotency and request
            correlation. This is not the transaction record ID.
          type: string
          nullable: true
        pending_operation_id:
          title: Pending Operation Id
          description: >-
            The pending operation ID when `status=pending_approval`. Use this to
            track the approval via the List pending operations operation.
          type: string
          format: uuid
          nullable: true
        approval_id:
          title: Approval Id
          description: >-
            The Approval V2 record ID when `status=pending_approval`. Use this
            to track the approval via the Approvals operations.
          type: string
          format: uuid
          nullable: true
        transaction_hash:
          title: Transaction Hash
          description: The on-chain transaction hash, if available.
          type: string
          nullable: true
        status:
          type: integer
          title: Status
          description: >-
            The user transaction status code (`UserTransactionStatus`). Typical
            values: 100 (pending approval), 300 (processing), 400 (pending), 900
            (success), 901 (failed), 902 (rejected), 903 (cancelled).
        status_display:
          type: string
          title: Status Display
          description: >-
            The human-readable user transaction status (for example,
            `Initiated`, `Processing`, `Success`, `Failed`).
          default: ''
      type: object
      required:
        - status
      title: ContractCallSubmitResult
      description: Contract call submission response payload.
    PaginationMeta:
      properties:
        total:
          title: Total
          type: integer
          nullable: true
        offset:
          title: Offset
          type: integer
          nullable: true
        limit:
          title: Limit
          type: integer
          nullable: true
        has_more:
          title: Has More
          type: boolean
          nullable: true
        after:
          title: After
          type: string
          nullable: true
        before:
          title: Before
          type: string
          nullable: true
      type: object
      title: PaginationMeta
      description: |-
        Pagination metadata for list responses.

        Supports both legacy offset-based and cursor-based pagination.
        Cursor fields (``has_more``, ``after``, ``before``) are populated for
        cursor-paginated endpoints.  Legacy fields (``offset``, ``limit``) are
        populated when the caller uses the deprecated ``offset`` parameter.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SolInstructionAccount:
      properties:
        pubkey:
          type: string
          minLength: 1
          title: Pubkey
          description: The account's public key.
        is_signer:
          type: boolean
          title: Is Signer
          description: Whether this account must sign the transaction.
        is_writable:
          type: boolean
          title: Is Writable
          description: Whether this account will be modified by the instruction.
      type: object
      required:
        - pubkey
        - is_signer
        - is_writable
      title: SolInstructionAccount
      description: Solana instruction account.
    EIP1559FeeRequest:
      properties:
        fee_type:
          type: string
          const: EVM_EIP_1559
          title: Fee Type
          description: The fee type. Must be `EVM_EIP_1559`.
          default: EVM_EIP_1559
        max_fee_per_gas:
          type: string
          minLength: 1
          title: Max Fee Per Gas
          description: The maximum total fee per gas, in wei.
        max_priority_fee_per_gas:
          type: string
          minLength: 1
          title: Max Priority Fee Per Gas
          description: The maximum priority fee (tip) per gas, in wei.
        gas_limit:
          title: Gas Limit
          description: >-
            The gas limit for this transaction. If omitted the backend estimates
            it.
          type: string
          nullable: true
        token_id:
          type: string
          maxLength: 100
          minLength: 1
          title: Token Id
          description: The token ID for fee payment.
      type: object
      required:
        - max_fee_per_gas
        - max_priority_fee_per_gas
        - token_id
      title: EIP1559FeeRequest
      description: Optional EIP-1559 fee parameters for transfers.
    EVMLegacyFeeRequest:
      properties:
        fee_type:
          type: string
          const: EVM_Legacy
          title: Fee Type
          description: The fee type. Must be `EVM_Legacy`.
          default: EVM_Legacy
        gas_price:
          type: string
          minLength: 1
          title: Gas Price
          description: The gas price, in wei.
        gas_limit:
          title: Gas Limit
          description: The gas limit for this transaction.
          type: string
          nullable: true
        token_id:
          type: string
          maxLength: 100
          minLength: 1
          title: Token Id
          description: The token ID for fee payment.
      type: object
      required:
        - gas_price
        - token_id
      title: EVMLegacyFeeRequest
      description: Optional EVM Legacy fee parameters for transfers.
    SOLFeeRequest:
      properties:
        fee_type:
          type: string
          const: SOL
          title: Fee Type
          description: The fee type. Must be `SOL`.
          default: SOL
        compute_unit_price:
          type: string
          minLength: 1
          title: Compute Unit Price
          description: The price per compute unit, in microlamports.
        compute_unit_limit:
          type: string
          minLength: 1
          title: Compute Unit Limit
          description: The maximum number of compute units for this transaction.
        token_id:
          type: string
          maxLength: 100
          minLength: 1
          title: Token Id
          description: The token ID for fee payment.
      type: object
      required:
        - compute_unit_price
        - compute_unit_limit
        - token_id
      title: SOLFeeRequest
      description: Optional Solana fee parameters for transfers.

````