Future Honeysuckle Cuckoo
Medium
The current Telcoin contracts highly utilize the existence and versatility of Solidity's custom errors with both parameter error and paremeterless errors. However not all possible compilations of the contracts would work.
https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/stablecoin/Stablecoin.sol#L2 https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/stablecoin/StablecoinHandler.sol#L2 https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/swap/AmirX.sol#L2 https://github.com/sherlock-audit/2024-11-telcoin/blob/main/telcoin-audit/contracts/util/abstract/Blacklist.sol#L2
All of the contracts are ran using a floating pragma of ^0.8.24
, possibly to allow backwards-compatibility with newer versions of Solidity as a design choice. However this implies that the contracts should be fine being ran on all, including older, versions of 0.8, which is not true.
Since Custom Errors were introduced in version 0.8.4, older versions would be incompileable. This could not directly affect the users, but it can affect the project at the deployment level and it's possible external integrations and potential forks.
Protocol is incompileable with versions <0.8.4, leading to errors.
Hardcode the pragma, or specify it to be >=0.8.4
to still allow backwards compatibility with newer versions.