Skip to main content

BondCallback

Olympus Bond Callback

Methods

MINTR

function MINTR() external view returns (contract MINTRv1)

Returns

NameTypeDescription
_0contract MINTRv1undefined

ROLES

function ROLES() external view returns (contract ROLESv1)

Returns

NameTypeDescription
_0contract ROLESv1undefined

TRSRY

function TRSRY() external view returns (contract TRSRYv1)

Returns

NameTypeDescription
_0contract TRSRYv1undefined

aggregator

function aggregator() external view returns (contract IBondAggregator)

Returns

NameTypeDescription
_0contract IBondAggregatorundefined

amountsForMarket

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

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

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

approvedMarkets

function approvedMarkets(address, uint256) external view returns (bool)

Parameters

NameTypeDescription
_0addressundefined
_1uint256undefined

Returns

NameTypeDescription
_0boolundefined

batchToTreasury

function batchToTreasury(contract ERC20[] tokens_) external nonpayable

Send tokens to the TRSRY in a batch

Parameters

NameTypeDescription
tokens_contract ERC20[]- Array of tokens to send

blacklist

function blacklist(address teller_, uint256 id_) external nonpayable

Remove a market ID on a teller from the whitelist

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

Parameters

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

callback

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

Send payout tokens to Teller while allowing market owners to perform custom logic on received or paid out tokensMarket ID on Teller must be whitelisted

Must transfer the output amount of payout tokens back to the TellerShould check that the quote tokens have been transferred to the contract in the _callback function

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

changeKernel

function changeKernel(contract Kernel newKernel_) external nonpayable

Function used by kernel when migrating to a new kernel.

Parameters

NameTypeDescription
newKernel_contract Kernelundefined

configureDependencies

function configureDependencies() external nonpayable returns (Keycode[] dependencies)

Define module dependencies for this policy.

Returns

NameTypeDescription
dependenciesKeycode[]- Keycode array of module dependencies.

isActive

function isActive() external view returns (bool)

Easily accessible indicator for if a policy is activated or not.

Returns

NameTypeDescription
_0boolundefined

kernel

function kernel() external view returns (contract Kernel)

Returns

NameTypeDescription
_0contract Kernelundefined

ohm

function ohm() external view returns (contract ERC20)

Returns

NameTypeDescription
_0contract ERC20undefined

operator

function operator() external view returns (contract Operator)

Returns

NameTypeDescription
_0contract Operatorundefined

priorBalances

function priorBalances(contract ERC20) external view returns (uint256)

Parameters

NameTypeDescription
_0contract ERC20undefined

Returns

NameTypeDescription
_0uint256undefined

requestPermissions

function requestPermissions() external view returns (struct Permissions[] requests)

Function called by kernel to set module function permissions.

Returns

NameTypeDescription
requestsPermissions[]- Array of keycodes and function selectors for requested permissions.

setOperator

function setOperator(contract Operator operator_) external nonpayable

Sets the operator contract for the callback to use to report bond purchasesMust be set before the callback is used

Parameters

NameTypeDescription
operator_contract Operator- Address of the Operator contract

whitelist

function whitelist(address teller_, uint256 id_) external nonpayable

Whitelist a teller and market ID combinationMust be callback owner

Parameters

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

Errors

Callback_InvalidParams

error Callback_InvalidParams()

Callback_MarketNotSupported

error Callback_MarketNotSupported(uint256 id)

Parameters

NameTypeDescription
iduint256undefined

Callback_TokensNotReceived

error Callback_TokensNotReceived()

KernelAdapter_OnlyKernel

error KernelAdapter_OnlyKernel(address caller_)

Parameters

NameTypeDescription
caller_addressundefined

Policy_ModuleDoesNotExist

error Policy_ModuleDoesNotExist(Keycode keycode_)

Parameters

NameTypeDescription
keycode_Keycodeundefined