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

Update contracts to solidity 0.8.x #1053

Merged
merged 17 commits into from
Mar 20, 2023
Merged

Update contracts to solidity 0.8.x #1053

merged 17 commits into from
Mar 20, 2023

Conversation

area
Copy link
Member

@area area commented Jun 17, 2022

Based on top of #1052, so no merging yet!

Most non-trivial changes were simply to deal with overflowing arithmetic which we had in a few places unwittingly, but I don't think they've affected anything. A couple of times in the mining contract, and once in the patricia tree. The former has been solved by additional appropriate guards. The latter has been solved by cribbing an alternative line from a slightly updated version of the implementation, but I haven't worked through all the negations etc in order to satisfy myself that it's (basically) the same.

Optional inclusion in this PR: removing all instances of .add and .sub, as solidity now does that itself unless you use the unchecked {} block?

@area area changed the base branch from develop to maint/major-upgrades June 17, 2022 14:19
@area area force-pushed the maint/solidity080 branch from 49380d5 to 116855d Compare June 17, 2022 15:11
@area area force-pushed the maint/major-upgrades branch from cf302ab to ce2eedc Compare June 21, 2022 08:14
@area area force-pushed the maint/solidity080 branch from 116855d to de015a2 Compare June 22, 2022 13:46
Base automatically changed from maint/major-upgrades to develop June 22, 2022 17:47
@area area force-pushed the maint/solidity080 branch from de015a2 to 546b2ad Compare June 23, 2022 08:11
@area area mentioned this pull request Jan 25, 2023
@kronosapiens kronosapiens force-pushed the maint/solidity080 branch 3 times, most recently from 54d8444 to 295341a Compare February 6, 2023 19:43
@kronosapiens
Copy link
Member

kronosapiens commented Feb 7, 2023

@area I'd be in favor of removing add and sub from this PR, similar to how we did it in coin machine.

Also can this go off draft now that #1052 is merged?

Also, I can update the casts I've commented on.

@kronosapiens
Copy link
Member

Looking at it, I would actually update the maths in a separate PR, it's a lot more changes and will make this PR more difficult to review.

kronosapiens
kronosapiens previously approved these changes Feb 9, 2023
@kronosapiens
Copy link
Member

@area I'm satisfied with this PR, are you ready to take it off draft?

@kronosapiens kronosapiens force-pushed the maint/solidity080 branch 2 times, most recently from 8a42ed7 to 3f11fc6 Compare February 16, 2023 00:11
@kronosapiens kronosapiens marked this pull request as ready for review February 17, 2023 21:04
kronosapiens
kronosapiens previously approved these changes Feb 21, 2023
kronosapiens
kronosapiens previously approved these changes Mar 9, 2023
@area area force-pushed the maint/solidity080 branch 4 times, most recently from bbc784e to 1b90fcd Compare March 11, 2023 17:01
@area area force-pushed the maint/solidity080 branch 6 times, most recently from 8c11df8 to f4ab9f3 Compare March 20, 2023 12:05
@area area force-pushed the maint/solidity080 branch 2 times, most recently from 8101379 to 238fb06 Compare March 20, 2023 12:40
@area area force-pushed the maint/solidity080 branch 2 times, most recently from 39a000c to fb6db8a Compare March 20, 2023 16:17
@kronosapiens kronosapiens merged commit b6c9cd2 into develop Mar 20, 2023
@kronosapiens kronosapiens deleted the maint/solidity080 branch March 20, 2023 22:04
@area area mentioned this pull request Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants