sherlock-audit / 2022-11-telcoin-judging

0 stars 0 forks source link

Met - [gas] multiple calls of the same function #53

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

Met

informational

[gas] multiple calls of the same function

Summary

In TieredOwnership::acceptExecutorship() the nominatedExecutor() is called 3x for the same result.

Vulnerability Detail

Impact

About extra 200 gas on the call.

Code Snippet

https://github.com/sherlock-audit/2022-11-telcoin/blob/main/contracts/fee-buyback/TieredOwnership.sol#L76-L78

Tool used

Manual Review

Recommendation

Save the acceptExecutorship() value to a variable to call the method only once.