Skip to main content

GelatoVaultEarningDistributor.sol

GelatoVaultEarningDistributor

makerEarningDistributionTaskIds

mapping(address => bytes32) makerEarningDistributionTaskIds

marketEarningDistributionTaskIds

mapping(address => bytes32) marketEarningDistributionTaskIds

constructor

constructor(contract IChromaticMarketFactory _factory, address _automate) public

createMakerEarningDistributionTask

function createMakerEarningDistributionTask(address token) external

Creates a maker earning distribution task for a token.

This function can only be called by the Chromatic factory contract or the DAO. Throws an ExistMakerEarningDistributionTask error if a maker earning distribution task already exists for the token.

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the settlement token.

cancelGelatoTask

function cancelGelatoTask(bytes32 taskId) external

cancelMakerEarningDistributionTask

function cancelMakerEarningDistributionTask(address token) external

Cancels a maker earning distribution task for a token.

  • Parameters:

    NameTypeDescription
    tokenaddressThe address of the settlement token.

resolveMakerEarningDistribution

function resolveMakerEarningDistribution(address token) external view returns (bool canExec, bytes execPayload)

Resolves the maker earning distribution for a specific token.

  • Parameters:

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

    NameTypeDescription
    canExecboolTrue if the distribution can be executed, otherwise False.
    execPayloadbytesThe payload for executing the distribution.

createMarketEarningDistributionTask

function createMarketEarningDistributionTask(address market) external

Creates a market earning distribution task for a market.

This function can only be called by the Chromatic factory contract or the DAO. Throws an ExistMarketEarningDistributionTask error if a market earning distribution task already exists for the market.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.

cancelMarketEarningDistributionTask

function cancelMarketEarningDistributionTask(address market) external

Cancels a market earning distribution task for a market.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.

resolveMarketEarningDistribution

function resolveMarketEarningDistribution(address market) external view returns (bool canExec, bytes execPayload)

Resolves the market earning distribution for a market.

  • Parameters:

    NameTypeDescription
    marketaddressThe address of the market.
  • Return Values:

    NameTypeDescription
    canExecboolTrue if the distribution can be executed.
    execPayloadbytesThe payload for executing the distribution.

_getFeeInfo

function _getFeeInfo() internal view returns (uint256 fee, address feePayee)

_resolverModuleArg

function _resolverModuleArg(bytes _resolverData) internal view returns (bytes)

_timeTriggerModuleArg

function _timeTriggerModuleArg(uint256 _startTime, uint256 _interval) internal pure returns (bytes)

_proxyModuleArg

function _proxyModuleArg() internal pure returns (bytes)