Closed mariocao closed 4 years ago
Tool used: SmartCheck
Summary:
·-----------------------------------------------·---------------· | Error Type | Occurrences | ································································· | Costly loop | 3 | ································································· | Compiler version not fixed | 8 | ································································· | Revert inside the if-operator | 3 | ································································· | Pure-functions should not read/change state | 3 | ································································· | Prefer external to public visibility level | 14 | ································································· | Use of assembly | 6 | ································································· | Implicit visibility level | 8 | ·-----------------------------------------------·---------------· | TOTAL | 45 | ·-----------------------------------------------·---------------·
File: contracts/FastEcMul.sol Lines: 428-428 Severity: 1 Pattern id: 17f23a
File: contracts/FastEcMul.sol Lines: 30-34 Severity: 2 Pattern id: 38f6c7
File: contracts/FastEcMul.sol Lines: 447-447 Severity: 1 Pattern id: 17f23a
File: examples/Secp256k1.sol Lines: 1-1 Severity: 1
Pattern id: 23fc32 File: test/TestEllipticCurve.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: benchmark/Secp256k1GasHelper.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: benchmark/EcGasHelper.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: contracts/FastEcMul.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: contracts/Migrations.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: contracts/EllipticCurve.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
All will be fixed in the code.
File: contracts/EllipticCurve.sol Lines: 44-45 Severity: 1 Pattern id: c56b12
File: contracts/EllipticCurve.sol Lines: 16-18 Severity: 1 Pattern id: c56b12
File: contracts/EllipticCurve.sol Lines: 302-306 Severity: 1 Pattern id: c56b12
File: contracts/FastEcMul.sol Lines: 251-379 Severity: 1 Pattern id: 11314f
File: contracts/FastEcMul.sol Lines: 218-242 Severity: 1 Pattern id: 11314f
File: contracts/EllipticCurve.sol Lines: 39-60 Severity: 1 Pattern id: 11314f
File: examples/Secp256k1.sol Lines: 22-30 Severity: 1 Pattern id: 73ufc1
File: benchmark/Secp256k1GasHelper.sol Lines: 19-27 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 131-145 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 75-91 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 30-32 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 34-48 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 127-129 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 66-73 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 50-64 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 93-109 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 111-125 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 16-28 Severity: 1 Pattern id: 73ufc1
File: contracts/Migrations.sol Lines: 20-23 Severity: 1 Pattern id: 73ufc1
File: contracts/Migrations.sol Lines: 16-18 Severity: 1 Pattern id: 73ufc1
File: contracts/FastEcMul.sol Lines: 354-356 Severity: 1 Pattern id: 109cd5
File: contracts/FastEcMul.sol Lines: 283-285 Severity: 1 Pattern id: 109cd5
File: contracts/FastEcMul.sol Lines: 224-239 Severity: 1 Pattern id: 109cd5
File: contracts/FastEcMul.sol Lines: 330-332 Severity: 1 Pattern id: 109cd5
File: contracts/FastEcMul.sol Lines: 306-308 Severity: 1 Pattern id: 109cd5
File: contracts/EllipticCurve.sol Lines: 49-57 Severity: 1 Pattern id: 109cd5
File: examples/Secp256k1.sol Lines: 14-14 Severity: 1 Pattern id: b51ce0
File: examples/Secp256k1.sol Lines: 17-17 Severity: 1 Pattern id: b51ce0
File: examples/Secp256k1.sol Lines: 16-16 Severity: 1 Pattern id: b51ce0
File: examples/Secp256k1.sol Lines: 15-15 Severity: 1 Pattern id: b51ce0
File: examples/Secp256k1.sol Lines: 13-13 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 16-16 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 14-14 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 17-17 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 15-15 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 13-13 Severity: 1 Pattern id: b51ce0
Code Review Result
Tool used: SmartCheck
Errors found
Summary:
Costly loop
File: contracts/FastEcMul.sol Lines: 428-428 Severity: 1 Pattern id: 17f23a
File: contracts/FastEcMul.sol Lines: 30-34 Severity: 2 Pattern id: 38f6c7
File: contracts/FastEcMul.sol Lines: 447-447 Severity: 1 Pattern id: 17f23a
Compiler version not fixed
File: examples/Secp256k1.sol Lines: 1-1 Severity: 1
Pattern id: 23fc32 File: test/TestEllipticCurve.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: benchmark/Secp256k1GasHelper.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: benchmark/EcGasHelper.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: contracts/FastEcMul.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: contracts/Migrations.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: contracts/Migrations.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
File: contracts/EllipticCurve.sol Lines: 1-1 Severity: 1 Pattern id: 23fc32
Revert inside the if-operator
All will be fixed in the code.
File: contracts/EllipticCurve.sol Lines: 44-45 Severity: 1 Pattern id: c56b12
File: contracts/EllipticCurve.sol Lines: 16-18 Severity: 1 Pattern id: c56b12
File: contracts/EllipticCurve.sol Lines: 302-306 Severity: 1 Pattern id: c56b12
Pure-functions should not read/change state
File: contracts/FastEcMul.sol Lines: 251-379 Severity: 1 Pattern id: 11314f
File: contracts/FastEcMul.sol Lines: 218-242 Severity: 1 Pattern id: 11314f
File: contracts/EllipticCurve.sol Lines: 39-60 Severity: 1 Pattern id: 11314f
Prefer external to public visibility level
File: examples/Secp256k1.sol Lines: 22-30 Severity: 1 Pattern id: 73ufc1
File: benchmark/Secp256k1GasHelper.sol Lines: 19-27 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 131-145 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 75-91 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 30-32 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 34-48 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 127-129 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 66-73 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 50-64 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 93-109 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 111-125 Severity: 1 Pattern id: 73ufc1
File: benchmark/EcGasHelper.sol Lines: 16-28 Severity: 1 Pattern id: 73ufc1
File: contracts/Migrations.sol Lines: 20-23 Severity: 1 Pattern id: 73ufc1
File: contracts/Migrations.sol Lines: 16-18 Severity: 1 Pattern id: 73ufc1
Use of assembly
File: contracts/FastEcMul.sol Lines: 354-356 Severity: 1 Pattern id: 109cd5
File: contracts/FastEcMul.sol Lines: 283-285 Severity: 1 Pattern id: 109cd5
File: contracts/FastEcMul.sol Lines: 224-239 Severity: 1 Pattern id: 109cd5
File: contracts/FastEcMul.sol Lines: 330-332 Severity: 1 Pattern id: 109cd5
File: contracts/FastEcMul.sol Lines: 306-308 Severity: 1 Pattern id: 109cd5
File: contracts/EllipticCurve.sol Lines: 49-57 Severity: 1 Pattern id: 109cd5
Implicit visibility level
File: examples/Secp256k1.sol Lines: 14-14 Severity: 1 Pattern id: b51ce0
File: examples/Secp256k1.sol Lines: 17-17 Severity: 1 Pattern id: b51ce0
File: examples/Secp256k1.sol Lines: 16-16 Severity: 1 Pattern id: b51ce0
File: examples/Secp256k1.sol Lines: 15-15 Severity: 1 Pattern id: b51ce0
File: examples/Secp256k1.sol Lines: 13-13 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 16-16 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 14-14 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 17-17 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 15-15 Severity: 1 Pattern id: b51ce0
File: benchmark/Secp256k1GasHelper.sol Lines: 13-13 Severity: 1 Pattern id: b51ce0