Skip to content

Instantly share code, notes, and snippets.

@ugurcemozturk
Last active May 18, 2018 08:46
Show Gist options
  • Save ugurcemozturk/da7faf94e15f4d188d36ea95c22b438e to your computer and use it in GitHub Desktop.
Save ugurcemozturk/da7faf94e15f4d188d36ea95c22b438e to your computer and use it in GitHub Desktop.
/*
Süpriz sonlu, konulu contract
*/
pragma solidity ^0.4.19;
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
contract HappyEnding is usingOraclize {
string public result;
event newOraclizeQuery(string description);
function HappyEnding() {
update();
}
function __callback(bytes32 myid, string res) {
if (msg.sender != oraclize_cbAddress()) throw;
result = res;
}
function update() payable {
newOraclizeQuery("Istek yollandi, cevap icin bekleyelim.");
oraclize_query("URL", "https://ihk.herokuapp.com/");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment