Skip to main content

IBondCallback

Git Source

Functions

callback

Send payout tokens to Teller while allowing market owners to perform custom logic on received or paid out tokens

Market ID on Teller must be whitelisted

Must transfer the output amount of payout tokens back to the Teller

Should check that the quote tokens have been transferred to the contract in the _callback function

function callback(uint256 id_, uint256 inputAmount_, uint256 outputAmount_) external;

Parameters

NameTypeDescription
id_uint256ID of the market
inputAmount_uint256Amount of quote tokens bonded to the market
outputAmount_uint256Amount of payout tokens to be paid out to the market

amountsForMarket

Returns the number of quote tokens received and payout tokens paid out for a market

function amountsForMarket(uint256 id_) external view returns (uint256 in_, uint256 out_);

Parameters

NameTypeDescription
id_uint256ID of the market

Returns

NameTypeDescription
in_uint256Amount of quote tokens bonded to the market
out_uint256Amount of payout tokens paid out to the market

whitelist

Whitelist a teller and market ID combination

Must be callback owner

function whitelist(address teller_, uint256 id_) external;

Parameters

NameTypeDescription
teller_addressAddress of the Teller contract which serves the market
id_uint256ID of the market

blacklist

Remove a market ID on a teller from the whitelist

Shutdown function in case there's an issue with the teller

function blacklist(address teller_, uint256 id_) external;

Parameters

NameTypeDescription
teller_addressAddress of the Teller contract which serves the market
id_uint256ID of the market to remove from whitelist