TVT-01: Function Simplification
Closed this issue · 1 comments
aalavandhan commented
Description:
The linked functions toggle the bool state of the whitelistedBridgeGateways mapping to adjust whether a particular bridge is whitelisted to withdraw and deposit tokens to the vault.
Recommendation:
As the toggle mechanism can only utilize two states, these two functions can be combined into a single one that accepts a bool variable as input, reducing the bytecode size of the contract and thus the overall gas footprint of its deployment.
aalavandhan commented
Though the recommendation is sound and merging the addBridgeGateway
and removeBridgeGateway
functions will translate into deployment gas saving, we choose to keep them as separate functions to minimize critical operational errors.