RONtoUSDOracle.sol 598 B

1234567891011121314151617181920212223242526272829
  1. pragma solidity ^0.4.21;
  2. contract RONtoUSDOracle {
  3. address public owner;
  4. uint private ronToUSDRate;
  5. event CallbackGetRONtoUSD();
  6. function RONtoUSDOracle() public {
  7. owner = msg.sender;
  8. }
  9. function updateRONtoUSD() public {
  10. emit CallbackGetRONtoUSD();
  11. }
  12. function setRONToUSDRate(uint rate) public {
  13. // If it isn't sent by a trusted oracle a.k.a ourselves, ignore it
  14. require(msg.sender == owner);
  15. ronToUSDRate = rate;
  16. }
  17. function getRonToUSDRate() public constant returns (uint) {
  18. return ronToUSDRate;
  19. }
  20. }