Last active
May 18, 2018 08:46
-
-
Save ugurcemozturk/da7faf94e15f4d188d36ea95c22b438e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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