BondCallback
Olympus Bond Callback
Methods
MINTR
function MINTR() external view returns (contract MINTRv1)
Returns
Name | Type | Description |
---|
_0 | contract MINTRv1 | undefined |
ROLES
function ROLES() external view returns (contract ROLESv1)
Returns
Name | Type | Description |
---|
_0 | contract ROLESv1 | undefined |
TRSRY
function TRSRY() external view returns (contract TRSRYv1)
Returns
Name | Type | Description |
---|
_0 | contract TRSRYv1 | undefined |
aggregator
function aggregator() external view returns (contract IBondAggregator)
Returns
Name | Type | Description |
---|
_0 | contract IBondAggregator | undefined |
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
Name | Type | Description |
---|
id_ | uint256 | ID of the market |
Returns
Name | Type | Description |
---|
in_ | uint256 | Amount of quote tokens bonded to the market |
out_ | uint256 | Amount of payout tokens paid out to the market |
approvedMarkets
function approvedMarkets(address, uint256) external view returns (bool)
Parameters
Name | Type | Description |
---|
_0 | address | undefined |
_1 | uint256 | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
batchToTreasury
function batchToTreasury(contract ERC20[] tokens_) external nonpayable
Send tokens to the TRSRY in a batch
Parameters
Name | Type | Description |
---|
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
Name | Type | Description |
---|
teller_ | address | Address of the Teller contract which serves the market |
id_ | uint256 | ID 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
Name | Type | Description |
---|
id_ | uint256 | ID of the market |
inputAmount_ | uint256 | Amount of quote tokens bonded to the market |
outputAmount_ | uint256 | Amount 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
Name | Type | Description |
---|
newKernel_ | contract Kernel | undefined |
function configureDependencies() external nonpayable returns (Keycode[] dependencies)
Define module dependencies for this policy.
Returns
Name | Type | Description |
---|
dependencies | Keycode[] | - Keycode array of module dependencies. |
isActive
function isActive() external view returns (bool)
Easily accessible indicator for if a policy is activated or not.
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
kernel
function kernel() external view returns (contract Kernel)
Returns
Name | Type | Description |
---|
_0 | contract Kernel | undefined |
ohm
function ohm() external view returns (contract ERC20)
Returns
Name | Type | Description |
---|
_0 | contract ERC20 | undefined |
operator
function operator() external view returns (contract Operator)
Returns
Name | Type | Description |
---|
_0 | contract Operator | undefined |
priorBalances
function priorBalances(contract ERC20) external view returns (uint256)
Parameters
Name | Type | Description |
---|
_0 | contract ERC20 | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
requestPermissions
function requestPermissions() external view returns (struct Permissions[] requests)
Function called by kernel to set module function permissions.
Returns
Name | Type | Description |
---|
requests | Permissions[] | - 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
Name | Type | Description |
---|
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
Name | Type | Description |
---|
teller_ | address | Address of the Teller contract which serves the market |
id_ | uint256 | ID of the market |
Errors
Callback_InvalidParams
error Callback_InvalidParams()
Callback_MarketNotSupported
error Callback_MarketNotSupported(uint256 id)
Parameters
Name | Type | Description |
---|
id | uint256 | undefined |
Callback_TokensNotReceived
error Callback_TokensNotReceived()
KernelAdapter_OnlyKernel
error KernelAdapter_OnlyKernel(address caller_)
Parameters
Name | Type | Description |
---|
caller_ | address | undefined |
Policy_ModuleDoesNotExist
error Policy_ModuleDoesNotExist(Keycode keycode_)
Parameters
Name | Type | Description |
---|
keycode_ | Keycode | undefined |