Perform a contract call across blockchains (BETA)

This endpoint has been deprecated in favour of /quote/contractCalls.

post/v1/quote/contractCall

Request

Headers

x-lifi-api-keystring

Authentication header, register in the LI.FI Partner Portal (https://portal.li.fi/ ) to get your API Key.

Request body

fromChainnumber required

The sending chain. Can be the chain id or chain key

fromTokenstring required

The token that should be transferred. Can be the address or the symbol

fromAddressstring required

The wallet that will send the transaction and contains the starting token

toChainnumber required

The receiving chain. Can be the chain id or chain key

toTokenstring required

The token required to perform the contract interation (can be something to stake, donate or to be used as payment)

toAmountstring 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.

toContractAddressstring required

The address of the contract to interact with

contractOutputsTokenstring

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.

toContractCallDatastring required

The calldata to be sent to the contract for the interaction on the destination chain.

toContractGasLimitstring required

The estimated gas used by the destination call. If this value is incorrect, the interaction may fail -- choose this carefully!

toApprovalAddressstring

If the approval address is different than the contract to call, specify that address here

toFallbackAddressstring

If the call fails, use this address to send the bridged tokens to. If none is specified, the sending address will be used.

slippagenumber double

The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.

integratorstring

A string containing tracking information about the integrator of the API

referrerstring

A string containing tracking information about the referrer of the integrator

allowBridgesstring[]

List of bridges that are allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

denyBridgesstring[]

List of bridges that are not allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

preferBridgesstring[]

List of bridges that should be preferred for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

allowExchangesstring[]

List of exchanges that are allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

denyExchangesstring[]

List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

preferExchangesstring[]

List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the /v1/tools endpoint.

feenumber double

The percent of the integrator's fee that is taken from every transaction. The maximum fee amount should be less than 100%.

allowDestinationCallboolean

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.

Response

Object listing all the currently enabled bridges and exchanges.

Example response

{
  "exchanges": [
    {
      "name": "0x",
      "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.svg"
    }
  ],
  "bridges": [
    {
      "name": "Connext",
      "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/relay.svg"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.