Skip to content

Instantly share code, notes, and snippets.

@dougvk
Created March 26, 2018 18:38
Show Gist options
  • Save dougvk/7a5f69df9892f7846e51d7151a8ec564 to your computer and use it in GitHub Desktop.
Save dougvk/7a5f69df9892f7846e51d7151a8ec564 to your computer and use it in GitHub Desktop.
SL interface

SL Oracle

Usage

Activation

To activate the SL Oracle the user needs to include the following event in their smart contract

RequestSL(uint nonce)

The nonce should be a unique number that is tracked inside the dapp to ensure that if, for any reason a response was sent out of sequence it could be ignored.

The user also needs to include the following function in their contract

function SetSL(uint number, uint nonce) onlySLAgent {
	// user processes the price data as required here...
	...
}

where onlySLAgent is a modifier that restricts the access to only the SL Oracle.

We need to be provided with the address of the contract (of course)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment