Skip to content

Commit

Permalink
Hopefully fix gas limit issues and don't use 3.5M gas by default
Browse files Browse the repository at this point in the history
  • Loading branch information
koirikivi committed May 29, 2024
1 parent 74306d7 commit 07eb468
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sovryn-token-bridge/federator/src/lib/TransactionSender.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ module.exports = class TransactionSender {

// Vote: ~70k
// Vote+execute: A little over 250k
// Vote+execute with signatures: Can get to over 300k, 500k+ with aggregators involved
// First side token deployment: ~3.15M
const minimum = 300000;
const gasLimit = estimatedGas < minimum ? minimum : 3500000;
const multiplier = 1.5;
const minimum = 400000;
let gasLimit = Math.ceil(estimatedGas * multiplier);
if (gasLimit < minimum) {
gasLimit = minimum;
}

return gasLimit;
}
Expand Down

0 comments on commit 07eb468

Please sign in to comment.