Skip to content
Feed with 1 hour delay
Solidity Makefile
Branch: master
Clone or download
Latest commit ebc7d34 Aug 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Tests and minor changes (#2) Jan 28, 2019
src Formally verified OSM (#6) Jun 26, 2019
.gitattributes Use .gitattributes for .sol syntax highlighting Feb 26, 2018
.gitignore dapp init DsDelay Feb 23, 2018
.gitmodules Tests and minor changes (#2) Jan 28, 2019
LICENSE GPL->AGPL Aug 7, 2019
Makefile Testing different approach Feb 27, 2018
README.md Update README Mar 26, 2018

README.md

Oracle Security Module

This contract is given a DSValue as a source to read from. You set a time interval with step. Whenever that step time has passed, it will let you poke. When you poke it reads the value from the source and stores it. The previous stored value becomes the current value.

This contracts implements read and peek from DSValue, but it is not one. It also has a new function peep to read what the next value will be after a poke.

// create
OSM osm = new OSM(DSValue(src));

// can be poked every hour, on the hour
osm.step(3600);

(val, ok) = osm.peek() // get current value
(val, ok) = osm.peep() // get upcoming value
val       = osm.read() // get current value, or fail

If this DSValue has a valid value on creation, the OSM with start with that same value.

You can’t perform that action at this time.