ILM_PC_KPIRewarder_v1.sol
Functions
postAssertion
Posts an assertion to the Optimistic Oracle, specifying the KPI to use and the asserted value.
Parameters
dataId
bytes32
The dataId to be posted.
assertedValue
uint256
The target value that will be asserted and posted as data to the oracle.
asserter
address
The address of the asserter.
targetKPI
uint256
The KPI to be used for distribution once the assertion confirms.
Returns
assertionId
bytes32
The assertionId received for the posted assertion.
createKPI
Creates a KPI for the Rewarder.
Parameters
_continuous
bool
Should the tranche rewards be distributed continuously or in steps.
_trancheValues
uint256[]
The value at which the tranches end.
_trancheRewards
uint256[]
The rewards to be distributed at completion of each tranche.
Returns
<none>
uint256
The KPI id.
depositFeeFunds
Deposits funds into the contract so it can pay for the oracle bond and fee itself.
Parameters
amount
uint256
The amount to deposit.
getKPI
Returns the KPI with the given number.
Parameters
KPInum
uint256
The number of the KPI to return.
Returns
<none>
KPI
The KPI.
getAssertionConfig
Returns the Assertion Configuration for a given assertionId.
Parameters
assertionId
bytes32
The id of the Assertion to return.
Returns
<none>
RewardRoundConfiguration
The Assertion Configuration.
deleteStuckAssertion
Deletes a stuck assertion.
This function is only callable by the Orchestrator Admin.
Parameters
assertionId
bytes32
The id of the assertion to delete.
getKPICounter
Returns the current KPI counter.
Returns
<none>
uint256
The KPI counter.
getAssertionPending
Returns the assertion pending flag.
Returns
<none>
bool
The assertion pending flag.
Events
KPICreated
Event emitted when a KPI is created.
Parameters
KPI_Id
uint256
The id of the KPI.
numOfTranches
uint256
The number of tranches in the KPI.
totalKPIRewards
uint256
The total rewards for the KPI.
continuous
bool
Whether the KPI is continuous or not.
trancheValues
uint256[]
The values at which each tranche ends.
trancheRewards
uint256[]
The rewards to be distributed at completion of each tranche.
RewardRoundConfigured
Event emitted when a reward round is configured.
Parameters
assertionId
bytes32
The id of the assertion.
creationTime
uint256
The timestamp the assertion was created.
assertedValue
uint256
The value that was asserted.
KpiToUse
uint256
The KPI to be used for distribution once the assertion confirms.
FeeFundsDeposited
Event emitted when funds for paying the bonding fee are deposited into the contract.
Parameters
token
address
The token used for the deposit.
amount
uint256
The amount deposited.
DeletedStuckAssertion
Event emitted when a stuck assertion gets deleted.
Errors
Module__LM_PC_KPIRewarder_v1__InvalidTrancheNumber
The KPI beinge created has either no tranches or too many.
Module__LM_PC_KPIRewarder_v1__InvalidKPIValueLengths
The number of tranches in the KPI does not match the number of rewards.
Module__LM_PC_KPIRewarder_v1__InvalidKPITrancheValues
The values for the tranches are not in ascending order.
Module__LM_PC_KPIRewarder_v1__InvalidKPINumber
The KPI number is invalid.
Module__LM_PC_KPIRewarder_v1__ModuleCannotUseStakingTokenAsBond
The Token used paying the bond cannot be the same that is being staked.
Module__LM_PC_KPIRewarder_v1__UnresolvedAssertionExists
An assertion can only by posted if the preceding one is resolved.
Module__LM_PC_KPIRewarder_v1__CannotStakeWhenAssertionPending
The user cannot stake while an assertion is unresolved.
Module__LM_PC_KPIRewarder_v1__NonExistentAssertionId
Callback received references non existent assertionId.
Module__LM_PC_KPIRewarder_v1__AssertionNotStuck
The assertion that is being removed was not stuck.
Structs
KPI
A KPI to be used for reward distribution.
Properties
numOfTranches
uint256
The number of tranches the KPI is divided into.
totalRewards
uint256
The total rewards to be distributed.
continuous
bool
If the tranche rewards should be distributed continuously or in steps.
trancheValues
uint256[]
The value at which each tranche ends.
trancheRewards
uint256[]
The rewards to be distributed at completion of each tranche.
RewardRoundConfiguration
The configuration of the reward round tied.
Properties
creationTime
uint256
The timestamp the assertion was posted.
assertedValue
uint256
The value that was asserted.
KpiToUse
uint256
The KPI to be used for distribution once the assertion confirms.
distributed
bool
If the rewards have been distributed or not.
Last updated