-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Targeting solidity compiler v0.4.18 and updated to silence warnings #23
Changes from 1 commit
93638f5
8d16ad6
b2d21ac
4cef9b8
dab6ac9
6551cbc
b6c0fbd
5cb8617
430fdf2
82cabde
0394647
3d1b197
6a3f405
ef27f51
db63f33
1ae72c5
62bc14c
d50ea57
f5c4bba
d6a3c7e
023914a
0ada9bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,19 +32,19 @@ pragma solidity ^0.4.0;//please import oraclizeAPI_pre0.4.sol when solidity < 0. | |
|
||
contract OraclizeI { | ||
address public cbAddress; | ||
function query(uint _timestamp, string _datasource, string _arg) payable returns (bytes32 _id); | ||
function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) payable returns (bytes32 _id); | ||
function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) payable returns (bytes32 _id); | ||
function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) payable returns (bytes32 _id); | ||
function queryN(uint _timestamp, string _datasource, bytes _argN) payable returns (bytes32 _id); | ||
function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) payable returns (bytes32 _id); | ||
function getPrice(string _datasource) returns (uint _dsprice); | ||
function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice); | ||
function useCoupon(string _coupon); | ||
function setProofType(byte _proofType); | ||
function setConfig(bytes32 _config); | ||
function setCustomGasPrice(uint _gasPrice); | ||
function randomDS_getSessionPubKeyHash() returns(bytes32); | ||
function query(uint _timestamp, string _datasource, string _arg) public payable returns (bytes32 _id); | ||
function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) public payable returns (bytes32 _id); | ||
function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) public payable returns (bytes32 _id); | ||
function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) public payable returns (bytes32 _id); | ||
function queryN(uint _timestamp, string _datasource, bytes _argN) public payable returns (bytes32 _id); | ||
function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) public payable returns (bytes32 _id); | ||
function getPrice(string _datasource) public returns (uint _dsprice); | ||
function getPrice(string _datasource, uint gaslimit) public returns (uint _dsprice); | ||
function useCoupon(string _coupon) public; | ||
function setProofType(byte _proofType) public; | ||
function setConfig(bytes32 _config) public; | ||
function setCustomGasPrice(uint _gasPrice) public; | ||
function randomDS_getSessionPubKeyHash() public returns(bytes32); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These visibility specifiers should ideally match with what they actually are in https://github.com/oraclize/ethereum-api/blob/master/connectors/oraclizeConnector.sol Most are in fact external. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah and it seems there may be even gas savings: https://ethereum.stackexchange.com/questions/19380/external-vs-public-best-practices |
||
} | ||
contract OraclizeAddrResolverI { | ||
function getAddress() returns (address _addr); | ||
|
@@ -119,10 +119,10 @@ contract usingOraclize { | |
return false; | ||
} | ||
|
||
function __callback(bytes32 myid, string result) { | ||
function __callback(bytes32 myid, string result) public { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should the default methods implement check to ensure msg.sender is Oraclize cbAddress??? Or is it expected to fallback/be overriden. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That extra-check would slightly increase the gas usage on deployment for every contract, as most of them only deploy the _callback with proof. And I also believe it would be redundant, as most of them will have that check any way in the implemented callback. So I believe it is better to leave it as it is. |
||
__callback(myid, result, new bytes(0)); | ||
} | ||
function __callback(bytes32 myid, string result, bytes proof) { | ||
function __callback(bytes32 myid, string result, bytes proof) public { | ||
} | ||
|
||
function oraclize_useCoupon(string code) oraclizeAPI internal { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bertani This (
useCoupon
) is no longer in the connector. Should these be removed, or kept for backwards compatibility. In case of the latter, appropriate comments should be added for each instance of it that it's a deprecated method.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for backward compatibility here, since only future deployed contracts are going to use this file anyway.. and those contracts will run on the current connector?