Function EthosProfile:bulkInviteAddresses()wastes a lot of gas
Summary
When cycling because performing a bulk operation, it's important to avoid repeating the same logic on every iteration
Root Cause
If EthosProfile:bulkInviteAddresses() calls inviteAddress() n times, the following logic inside inviteAddress() could be executed just once, while it's executed n times wasting gas:
Acrobatic Burlap Lizard
Low/Info
Function
EthosProfile:bulkInviteAddresses()
wastes a lot of gasSummary
When cycling because performing a bulk operation, it's important to avoid repeating the same logic on every iteration
Root Cause
If EthosProfile:bulkInviteAddresses() calls
inviteAddress()
n times, the following logic insideinviteAddress()
could be executed just once, while it's executed n times wasting gas:Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
No response
PoC
No response
Mitigation
inviteAddress()
and put the logic that could be executed just once in a dedicated functionbulkInviteAddresses()
calls the refactored function and no repeated code is executed