Cyfrin / 2023-07-escrow

16 stars 12 forks source link

A modifier used only once and not being inherited should be inlined to save gas #782

Open codehawks-bot opened 1 year ago

codehawks-bot commented 1 year ago

A modifier used only once and not being inherited should be inlined to save gas

Severity

Gas Optimization / Informational

Relevant GitHub Links

https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L66

https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L74

Summary

[G-8] A modifier used only once and not being inherited should be inlined to save gas

file: /src/Escrow.sol

66    modifier onlyBuyerOrSeller() {

https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L66

file: /src/Escrow.sol

74    modifier onlyArbiter() {

https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L74