Sifchain / sifnode

SifNode - The future of Defi
Other
108 stars 117 forks source link

HAL-10 use of outdated solidity version #3260

Closed juniuszhou closed 2 years ago

juniuszhou commented 2 years ago

Description

Solidity code within the codebase uses compiler version 0.8.4 which is out-of-date.

Code Location:

Listing 18: Files containing outdated compiler versions
1 contracts / ValsetStorage .sol :2: pragma solidity 0.8.4;
2 contracts / interfaces / IBlocklist . sol :2: pragma solidity 0.8.4;
3 contracts / Blocklist . sol :1: pragma solidity 0.8.4;
4 contracts / MockUpgrade / MockCosmosBridgeUpgrade . sol :2: pragma solidity 0.8.4;
5 contracts / MockUpgrade / ERC20UNSAFE . sol :2: pragma solidity 0.8.4;
6 contracts / BridgeRegistry . sol :2: pragma solidity 0.8.4;
7 contracts / CosmosBridge . sol :2: pragma solidity 0.8.4;
8 contracts / Oracle . sol :2: pragma solidity 0.8.4;
9 contracts / OracleStorage .sol :2: pragma solidity 0.8.4;
10 contracts / Valset . sol :2: pragma solidity 0.8.4;
11 contracts / CosmosBridgeStorage .sol :2: pragma solidity 0.8.4;
12 contracts / BridgeBank / BankStorage .sol :2: pragma solidity 0.8.4;
13 contracts / Mocks / ManyDecimalsToken . sol :4: pragma solidity ^0.8.4;
14 contracts / BridgeBank / BridgeToken .sol :2: pragma solidity 0.8.4;
15 contracts / BridgeBank / PauserRole . sol :2: pragma solidity 0.8.4;
16 contracts / BridgeBank / CosmosWhiteListStorage .sol :2: pragma solidity 0.8.4;
17 contracts / BridgeBank / CosmosWhiteList . sol :2: pragma solidity 0.8.4;
18 contracts / BridgeBank / EthereumBankStorage .sol :2: pragma solidity 0.8.4;
19 contracts / BridgeBank / EthereumWhitelist . sol :2: pragma solidity 0.8.4;
20 contracts / Mocks / FailHardToken .sol :2: pragma solidity 0.8.4;
21 contracts / BridgeBank / Rowan .sol :2: pragma solidity 0.8.4;
22 contracts / Mocks / TrollToken .sol :2: pragma solidity 0.8.4;
23 contracts / Mocks / RandomTrollToken .sol :2: pragma solidity 0.8.4;
24 contracts / Mocks / ReentrancyToken . sol :2: pragma solidity 0.8.4;
25 contracts / Mocks / UnicodeToken . sol :2: pragma solidity 0.8.4;
26 contracts / BridgeBank / Pausable .sol :2: pragma solidity 0.8.4;
27 contracts / Mocks / FakeERC20 . sol :2: pragma solidity 0.8.4;
28 contracts / Mocks / CommissionToken . sol :2: pragma solidity 0.8.4;
29 contracts / BridgeBank / CosmosBankStorage . sol :2: pragma solidity 0.8.4;
30 contracts / BridgeBank / CosmosBank . sol :2: pragma solidity 0.8.4;
31 contracts / BridgeBank / BridgeBank . sol :2: pragma solidity 0.8.4;
32 contracts / Mocks / Erowan . sol :1: pragma solidity 0.5.16;

Recommendation

Use compiler version 0.8.16 as it contains important bug fixes and gas optimizations compared to older versions.

juniuszhou commented 2 years ago

As I remembered, we discussed it before and won't upgrade the solidity version. please @Brando753 confirm it, then we can close the issue.

Brando753 commented 2 years ago

Honestly, I am thinking we should probably change the solidity version, hold off on this for now, @juniuszhou I will look into it tomorrow.

juniuszhou commented 2 years ago

Sure, I won't close it.

juniuszhou commented 2 years ago

close it after #3278 merged, the solidity version upgraded to 0.8.17.