---
title: "Perform multiple contract calls across blockchains (BETA)"
method: POST
path: "/v1/quote/contractCalls"
---

# Perform multiple contract calls across blockchains (BETA)

`POST /v1/quote/contractCalls`

## Request

- Base URL: `https://li.quest`
- URL: `https://li.quest/v1/quote/contractCalls`
- Auth: none declared
- TypeScript: <https://skmtc.dev/lifi/apis/li-fi-api/docs/v1/quote/contractCalls/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint can be used to bridge tokens, swap them and perform a number or arbitrary contract calls on the destination chain. You can find an example of it [here](https://github.com/lifinance/sdk/tree/main/examples).
This functionality is currently in beta. While we've worked hard to ensure its stability and functionality, there might still be some rough edges.

## Headers

- `x-lifi-api-key` string

## Request body

- ContractCallsRequest: Object defining instructions on how to perform multiple cross-chain/same-chain calls
  - `fromChain` number, required: The sending chain. Can be the chain id or chain key
  - `fromToken` string, required: The token that should be transferred. Can be the address or the symbol
  - `fromAddress` string, required: The wallet that will send the transaction and contains the starting token
  - `toChain` number, required: The receiving chain. Can be the chain id or chain key
  - `toToken` string, required: The token required to perform the contract interaction (can be something to stake, donate or to be used as payment)
  - `toAmount` string, required: The amount of token required by the contract interaction. The LI.FI API will try and generate a quote that guarantees at least that amount on the destination chain.
  - `contractCalls` ContractCall[], required
    - `fromAmount` string, required: The amount that will feed into this contract call. This is not dependent on how much was bridged or deposited before - it's the *expected* amount of token available on order to execute the call.
    - `fromTokenAddress` string, required: The token that will feed into this contract call. E.g. a ETH staking transaction would expect to have ETH available.
    - `toContractAddress` string, required: The address of the contract to interact with.
    - `toContractCallData` string, required: The calldata to be sent to the contract for the interaction on the destination chain.
    - `toContractGasLimit` string, required: The estimated gas used by the destination call. If this value is incorrect, the interaction may fail -- choose this carefully!
    - `toApprovalAddress` string: If the approval address is different thant the contract to call, specify that address here
    - `toTokenAddress` string: If the contract outputs a token, specify its address here. (E.g. staking ETH produces stETH)
  - `toFallbackAddress` string: If the call fails, use this address to send the bridged tokens to. If none is specified, the sending address will be used.
  - `contractOutputsToken` string: Some contract interactions will output a token. This is the case in things like staking. Omit this parameter if no token should be returned to the user.
  - `slippage` number, double: The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.
  - `integrator` string: A string containing tracking information about the integrator of the API
  - `referrer` string: A string containing tracking information about the referrer of the integrator
  - `allowBridges` string[]: List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
  - `denyBridges` string[]: List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
  - `preferBridges` string[]: List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
  - `allowExchanges` string[]: List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
  - `denyExchanges` string[]: List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
  - `preferExchanges` string[]: List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
  - `allowDestinationCall` boolean: Whether swaps or other contract calls should be allowed as part of the destination transaction of a bridge transfer. Separate swap transactions on the destination chain are not affected by this flag. By default, parameter is `true`.
  - `fee` number, double: The percent of the integrator's fee that is taken from every transaction. The maximum fee amount should be less than 100%.

## Response `200`

Object listing all the currently enabled bridges and exchanges.

- Tools
  - `exchanges` Exchange[]
    - `key` string: Identifier for an exchange tool. Retrieve the latest exchange keys from the `/v1/tools` endpoint. Keywords such as `all`, `none`, `default`, and `[]` are also supported where applicable.
    - `name` string: The common name of the tool
    - `logoURI` string: The logo of the tool
    - `supportedChains` string: The chains which are supported on this exchange
  - `bridges` Bridge[]
    - `key` string: Identifier for a bridge tool. Retrieve the latest bridge keys from the `/v1/tools` endpoint. Keywords such as `all`, `none`, `default`, and `[]` are also supported where applicable.
    - `name` string: The common name of the tool
    - `logoURI` string: The logo of the tool
    - `supportedChains` SupportedChains[]
      - `fromChainId` string: Supported `from` chain
      - `toChainId` string: Supported `to` chain

---

[API](https://skmtc.dev/lifi/apis/li-fi-api.md) - [All operations](https://skmtc.dev/lifi/apis/li-fi-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lifi/apis/li-fi-api/revisions/82e72a7fa5e0?raw)
