Open ChiTimesChi opened 10 months ago
Another thing to consider: updating to 0.8.20+ unlocks usage of OZ 5.0 libraries, as could be seen in #1477
@ChiTimesChi so I was wondering about these recommendations from slither:
Felt like a version waiting almost a year was too much so looked at git and crytic/slither#1773 (which updated to 0.8.18) was merged after less than a month so seems like 0.8.18 is definitely out of date & overkill.
I think 0.8.20 would also be fine, diff seems small, just want to be extra cautious given vyper cve.
Also, I think the targeting is true from 0.8.20
on since that's when push0
was introduced
To address the issue of reevaluating the Solidity version in contracts-core
, follow these steps:
Update Solidity Version in Contracts:
contracts/base/Version.sol
, change:
pragma solidity 0.8.17;
to:
pragma solidity 0.8.19;
Update Configuration Files:
package.json
, ensure the Solidity version used by tools is updated. If necessary, update dependencies that specify a Solidity version..solhint.json
, ensure the compiler-version
rule is set to the new version if it is not turned off.Rebuild Contracts:
yarn build:contracts
This will update the Solidity version to 0.8.19, allowing the use of new features while maintaining compatibility with all EVM-compatible chains.
/packages/contracts-core/contracts/base/Version.sol /packages/contracts-core /packages/contracts-core/package.json /packages/contracts-core/.solhint.json
Since the development of the messaging contracts started, quite a few Solidity version have been published. We have three options here:
0.8.17
as is.0.8.19
. This is the last version that is compatible with all the "EVM-compatible" chains out of the box (e.g. has the default target EVM as Paris).mapping(address agent => uint256 index) private _agentIndexes;
0.8.21+
. This will require configuring Foundry to explicitly use Paris EVM version (so that the contracts could be deployed on any chain).