Skip to content

Latest commit

 

History

History
112 lines (64 loc) · 2.02 KB

sample_report.md

File metadata and controls

112 lines (64 loc) · 2.02 KB

Report

Gas Optimizations

Issue Instances
GAS-1 For Operations that will not overflow, you could use unchecked 16
GAS-2 Don't initialize variables with default value 1
GAS-3 Use shift Right/Left instead of division/multiplication if possible 2

[GAS-1] For Operations that will not overflow, you could use unchecked

Instances (16):

File: Test.sol

20:         123 + 123;

21:         123+123;

22:         123+ 123;

23:         123 +123;

25:         123 - 123;

26:         123-123;

27:         123- 123;

28:         123 -123;

30:         123 * 123;

31:         123*123;

32:         123* 123;

33:         123 *123;

35:         123 / 123;

36:         123/123;

37:         123/ 123;

38:         123 /123;

[GAS-2] Don't initialize variables with default value

Instances (1):

File: Test.sol

4:     uint256 a = 0;

[GAS-3] Use shift Right/Left instead of division/multiplication if possible

Instances (2):

File: Test.sol

36:         123/123;

38:         123 /123;

Low Issues

Issue Instances
L-1 Empty Function Body - Consider commenting why 3
L-2 Initializers could be front-run 4

[L-1] Empty Function Body - Consider commenting why

Instances (3):

File: Test.sol

14:     function initialize() initializer external {}

15:     function init() external { }

16:     function transfer() external {}

[L-2] Initializers could be front-run

Initializers could be front-run, allowing an attacker to either set their own values, take ownership of the contract, and in the best case forcing a re-deployment

Instances (4):

File: Test.sol

10:     modifier initializer() {

14:     function initialize() initializer external {}

14:     function initialize() initializer external {}

15:     function init() external { }