slither
slither copied to clipboard
[Bug-Candidate]: too-many-digits check flagging use of type(BeaconProxy).creationCode
Describe the issue:
The too-many-digits check is flagging the use of bytes memory creationCode = type(BeaconProxy).creationCode;.
As no digits are involved in this code it shouldn't be flagged at all.
Code example to reproduce the issue:
pragma solidity ^0.8.2;
import '@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol';
contract C {
struct S {
address o;
}
function test() public returns (bytes memory){
bytes memory code = type(BeaconProxy).creationCode;
return code;
}
}
Version:
0.8.3
Relevant log output:
C.test() (test_contract.sol#9-13) uses literals with too many digits:
- code = type()(BeaconProxy).creationCode (test_contract.sol#10)
We should make this a SolidityCall to creationCode with an argument of the initcode. Also for runtimeCode, too