Issue | Instances | |
---|---|---|
[G‑01] | Cache msg.sender | 6 |
[G‑02] | Use simple events without argument | 1 |
[G‑03] | Wrap most repeated code inside a private or internal function | 4 |
Total: 11 instances over issues.
The table above and its gas numbers are created by considering the automatic findings which are not included.
msg.sender
Caching multiple uses of msg.sender
inside memory costs less than the same.
There is 6 instances of this issue:
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L34
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L39C40-L39C51
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L43
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L51C45-L51C55
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L67C13-L67C23
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L67C38-L67C48
With Web3 or ether.js libraries it is possible to get some information about the message sender's address or when it is called and emitted.
There is 1 instance of this issue:
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/IEscrow.sol#L21
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L105
Wrapping most used codes will result in a bytecode reduction.
There are 4 instances of this issue:
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L44C13-L44C51
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L98C48-L98C88
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L110C32-L110C71
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L125C24-L125C64
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.