diff --git a/chain/evm/client.go b/chain/evm/client.go index 05f8c38..adf7302 100644 --- a/chain/evm/client.go +++ b/chain/evm/client.go @@ -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 diff --git a/chain/evm/client_test.go b/chain/evm/client_test.go index 165a469..8957356 100644 --- a/chain/evm/client_test.go +++ b/chain/evm/client_test.go @@ -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