NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Custom errors will not work in 0.8.0

Github

https://github.com/Cyfrin/2024-07-ark-project/blob/273b7b94986d3914d5ee737c99a59ec8728b1517/apps/blockchain/ethereum/src/token/TokenUtil.sol#L3

Summary

Custom errors were introduced in Solidity version 0.8.4. However, the specified Solidity version in the pragma statement is 0.8.0, leading to a compilation error.

Vulnerability Details

Custom errors were introduced in Solidity version 0.8.4. This prevents smart contracts using version 0.8.0 from using this library.

Ref: Solidity 0.8.4 Release Announcement

Impact

Smart contracts using version 0.8.0 of Solidity and trying to use custom errors will encounter a compilation error.

Recommendation

Consider upgrading the Solidity version specified in the pragma statement to 0.8.4 or a later version that supports custom errors. This can be achieved by updating the pragma statement at the beginning of the contract:

pragma solidity ^0.8.4;
Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.