Skip to content

Commit

Permalink
chore: [#2299] Gas buffer covering compass bootstrap (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
byte-bandit authored Oct 24, 2024
1 parent 593755e commit 02dff46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions chain/evm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,11 @@ func callSmartContract(
txOpts.GasLimit = args.gasEstimate.Uint64()
}

// Add an additional buffer to cover the cost of gas verification
// on Compass.
// See https://github.com/VolumeFi/paloma/issues/2299
txOpts.GasLimit = txOpts.GasLimit + 100_000

if args.txType == 2 {
txOpts.GasFeeCap = gasPrice
txOpts.GasTipCap = gasTipCap
Expand Down
2 changes: 1 addition & 1 deletion chain/evm/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func TestExecutingSmartContract(t *testing.T) {
ethMock.On("EstimateGas", mock.Anything, mock.Anything).Return(uint64(222), nil)

mevMock := newMockMevClient(t)
mevMock.On("Relay", mock.Anything, mock.Anything, mock.Anything).Return(common.HexToHash("0x2383690e509c7a7210257a9c713baf03561ee562bdc35f5acba138e5c15acb6c"), nil)
mevMock.On("Relay", mock.Anything, mock.Anything, mock.Anything).Return(common.HexToHash("0xfaa694dd01565c673ecc8aaa70da7abd2e1ea3f7c46a60594bb2768f39603087"), nil)

args.ethClient = ethMock
args.mevClient = mevMock
Expand Down

0 comments on commit 02dff46

Please sign in to comment.