colonyNetwork icon indicating copy to clipboard operation
colonyNetwork copied to clipboard

Update contracts to solidity 0.8.x

Open area opened this issue 2 years ago • 0 comments

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 avatar Jun 17 '22 14:06 area