Skip to content

Instantly share code, notes, and snippets.

@ngrinkevich
Created October 8, 2018 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngrinkevich/8a273529760502803627f1cbd21133ea to your computer and use it in GitHub Desktop.
Save ngrinkevich/8a273529760502803627f1cbd21133ea to your computer and use it in GitHub Desktop.
contract CallbackContract {
uint256 internal _randomNumber;
/**
* @dev Example of a callback method.
*/
function callback(uint256 requestResponse)
public
{
_randomNumber = requestResponse;
}
/**
* @dev Returns previously set random number.
*/
function randomNumber() public view returns (uint256)
{
return _randomNumber;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment