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

Upgrade to Solidity 0.6 #970

Merged
merged 49 commits into from
Mar 4, 2020
Merged

Upgrade to Solidity 0.6 #970

merged 49 commits into from
Mar 4, 2020

Conversation

nicholaspai
Copy link
Member

@nicholaspai nicholaspai commented Feb 25, 2020

Changes to NPM dependencies:


Had to prettier-ignore several solidity code blocks because the solidity plugin that we use for prettier does not support some of the breaking 0.6 changes. See #969 :

  • Inline assembly call in Governor that attempts to call built-in opcode gas() (previously gas) Fixed by this PR in alpha.42
  • All override methods that implement virtual methods

Changes to contract implementations

  • No longer can adjust an array's size by dynamically settings its length, for example:
 uint newLength = partyMap[parties[i]].derivatives.push(derivativeAddress);
 partyMap[parties[i]].derivativeIndex[derivativeAddress] = newLength - 1;

becomes

partyMap[parties[i]].derivatives.push(derivativeAddress);
uint newLength = partyMap[parties[i]].derivatives.length;
partyMap[parties[i]].derivativeIndex[derivativeAddress] = newLength - 1;
  • Array.push() no longer returns a value

TODO:

Fixes #815

Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
@nicholaspai
Copy link
Member Author

@mrice32 @ptare @chrismaree can you take a look at the PR notes and let me know what you think before I proceed further?

Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
@mrice32
Copy link
Member

mrice32 commented Feb 26, 2020

@ptare could you take a look at this?

@mrice32 mrice32 requested a review from ptare February 26, 2020 22:09
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
@nicholaspai
Copy link
Member Author

nicholaspai commented Feb 26, 2020

I added empty tests for docs, echidna and slither in the CI's config.yaml

Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
@nicholaspai nicholaspai marked this pull request as ready for review February 27, 2020 22:59
@nicholaspai
Copy link
Member Author

Can't merge this yet, seems like some dapps are breaking

Signed-off-by: Nick Pai <npai.nyc@gmail.com>
@nicholaspai nicholaspai changed the title Upgrade to Solidity 0.6 [DO NOT MERGE - dApps broken by drizzle] Upgrade to Solidity 0.6 Feb 29, 2020
Copy link
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great -- two nits.

.circleci/config.yml Outdated Show resolved Hide resolved
@nicholaspai nicholaspai changed the title [DO NOT MERGE - dApps broken by drizzle] Upgrade to Solidity 0.6 Upgrade to Solidity 0.6 Mar 3, 2020
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Copy link
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Signed-off-by: Nick Pai <npai.nyc@gmail.com>
Copy link
Member

@chrismaree chrismaree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

landscape-1497533116-not-dead

@nicholaspai nicholaspai merged commit 70821e0 into master Mar 4, 2020
@nicholaspai nicholaspai deleted the solc-0.6 branch March 4, 2020 15:58
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.

Upgrade to Solidity 0.6.0
4 participants