You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
pragma solidity 0.5.8;
contract Resolver {
function f(string memory sig) public pure returns(bytes4) {
return bytes4(keccak256(abi.encodePacked(sig)));
}
}
running yarn truffle run verify --mode quick ./contracts/Resolver.sol I get the report:
5:33 error The binary addition can overflow SWC-101
8:81 error integer overflow SWC-101
replacing sig with a uint (rather than string) causes the error to disappear. This is minimum working example from a larger contract, where the line numbers were very wrong in the report (referring to a comment block at the start of the file with licensing information).
EDIT: Example report UUID: 9ca79e99-d5d6-4ffc-8268-3c01a0307857
The text was updated successfully, but these errors were encountered:
With the following contract
running
yarn truffle run verify --mode quick ./contracts/Resolver.sol
I get the report:replacing
sig
with auint
(rather thanstring
) causes the error to disappear. This is minimum working example from a larger contract, where the line numbers were very wrong in the report (referring to a comment block at the start of the file with licensing information).EDIT: Example report UUID: 9ca79e99-d5d6-4ffc-8268-3c01a0307857
The text was updated successfully, but these errors were encountered: