Skip to main content

CloberMarketSwapCallbackReceiver

CloberMarketSwapCallbackReceiver

cloberMarketSwapCallback

function cloberMarketSwapCallback(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount, bytes data) external payable

Contracts placing orders on the OrderBook must implement this method. In this method, the contract has to send the required token, or the transaction will revert. If there is a claim bounty to be refunded, it will be transferred via msg.value.

Parameters

NameTypeDescription
inputTokenaddressThe address of the token the user has to send.
outputTokenaddressThe address of the token the user has received.
inputAmountuint256The amount of tokens the user has to send.
outputAmountuint256The amount of tokens the user has received.
databytesThe user's custom callback data.