token-bridge
token-bridge copied to clipboard
Different multipliers to calculate gas limit for different methods
The analysis of https://github.com/poanetwork/token-bridge/issues/126 exposes that calls of different methods requires different gas amount to be added extra to the amount provided by gasEstimate
: e.g. the consumption of the executeAffirmation
call could differ depending on the request sequence in three times, where as the call of executeSignatures
consumes always the same (almost) amount of gas.
So, we need to provide different multipliers instead of one EXTRA_GAS_PERCENTAGE
. For example,
EXECUTE_AFFIRMATION_EXTRA_GAS_PERCENTAGE
SUMBIT_SIGNATURE_EXTRA_GAS_PERCENTAGE
EXECUTE_SIGNATURE_EXTRA_GAS_PERCENTAGE