Skip to content

Instantly share code, notes, and snippets.

@TheBojda
Created August 19, 2017 12:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheBojda/63493d9ec6f174ce746ab68db9068bc4 to your computer and use it in GitHub Desktop.
Save TheBojda/63493d9ec6f174ce746ab68db9068bc4 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
$("#blockchain button.set").click(function() {
var value = parseInt($("#blockchain input.text").val(), 10);
SimpleStorage.set(value);
addToLog("#blockchain", "SimpleStorage.set(" + value + ")");
});
$("#blockchain button.get").click(function() {
SimpleStorage.get().then(function(value) {
$("#blockchain .value").html(value.toNumber());
});
addToLog("#blockchain", "SimpleStorage.get()");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment