AVOID COMPOUND ASSIGNMENT OPERATOR IN STATE VARIABLES
Using compound assignment operators for state variables (like State += X or State -= X …) it’s more expensive than using operator assignment (like State = State + X or State = State - X …).
pragma solidity 0.8.15;
contract TesterA {
uint256 private _a;
function testShort() public {
⚔️ _a += 1;
}
}
contract TesterB {
Uint256 private _a;
function testLong() public {
_a = _a + 1;
}
}
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.