Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: default
Invalid

`ICredToken` interface missing return values for ERC20 functions

Description: Incorrect return values for ERC20 functions. A contract compiled with Solidity > 0.4.22 interacting with these functions will fail to execute them, as the return value is missing.

Impact: ICredToken.transfer does not return a boolean. Bob deploys the token. Alice creates a contract that interacts with it but assumes a correct ERC20 interface implementation. Alice's contract is unable to interact with Bob's contract.

Recommended Mitigation: Set the appropriate return values and types for the defined ERC20 functions.

- function approve(address to, uint256 amount) external;
+ function approve(address to, uint256 amount) external returns(bool);
- function transfer(address to, uint256 amount) external;
+ function transfer(address to, uint256 amount) external returns(bool);
- function transferFrom(address from, address to, uint256 amount) external;
+ function transferFrom(address from, address to, uint256 amount) external returns(bool);

Source

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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