updateRate()
updateRate(uint256 newRate) whenNotPaused external returns (bool success)
updateRate(uint256 newRate) whenNotPaused external returns (bool success)Description
The update rate function can only be called by the oracle when the linked asset instance is not paused. This function is used by the oracle contract to set the new price rate of the linked asset.
Note that the oracle can use an on-chain asset as input. This means that the oracle does not have to be a centralized oracle implementation. It can be a fully decentralized implementation, this is the choice of the linked asset instance creator.
require
#The update rate function can only be called by the oracle.
require(msg.sender == oracle);input
#The inputs is the new price for the linked asset.
uint256 newRateoutput
#Returns true on succesful execution.
returns (bool success)Last updated
Was this helpful?