OracleV1
Kiln
Oracle (v1)
This contract handles the input from the allowed oracle members. Highly inspired by Lido's implementation.
Methods
acceptAdmin
Accept the transfer of ownership
Only callable by the pending admin. Resets the pending admin if succesful.
addMember
Adds new address as oracle member, giving the ability to push cl reports.
Only callable by the adminstratorModifying the quorum clears all the reporting data
Parameters
getAdmin
Retrieves the current admin address
Returns
getCLSpec
Retrieve the current cl spec
Returns
getCurrentEpochId
Retrieve the current epoch id based on block timestamp
Returns
getCurrentFrame
Retrieve the current frame details
Returns
getExpectedEpochId
Retrieve expected epoch id
Returns
getFrameFirstEpochId
Retrieve the first epoch id of the frame of the provided epoch id
Parameters
Returns
getGlobalReportStatus
Retrieve member report status
Returns
getLastCompletedEpochId
Retrieve the last completed epoch id
Returns
getMemberReportStatus
Retrieve member report status
Parameters
Returns
getOracleMembers
Retrieve the list of oracle members
Returns
getPendingAdmin
Retrieve the current pending admin address
Returns
getQuorum
Retrieve the current quorum
Returns
getReportBounds
Retrieve the report bounds
Returns
getReportVariant
Retrieve decoded report at provided index
Parameters
Returns
getReportVariantsCount
Retrieve report variants count
Returns
getRiver
Retrieve River address
Returns
getTime
Retrieve the block timestamp
Returns
initOracleV1
Initializes the oracle
Parameters
isMember
Returns true if address is member
Performs a naive search, do not call this on-chain, used as an off-chain helper
Parameters
Returns
proposeAdmin
Proposes a new address as admin
This security prevents setting an invalid address as an admin. The pendingadmin has to claim its ownership of the contract, and prove that the newaddress is able to perform regular transactions.
Parameters
removeMember
Removes an address from the oracle members.
Only callable by the adminstratorModifying the quorum clears all the reporting dataRemaining members that have already voted should vote again for the same frame.
Parameters
reportConsensusLayerData
Report cl chain data
Only callable by an oracle memberThe epoch id is expected to be >= to the expected epoch id stored in the contractThe epoch id is expected to be the first epoch of its frameThe Consensus Layer Validator count is the amount of running validators managed by River.Until withdrawals are enabled, this count also takes into account any exited and slashed validatoras funds are still locked on the consensus layer.
Parameters
setCLSpec
Edits the cl spec parameters
Only callable by the adminstrator
Parameters
setMember
Changes the address of an oracle member
Only callable by the adminitratorCannot use an address already in useThis call will clear all the reporting data
Parameters
setQuorum
Edits the quorum required to forward cl data to River
Modifying the quorum clears all the reporting data
Parameters
setReportBounds
Edits the cl bounds parameters
Only callable by the adminstrator
Parameters
Events
AddMember
A member has been added to the oracle member list
Parameters
CLReported
Consensus Layer data has been reported by an oracle member
Parameters
ExpectedEpochIdUpdated
The expected epoch id has been changed
Parameters
Initialize
Emitted when the contract is properly initialized
Parameters
PostTotalShares
The report has been submitted to river
Parameters
RemoveMember
A member has been removed from the oracle member list
Parameters
SetAdmin
The admin address changed
Parameters
SetBounds
The report bounds have been changed
Parameters
SetMember
A member address has been edited
Parameters
SetPendingAdmin
The pending admin address changed
Parameters
SetQuorum
The storage quorum value has been changed
Parameters
SetRiver
The storage river address value has been changed
Parameters
SetSpec
The consensus layer spec has been changed
Parameters
Errors
AddressAlreadyInUse
The address is already in use by an oracle member
Parameters
AlreadyReported
The member already reported on the given epoch id
Parameters
EpochTooOld
The provided epoch is too old compared to the expected epoch id
Parameters
InvalidArgument
The argument was invalid
InvalidCall
The call was invalid
InvalidInitialization
An error occured during the initialization
Parameters
InvalidZeroAddress
The address is zero
NotFrameFirstEpochId
The provided epoch is not at the beginning of its frame
Parameters
TotalValidatorBalanceDecreaseOutOfBound
The negative delta in balance is above the allowed lower bound
Parameters
TotalValidatorBalanceIncreaseOutOfBound
The delta in balance is above the allowed upper bound
Parameters
Unauthorized
The operator is unauthorized for the caller
Parameters
Last updated