Skip to content
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

Refactored error handling and minor code cleanup #15

Closed
wants to merge 4 commits into from
Closed

Refactored error handling and minor code cleanup #15

wants to merge 4 commits into from

Conversation

paanvaannd
Copy link

@paanvaannd paanvaannd commented Aug 29, 2017

throw has been deprecated in newer versions of Solidity in favor of the assert, revert, and require functions. The 4 instances of throw in this code have been refactored to utilize the new preferred functions instead. The logic in these checkpoints was also adjusted to reflect the usage of the newer functions.

My editor seems to have automatically deleted extraneous whitespaces within the document, as visible in the comparison. I manually included a space between all instances of if and the following ( for consistency's sake, since a couple instances did not have a whitespace between if and ( though most of them did.

Please look over the changes to the error handling checkpoints and consequent changes to the logic applied in those checkpoints. I have made all changes based off of what little I understand of the holistic function of those checks.

Even if I implemented the incorrect logic or used the wrong refactored functions (e.g. I used assert whereas I should have used require, or vice-versa), I have hopefully pointed out the areas that need to be properly refactored in order to comply with current and planned Solidity changes.

e: minor text fix

@D-Nice
Copy link
Contributor

D-Nice commented Sep 4, 2017

Hi Pavan,

Your contribution is appreciated, however, these changes would make oraclizeAPI_0.4.sol incompatible with many of the 0.4 subversions, and it is very important for us to keep backwards compatibility in place. After some testing and auditing we may look to integrate your contributions in a new file, which makes it clear it is targeted at a minimum 0.4.* subversion and ready for the Metropolis changes.

@marcogiglio
Copy link
Contributor

@paanvaannd we have integrated some of you suggestions in the oraclizeAPI_0.5.sol. Thanks for your contribution! I will now close this PR, since it has been superseded by #23

@marcogiglio marcogiglio closed this Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants