IMarketSettlement.sol
IMarketSettlement
Interface for the Market settlement task contract.
createSettlementTask
function createSettlementTask(address market) external
Creates a settlement task for a given market.
Parameters:
Name Type Description market address The address of the chromatic market contract to be settled.
cancelSettlementTask
function cancelSettlementTask(address market) external
Cancels a settlement task for a given market.
Parameters:
Name Type Description market address The address of the chromatic market contract for which to cancel the settlement task.
resolveSettlement
function resolveSettlement(address market, bytes extraData) external view returns (bool canExec, bytes execPayload)
Resolves the settlement of a market.
This function is called by the automation system.
Parameters:
Name Type Description market address The address of the market contract. extraData bytes passed by keeper for passing offchain data Return Values:
Name Type Description canExec bool Whether the settlement can be executed. execPayload bytes The encoded function call to execute the settlement.
settle
function settle(address market) external
Settles a market.
Parameters:
Name Type Description market address The address of the market contract.
updatePrice
function updatePrice(address market, bytes extraData) external
Updates the price using off-chain data.
Parameters:
Name Type Description market address The address of the market contract. extraData bytes passed by keeper for passing offchain data
withdraw
function withdraw(address recipient, uint256 amount) external
Withdraws a specified amount of funds from the contract to a recipient address.
Parameters:
Name Type Description recipient address The address that will receive the withdrawn funds. amount uint256 The amount of funds to be withdrawn.