We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require(x)
require(x == true)
contracts/BlurExchange.sol: L267
contracts/ExecutionDelegate.sol: L92 L108 L124
require
contracts/BlurExchange.sol: L482
contracts/ExecutionDelegate.sol: L22
i++
unchecked
contracts/lib/MerkleVerifier.sol: L38
contracts/lib/EIP712.sol: L77
contracts/BlurExchange.sol: L199 L476
contracts/PolicyManager.sol: L77
payable
contracts/ExecutionDelegate.sol: L36 L45
contracts/PolicyManager.sol: L25 L36
contracts/BlurExchange.sol: L43 L47 L53
contracts/lib/EIP712.sol: L39
contracts/lib/MerkleVerifier.sol: L20 L35
contracts/lib/MerkleVerifier.sol: L45 L49
contracts/PolicyManager.sol: L71-L78
contracts/lib/ReentrancyGuarded.sol: L10
public
constant
immutable
private
contracts/lib/EIP712.sol: L23 L26 L29
contracts/BlurExchange.sol: L57 L58 L59
contracts/BlurExchange.sol: L36 L139 L142 L143 L228 L318 L407 L424 L431 L482 L534
contracts/PolicyManager.sol: L26 L37
contracts/ExecutionDelegate.sol: L22 L77 L92 L108
contracts/lib/ReentrancyGuarded.sol: L14
contracts/PolicyManager.sol: L16
contracts/lib/EIP712.sol: L37
The text was updated successfully, but these errors were encountered:
sakman issue #274
1586ac1
sakman data for issue #274
9c519e9
5k from nonReentrant rest is negligible (immutable is incorrect)
Sorry, something went wrong.
No branches or pull requests
1. Use
require(x)
instead ofrequire(x == true)
contracts/BlurExchange.sol: L267
contracts/ExecutionDelegate.sol: L92
L108
L124
2. Strings messages in
require
statements should not be longer than 32 bytes of lengthcontracts/BlurExchange.sol: L482
contracts/ExecutionDelegate.sol: L22
3. Place
i++
in anunchecked
blocks in for-loopscontracts/lib/MerkleVerifier.sol: L38
contracts/lib/EIP712.sol: L77
contracts/BlurExchange.sol: L199
L476
contracts/PolicyManager.sol: L77
4. Consider marking functions as
payable
if there is no risk of sending value through themThis change will save gas each time a function is called
contracts/ExecutionDelegate.sol: L36
L45
contracts/PolicyManager.sol: L25
L36
contracts/BlurExchange.sol: L43
L47
L53
5. Calldata is cheaper than memory for function input
contracts/lib/EIP712.sol: L39
contracts/lib/MerkleVerifier.sol: L20
L35
6. Function that are called only once can be inlined in the calling function
This change will save around 30 gas units
contracts/lib/MerkleVerifier.sol: L45
L49
7. Cache storage variables in function call stack to save gas
contracts/PolicyManager.sol: L71-L78
8. Prefix incrementing and decrementing costs around 6 gas less than the postfix ones
e.g. ++var is cheaper than var++
contracts/lib/MerkleVerifier.sol: L38
contracts/BlurExchange.sol: L199
L476
contracts/PolicyManager.sol: L77
contracts/lib/EIP712.sol: L77
9. Use 1 and 2 for true and false
contracts/lib/ReentrancyGuarded.sol: L10
10.
public
storageconstant
(andimmutable
) variable should beprivate
saves tons of gas on deployment
contracts/lib/EIP712.sol: L23
L26
L29
contracts/BlurExchange.sol: L57
L58
L59
11. Custom error are cheaper than string messages
contracts/BlurExchange.sol: L36
L139
L142
L143
L228
L318
L407
L424
L431
L482
L534
contracts/PolicyManager.sol: L26
L37
contracts/ExecutionDelegate.sol: L22
L77
L92
L108
contracts/lib/ReentrancyGuarded.sol: L14
12. Use
constant
andimmutable
for constantscontracts/PolicyManager.sol: L16
contracts/lib/EIP712.sol: L37
The text was updated successfully, but these errors were encountered: