Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity ^0.4.7;
- import "./usingOraclize.sol";
- contract TestOraclize is
- usingOraclize
- {
- event LOG_Query(bytes32 _queryId, string _arg);
- event LOG_Callback(bytes32 _queryId, string _result);
- modifier onlyOraclize { if (msg.sender != oraclize_cbAddress()) throw; _; }
- function TestOraclize () {
- OAR = OraclizeAddrResolverI(0xd17e1233a03affb9092d5109179b43d6a8828607);
- }
- // discard this after testing.
- function OAR_getAddress() returns (address _addr) {
- _addr = OAR.getAddress();
- }
- function test_oraclize(string _datasource, string _arg)
- returns (bytes32 _queryId) {
- _queryId = oraclize_query(_datasource, _arg);
- LOG_Query(_queryId, _arg);
- }
- function __callback(bytes32 _queryId, string _result, bytes _proof) onlyOraclize {
- LOG_Callback(_queryId, _result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement