usingOraclize.sol

View Source: contracts/external/oraclizeAPI.sol

usingOraclize

Structs

buffer

struct buffer {
bytes buf,
uint256 capacity
}

Contract Members

Constants & Variables

//public members
address public cbAddress;
//private members
uint8 private constant MAJOR_TYPE_INT;
uint8 private constant MAJOR_TYPE_MAP;
uint8 private constant MAJOR_TYPE_BYTES;
uint8 private constant MAJOR_TYPE_ARRAY;
uint8 private constant MAJOR_TYPE_STRING;
uint8 private constant MAJOR_TYPE_NEGATIVE_INT;
uint8 private constant MAJOR_TYPE_CONTENT_FREE;
//internal members
contract OraclizeI internal oraclize;
contract OraclizeAddrResolverI internal OAR;
uint256 internal constant day;
uint256 internal constant week;
uint256 internal constant month;
bytes1 internal constant proofType_NONE;
bytes1 internal constant proofType_Ledger;
bytes1 internal constant proofType_Native;
bytes1 internal constant proofStorage_IPFS;
bytes1 internal constant proofType_Android;
bytes1 internal constant proofType_TLSNotary;
string internal oraclize_network_name;
uint8 internal constant networkID_auto;
uint8 internal constant networkID_morden;
uint8 internal constant networkID_mainnet;
uint8 internal constant networkID_testnet;
uint8 internal constant networkID_consensys;
mapping(bytes32 => bytes32) internal oraclize_randomDS_args;
mapping(bytes32 => bool) internal oraclize_randomDS_sessionKeysHashVerified;

Modifiers

oraclizeAPI

modifier oraclizeAPI() internal

Arguments

Name

Type

Description

oraclize_randomDS_proofVerify

modifier oraclize_randomDS_proofVerify(bytes32 _queryId, string _result, bytes _proof) internal

Arguments

Name

Type

Description

_queryId

bytes32

_result

string

_proof

bytes

Functions

f

function f(bytes x) external nonpayable

Arguments

Name

Type

Description

x

bytes

setProofType

function setProofType(bytes1 _proofType) external nonpayable

Arguments

Name

Type

Description

_proofType

bytes1

setCustomGasPrice

function setCustomGasPrice(uint256 _gasPrice) external nonpayable

Arguments

Name

Type

Description

_gasPrice

uint256

getPrice

function getPrice(string _datasource) public nonpayable
returns(_dsprice uint256)

Arguments

Name

Type

Description

_datasource

string

randomDS_getSessionPubKeyHash

function randomDS_getSessionPubKeyHash() external view
returns(_sessionKeyHash bytes32)

Arguments

Name

Type

Description

getPrice

function getPrice(string _datasource, uint256 _gasLimit) public nonpayable
returns(_dsprice uint256)

Arguments

Name

Type

Description

_datasource

string

_gasLimit

uint256

queryN

function queryN(uint256 _timestamp, string _datasource, bytes _argN) public payable
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_argN

bytes

query

function query(uint256 _timestamp, string _datasource, string _arg) external payable
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_arg

string

query2

function query2(uint256 _timestamp, string _datasource, string _arg1, string _arg2) public payable
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_arg1

string

_arg2

string

query_withGasLimit

function query_withGasLimit(uint256 _timestamp, string _datasource, string _arg, uint256 _gasLimit) external payable
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_arg

string

_gasLimit

uint256

queryN_withGasLimit

function queryN_withGasLimit(uint256 _timestamp, string _datasource, bytes _argN, uint256 _gasLimit) external payable
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_argN

bytes

_gasLimit

uint256

query2_withGasLimit

function query2_withGasLimit(uint256 _timestamp, string _datasource, string _arg1, string _arg2, uint256 _gasLimit) external payable
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_arg1

string

_arg2

string

_gasLimit

uint256

getAddress

function getAddress() public nonpayable
returns(_address address)

Arguments

Name

Type

Description

init

function init(struct Buffer.buffer _buf, uint256 _capacity) internal pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

_capacity

uint256

resize

function resize(struct Buffer.buffer _buf, uint256 _capacity) private pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

_capacity

uint256

max

function max(uint256 _a, uint256 _b) private pure
returns(_max uint256)

Arguments

Name

Type

Description

_a

uint256

_b

uint256

append

Appends a byte array to the end of the buffer. Resizes if doing so would exceed the capacity of the buffer.

function append(struct Buffer.buffer _buf, bytes _data) internal pure
returns(_buffer struct Buffer.buffer)

Returns

The original buffer.

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

The buffer to append to.

_data

bytes

The data to append.

append

Appends a byte to the end of the buffer. Resizes if doing so would exceed the capacity of the buffer.

function append(struct Buffer.buffer _buf, uint8 _data) internal pure

Returns

The original buffer.

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

The buffer to append to.

_data

uint8

The data to append.

appendInt

Appends a byte to the end of the buffer. Resizes if doing so would exceed the capacity of the buffer.

function appendInt(struct Buffer.buffer _buf, uint256 _data, uint256 _len) internal pure
returns(_buffer struct Buffer.buffer)

Returns

The original buffer.

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

The buffer to append to.

_data

uint256

The data to append.

_len

uint256

encodeType

function encodeType(struct Buffer.buffer _buf, uint8 _major, uint256 _value) private pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

_major

uint8

_value

uint256

encodeIndefiniteLengthType

function encodeIndefiniteLengthType(struct Buffer.buffer _buf, uint8 _major) private pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

_major

uint8

encodeUInt

function encodeUInt(struct Buffer.buffer _buf, uint256 _value) internal pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

_value

uint256

encodeInt

function encodeInt(struct Buffer.buffer _buf, int256 _value) internal pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

_value

int256

encodeBytes

function encodeBytes(struct Buffer.buffer _buf, bytes _value) internal pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

_value

bytes

encodeString

function encodeString(struct Buffer.buffer _buf, string _value) internal pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

_value

string

startArray

function startArray(struct Buffer.buffer _buf) internal pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

startMap

function startMap(struct Buffer.buffer _buf) internal pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

endSequence

function endSequence(struct Buffer.buffer _buf) internal pure

Arguments

Name

Type

Description

_buf

struct Buffer.buffer

oraclize_setNetwork

function oraclize_setNetwork(uint8 _networkID) internal nonpayable
returns(_networkSet bool)

Arguments

Name

Type

Description

_networkID

uint8

oraclize_setNetworkName

function oraclize_setNetworkName(string _network_name) internal nonpayable

Arguments

Name

Type

Description

_network_name

string

oraclize_getNetworkName

function oraclize_getNetworkName() internal view
returns(_networkName string)

Arguments

Name

Type

Description

oraclize_setNetwork

function oraclize_setNetwork() internal nonpayable
returns(_networkSet bool)

Arguments

Name

Type

Description

__callback

function __callback(bytes32 _myid, string _result) public nonpayable

Arguments

Name

Type

Description

_myid

bytes32

_result

string

__callback

function __callback(bytes32 _myid, string _result, bytes _proof) public nonpayable

Arguments

Name

Type

Description

_myid

bytes32

_result

string

_proof

bytes

oraclize_getPrice

function oraclize_getPrice(string _datasource) internal nonpayable oraclizeAPI
returns(_queryPrice uint256)

Arguments

Name

Type

Description

_datasource

string

oraclize_getPrice

function oraclize_getPrice(string _datasource, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_queryPrice uint256)

Arguments

Name

Type

Description

_datasource

string

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string _arg) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_arg

string

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string _arg) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_arg

string

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string _arg, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_arg

string

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string _arg, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_arg

string

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string _arg1, string _arg2) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_arg1

string

_arg2

string

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string _arg1, string _arg2) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_arg1

string

_arg2

string

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string _arg1, string _arg2, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_arg1

string

_arg2

string

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string _arg1, string _arg2, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_arg1

string

_arg2

string

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[] _argN) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_argN

string[]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[] _argN) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_argN

string[]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[] _argN, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_argN

string[]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[] _argN, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_argN

string[]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[1] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[1]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[1] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[1]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[1] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[1]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[1] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[1]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[2] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[2]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[2] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[2]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[2] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[2]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[2] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[2]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[3] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[3]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[3] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[3]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[3] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[3]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[3] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[3]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[4] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[4]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[4] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[4]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[4] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[4]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[4] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[4]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[5] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[5]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[5] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[5]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, string[5] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

string[5]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, string[5] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

string[5]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, bytes[] _argN) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_argN

bytes[]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, bytes[] _argN) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_argN

bytes[]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, bytes[] _argN, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_argN

bytes[]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, bytes[] _argN, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_argN

bytes[]

_gasLimit

uint256

oraclize_query

function oraclize_query(string _datasource, bytes[1] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_datasource

string

_args

bytes[1]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, bytes[1] _args) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

bytes[1]

oraclize_query

function oraclize_query(uint256 _timestamp, string _datasource, bytes[1] _args, uint256 _gasLimit) internal nonpayable oraclizeAPI
returns(_id bytes32)

Arguments

Name

Type

Description

_timestamp

uint256

_datasource

string

_args

bytes[1]

_gasLimit

uint256

oraclize_query