Skip to main content

IChromaticMarketFactory.sol

IChromaticMarketFactory

Interface for the Chromatic Market Factory contract.

DaoUpdated

event DaoUpdated(address daoOld, address daoNew)

Emitted when the DAO address is updated.

  • Parameters:

    NameTypeDescription
    daoOldaddressThe old DAO address.
    daoNewaddressThe new DAO address.

TreasuryUpdated

event TreasuryUpdated(address treasuryOld, address treasuryNew)

Emitted when the DAO treasury address is updated.

  • Parameters:

    NameTypeDescription
    treasuryOldaddressThe old DAO treasury address.
    treasuryNewaddressThe new DAO treasury address.

LiquidatorUpdated

event LiquidatorUpdated(address liquidatorOld, address liquidatorNew)

Emitted when the liquidator address is updated.

  • Parameters:

    NameTypeDescription
    liquidatorOldaddressThe old liquidator address.
    liquidatorNewaddressThe new liquidator address.

KeeperFeePayerUpdated

event KeeperFeePayerUpdated(address keeperFeePayerOld, address keeperFeePayerNew)

Emitted when the keeper fee payer address is updated.

  • Parameters:

    NameTypeDescription
    keeperFeePayerOldaddressThe old keeper fee payer address.
    keeperFeePayerNewaddressThe new keeper fee payer address.

DefaultProtocolFeeRateUpdated

event DefaultProtocolFeeRateUpdated(uint16 defaultProtocolFeeRateOld, uint16 defaultProtocolFeeRateNew)

Emitted when the default protocol fee rate is updated.

  • Parameters:

    NameTypeDescription
    defaultProtocolFeeRateOlduint16The old default protocol fee rate.
    defaultProtocolFeeRateNewuint16The new default protocol fee rate.

VaultSet

event VaultSet(address vault)

Emitted when the vault address is set.

  • Parameters:

    NameTypeDescription
    vaultaddressThe vault address.

MarketSettlementUpdated

event MarketSettlementUpdated(address marketSettlementOld, address marketSettlementNew)

Emitted when the market settlement task address is updated.

  • Parameters:

    NameTypeDescription
    marketSettlementOldaddressThe old market settlement task address.
    marketSettlementNewaddressThe new market settlement task address.

MarketCreated

event MarketCreated(address oracleProvider, address settlementToken, address market)

Emitted when a market is created.

  • Parameters:

    NameTypeDescription
    oracleProvideraddressThe address of the oracle provider.
    settlementTokenaddressThe address of the settlement token.
    marketaddressThe address of the created market.

dao

function dao() external view returns (address)

Returns the address of the DAO.

  • Return Values:

    NameTypeDescription
    [0]addressThe address of the DAO.

treasury

function treasury() external view returns (address)

Returns the address of the DAO treasury.

  • Return Values:

    NameTypeDescription
    [0]addressThe address of the DAO treasury.

liquidator

function liquidator() external view returns (address)

Returns the address of the liquidator.

  • Return Values:

    NameTypeDescription
    [0]addressThe address of the liquidator.

vault

function vault() external view returns (address)

Returns the address of the vault.

  • Return Values:

    NameTypeDescription
    [0]addressThe address of the vault.

keeperFeePayer

function keeperFeePayer() external view returns (address)

Returns the address of the keeper fee payer.

  • Return Values:

    NameTypeDescription
    [0]addressThe address of the keeper fee payer.

marketSettlement

function marketSettlement() external view returns (address)

Returns the address of the market settlement task.

  • Return Values:

    NameTypeDescription
    [0]addressThe address of the market settlement task.

defaultProtocolFeeRate

function defaultProtocolFeeRate() external view returns (uint16)

Returns the default protocol fee rate.

  • Return Values:

    NameTypeDescription
    [0]uint16The default protocol fee rate.

updateDao

function updateDao(address _dao) external

Updates the DAO address.

  • Parameters:

    NameTypeDescription
    _daoaddressThe new DAO address.

updateTreasury

function updateTreasury(address _treasury) external

Updates the DAO treasury address.

  • Parameters:

    NameTypeDescription
    _treasuryaddressThe new DAO treasury address.

updateLiquidator

function updateLiquidator(address _liquidator) external

Updates the liquidator address.

  • Parameters:

    NameTypeDescription
    _liquidatoraddressThe new liquidator address.

updateKeeperFeePayer

function updateKeeperFeePayer(address _keeperFeePayer) external

Updates the keeper fee payer address.

  • Parameters:

    NameTypeDescription
    _keeperFeePayeraddressThe new keeper fee payer address.

updateDefaultProtocolFeeRate

function updateDefaultProtocolFeeRate(uint16 _defaultProtocolFeeRate) external

Updates the default protocl fee rate.

  • Parameters:

    NameTypeDescription
    _defaultProtocolFeeRateuint16The new default protocol fee rate.

setVault

function setVault(address _vault) external

Sets the vault address.

  • Parameters:

    NameTypeDescription
    _vaultaddressThe vault address.

updateMarketSettlement

function updateMarketSettlement(address _marketSettlement) external

Updates the market settlement task address.

  • Parameters:

    NameTypeDescription
    _marketSettlementaddressThe new market settlement task address.

getMarkets

function getMarkets() external view returns (address[] markets)

Returns an array of all market addresses.

  • Return Values:

    NameTypeDescription
    marketsaddress[]An array of all market addresses.

getMarketsBySettlmentToken

function getMarketsBySettlmentToken(address settlementToken) external view returns (address[])

Returns an array of market addresses associated with a settlement token.

  • Parameters:

    NameTypeDescription
    settlementTokenaddressThe address of the settlement token.
  • Return Values:

    NameTypeDescription
    [0]address[]An array of market addresses.

getMarket

function getMarket(address oracleProvider, address settlementToken) external view returns (address)

Returns the address of a market associated with an oracle provider and settlement token.

  • Parameters:

    NameTypeDescription
    oracleProvideraddressThe address of the oracle provider.
    settlementTokenaddressThe address of the settlement token.
  • Return Values:

    NameTypeDescription
    [0]addressThe address of the market.

createMarket

function createMarket(address oracleProvider, address settlementToken) external

Creates a new market associated with an oracle provider and settlement token.

  • Parameters:

    NameTypeDescription
    oracleProvideraddressThe address of the oracle provider.
    settlementTokenaddressThe address of the settlement token.

isRegisteredMarket

function isRegisteredMarket(address market) external view returns (bool)

Checks if a market is registered.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.
  • Return Values:

    NameTypeDescription
    [0]boolTrue if the market is registered, false otherwise.