From fca41b3c5edc6788c38f0e883549e1c6c2431a94 Mon Sep 17 00:00:00 2001 From: Luis Carvalho Date: Thu, 3 Oct 2024 16:26:49 +0100 Subject: [PATCH] fix: gas limit from estimation (#447) * fix: use pigeon gas estimate as gas limit * fix: get rid of import cycle on tests * chore: update mocks * chore: revert gas-adjustment on paloma txs * fix: mock calls of ExecuteSmartContract --- chain/evm/client.go | 13 +++++++++++-- chain/evm/compass.go | 17 ++++++++++------- chain/evm/compass_test.go | 12 ++++++------ chain/evm/mock_ethClientConn_test.go | 2 +- chain/evm/mock_ethClientToFilterLogs_test.go | 5 ++--- chain/evm/mock_ethClienter_test.go | 5 ++--- chain/evm/mock_evmClienter_test.go | 20 ++++++++++---------- chain/evm/mock_mevClient_test.go | 5 ++--- chain/evm/mocks/CompassBinding.go | 5 ++--- chain/evm/mocks/PalomaClienter.go | 2 +- chain/mocks/Processor.go | 5 ++--- chain/paloma/client.go | 11 +++-------- chain/paloma/mocks/IonClient.go | 5 ++--- chain/paloma/mocks/MessageSender.go | 15 ++++++--------- health/mocks/PalomaStatuser.go | 5 ++--- relayer/mocks/EvmFactorier.go | 5 ++--- relayer/mocks/PalomaClienter.go | 5 ++--- util/ion/tx.go | 4 ---- util/time/mocks/Time.go | 5 ++--- 19 files changed, 68 insertions(+), 78 deletions(-) diff --git a/chain/evm/client.go b/chain/evm/client.go index 8773ed71..05f8c38f 100644 --- a/chain/evm/client.go +++ b/chain/evm/client.go @@ -245,6 +245,8 @@ type executeSmartContractIn struct { method string arguments []any opts callOptions + + gasEstimate *big.Int } func callSmartContract( @@ -365,6 +367,11 @@ func callSmartContract( // Once estimation is finished, we adjust the gas limit // to be sure that the tx will be included in the next block. txOpts.GasLimit = uint64(float64(gasLimit) * 1.5) + if args.gasEstimate != nil && args.gasEstimate.Uint64() > txOpts.GasLimit { + // If we have a gas estimate from pigeons, and it is greater than + // what we just got, we use it + txOpts.GasLimit = args.gasEstimate.Uint64() + } if args.txType == 2 { txOpts.GasFeeCap = gasPrice @@ -664,6 +671,7 @@ func (c *Client) ExecuteSmartContract( opts callOptions, method string, arguments []any, + gasEstimate *big.Int, ) (*etherumtypes.Transaction, error) { var mevClient mevClient = nil if opts.useMevRelay { @@ -685,8 +693,9 @@ func (c *Client) ExecuteSmartContract( keystore: c.keystore, opts: opts, - method: method, - arguments: arguments, + method: method, + arguments: arguments, + gasEstimate: gasEstimate, }, ) } diff --git a/chain/evm/compass.go b/chain/evm/compass.go index 2ea175f1..64d33d5a 100644 --- a/chain/evm/compass.go +++ b/chain/evm/compass.go @@ -55,7 +55,7 @@ var errValsetIDMismatch = errors.New("valset id mismatch") //go:generate mockery --name=evmClienter --inpackage --testonly type evmClienter interface { FilterLogs(ctx context.Context, fq ethereum.FilterQuery, currBlockHeight *big.Int, fn func(logs []ethtypes.Log) bool) (bool, error) - ExecuteSmartContract(ctx context.Context, chainID *big.Int, contractAbi abi.ABI, addr common.Address, opts callOptions, method string, arguments []any) (*ethtypes.Transaction, error) + ExecuteSmartContract(ctx context.Context, chainID *big.Int, contractAbi abi.ABI, addr common.Address, opts callOptions, method string, arguments []any, gasEstimate *big.Int) (*ethtypes.Transaction, error) DeployContract(ctx context.Context, chainID *big.Int, rawABI string, bytecode, constructorInput []byte) (contractAddr common.Address, tx *ethtypes.Transaction, err error) TransactionByHash(ctx context.Context, txHash common.Hash) (*ethtypes.Transaction, bool, error) TransactionReceipt(ctx context.Context, txHash common.Hash) (*ethtypes.Receipt, error) @@ -181,12 +181,13 @@ func (t compass) updateValset( // TODO: Use generated contract code directly // compass 2.0.0 // def update_valset(consensus: Consensus, new_valset: Valset, relayer: address, gas_estimate: uint256) - tx, err := t.callCompass(ctx, opts, "update_valset", []any{ + args := []any{ BuildCompassConsensus(currentValset, origMessage.Signatures), TransformValsetToCompassValset(newValset), ethSender, estimate, - }) + } + tx, err := t.callCompass(ctx, opts, "update_valset", args, estimate) if err != nil { return nil, 0, err } @@ -268,7 +269,7 @@ func (t compass) submitLogicCall( opts.useMevRelay = true } logger.WithField("consensus", con).WithField("args", args).Debug("submitting logic call") - tx, err := t.callCompass(ctx, opts, "submit_logic_call", args) + tx, err := t.callCompass(ctx, opts, "submit_logic_call", args, nil) if err != nil { return nil, 0, err } @@ -334,7 +335,7 @@ func (t compass) compass_handover( } logger.WithField("consensus", con).WithField("args", args).Debug("compass handover") - tx, err := t.callCompass(ctx, opts, "compass_update_batch", args) + tx, err := t.callCompass(ctx, opts, "compass_update_batch", args, estimate) if err != nil { return nil, 0, err } @@ -450,7 +451,7 @@ func (t compass) uploadUserSmartContract( logger.WithField("consensus", con).WithField("args", args). Debug("deploying user smart contract") - tx, err := t.callCompass(ctx, opts, "deploy_contract", args) + tx, err := t.callCompass(ctx, opts, "deploy_contract", args, nil) if err != nil { return nil, 0, err } @@ -1417,11 +1418,12 @@ func (c compass) callCompass( opts callOptions, method string, arguments []any, + gasEstimate *big.Int, ) (*ethtypes.Transaction, error) { if c.compassAbi == nil { return nil, ErrABINotInitialized } - return c.evm.ExecuteSmartContract(ctx, c.chainID, *c.compassAbi, c.smartContractAddr, opts, method, arguments) + return c.evm.ExecuteSmartContract(ctx, c.chainID, *c.compassAbi, c.smartContractAddr, opts, method, arguments, gasEstimate) } func (t compass) skywayRelayBatches(ctx context.Context, batches []chain.SkywayBatchWithSignatures) error { @@ -1573,6 +1575,7 @@ func (t compass) skywayRelayBatch( ethSender, estimate, }, + estimate, ) if err != nil { logger.WithError(err).Error("failed to relay batch") diff --git a/chain/evm/compass_test.go b/chain/evm/compass_test.go index 93c9e25c..e0c9f482 100644 --- a/chain/evm/compass_test.go +++ b/chain/evm/compass_test.go @@ -443,7 +443,7 @@ func TestMessageProcessing(t *testing.T) { nil, ) - evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{}, "submit_logic_call", mock.Anything).Return( + evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{}, "submit_logic_call", mock.Anything, mock.Anything).Return( tx, nil, ) @@ -541,7 +541,7 @@ func TestMessageProcessing(t *testing.T) { nil, ) - evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{estimateOnly: true}, "submit_logic_call", mock.Anything).Return( + evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{estimateOnly: true}, "submit_logic_call", mock.Anything, mock.Anything).Return( tx, nil, ) @@ -805,7 +805,7 @@ func TestMessageProcessing(t *testing.T) { nil, ) - evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{useMevRelay: true}, "submit_logic_call", mock.Anything).Return( + evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{useMevRelay: true}, "submit_logic_call", mock.Anything, mock.Anything).Return( tx, nil, ) @@ -1013,7 +1013,7 @@ func TestMessageProcessing(t *testing.T) { nil, ) - evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{useMevRelay: true, estimateOnly: true}, "submit_logic_call", mock.Anything).Return( + evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{useMevRelay: true, estimateOnly: true}, "submit_logic_call", mock.Anything, mock.Anything).Return( tx, nil, ) @@ -1286,7 +1286,7 @@ func TestMessageProcessing(t *testing.T) { nil, ) - evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{}, "update_valset", mock.Anything).Return(tx, nil) + evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{}, "update_valset", mock.Anything, mock.Anything).Return(tx, nil) paloma.On("SetPublicAccessData", mock.Anything, "queue-name", uint64(555), uint64(55), tx.Hash().Bytes()).Return(nil) return evm, paloma @@ -1371,7 +1371,7 @@ func TestMessageProcessing(t *testing.T) { nil, ) - evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{estimateOnly: true}, "update_valset", mock.Anything).Return(tx, nil) + evm.On("ExecuteSmartContract", mock.Anything, chainID, mock.Anything, smartContractAddr, callOptions{estimateOnly: true}, "update_valset", mock.Anything, mock.Anything).Return(tx, nil) return evm, paloma }, }, diff --git a/chain/evm/mock_ethClientConn_test.go b/chain/evm/mock_ethClientConn_test.go index 2601d884..d08ee927 100644 --- a/chain/evm/mock_ethClientConn_test.go +++ b/chain/evm/mock_ethClientConn_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package evm diff --git a/chain/evm/mock_ethClientToFilterLogs_test.go b/chain/evm/mock_ethClientToFilterLogs_test.go index 249277c5..0e434fe0 100644 --- a/chain/evm/mock_ethClientToFilterLogs_test.go +++ b/chain/evm/mock_ethClientToFilterLogs_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package evm @@ -83,8 +83,7 @@ func (_m *mockEthClientToFilterLogs) HeaderByNumber(ctx context.Context, number func newMockEthClientToFilterLogs(t interface { mock.TestingT Cleanup(func()) -}, -) *mockEthClientToFilterLogs { +}) *mockEthClientToFilterLogs { mock := &mockEthClientToFilterLogs{} mock.Mock.Test(t) diff --git a/chain/evm/mock_ethClienter_test.go b/chain/evm/mock_ethClienter_test.go index ae0a31e7..aba34ec6 100644 --- a/chain/evm/mock_ethClienter_test.go +++ b/chain/evm/mock_ethClienter_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package evm @@ -339,8 +339,7 @@ func (_m *mockEthClienter) SuggestGasTipCap(ctx context.Context) (*big.Int, erro func newMockEthClienter(t interface { mock.TestingT Cleanup(func()) -}, -) *mockEthClienter { +}) *mockEthClienter { mock := &mockEthClienter{} mock.Mock.Test(t) diff --git a/chain/evm/mock_evmClienter_test.go b/chain/evm/mock_evmClienter_test.go index 629ab176..505659aa 100644 --- a/chain/evm/mock_evmClienter_test.go +++ b/chain/evm/mock_evmClienter_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package evm @@ -94,9 +94,9 @@ func (_m *mockEvmClienter) DeployContract(ctx context.Context, chainID *big.Int, return r0, r1, r2 } -// ExecuteSmartContract provides a mock function with given fields: ctx, chainID, contractAbi, addr, opts, method, arguments -func (_m *mockEvmClienter) ExecuteSmartContract(ctx context.Context, chainID *big.Int, contractAbi abi.ABI, addr common.Address, opts callOptions, method string, arguments []interface{}) (*types.Transaction, error) { - ret := _m.Called(ctx, chainID, contractAbi, addr, opts, method, arguments) +// ExecuteSmartContract provides a mock function with given fields: ctx, chainID, contractAbi, addr, opts, method, arguments, gasEstimate +func (_m *mockEvmClienter) ExecuteSmartContract(ctx context.Context, chainID *big.Int, contractAbi abi.ABI, addr common.Address, opts callOptions, method string, arguments []any, gasEstimate *big.Int) (*types.Transaction, error) { + ret := _m.Called(ctx, chainID, contractAbi, addr, opts, method, arguments, gasEstimate) if len(ret) == 0 { panic("no return value specified for ExecuteSmartContract") @@ -104,19 +104,19 @@ func (_m *mockEvmClienter) ExecuteSmartContract(ctx context.Context, chainID *bi var r0 *types.Transaction var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *big.Int, abi.ABI, common.Address, callOptions, string, []interface{}) (*types.Transaction, error)); ok { - return rf(ctx, chainID, contractAbi, addr, opts, method, arguments) + if rf, ok := ret.Get(0).(func(context.Context, *big.Int, abi.ABI, common.Address, callOptions, string, []any, *big.Int) (*types.Transaction, error)); ok { + return rf(ctx, chainID, contractAbi, addr, opts, method, arguments, gasEstimate) } - if rf, ok := ret.Get(0).(func(context.Context, *big.Int, abi.ABI, common.Address, callOptions, string, []interface{}) *types.Transaction); ok { - r0 = rf(ctx, chainID, contractAbi, addr, opts, method, arguments) + if rf, ok := ret.Get(0).(func(context.Context, *big.Int, abi.ABI, common.Address, callOptions, string, []any, *big.Int) *types.Transaction); ok { + r0 = rf(ctx, chainID, contractAbi, addr, opts, method, arguments, gasEstimate) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*types.Transaction) } } - if rf, ok := ret.Get(1).(func(context.Context, *big.Int, abi.ABI, common.Address, callOptions, string, []interface{}) error); ok { - r1 = rf(ctx, chainID, contractAbi, addr, opts, method, arguments) + if rf, ok := ret.Get(1).(func(context.Context, *big.Int, abi.ABI, common.Address, callOptions, string, []any, *big.Int) error); ok { + r1 = rf(ctx, chainID, contractAbi, addr, opts, method, arguments, gasEstimate) } else { r1 = ret.Error(1) } diff --git a/chain/evm/mock_mevClient_test.go b/chain/evm/mock_mevClient_test.go index c79597a4..ca8ad9d3 100644 --- a/chain/evm/mock_mevClient_test.go +++ b/chain/evm/mock_mevClient_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package evm @@ -53,8 +53,7 @@ func (_m *mockMevClient) Relay(_a0 context.Context, _a1 *big.Int, _a2 *types.Tra func newMockMevClient(t interface { mock.TestingT Cleanup(func()) -}, -) *mockMevClient { +}) *mockMevClient { mock := &mockMevClient{} mock.Mock.Test(t) diff --git a/chain/evm/mocks/CompassBinding.go b/chain/evm/mocks/CompassBinding.go index f3cb001d..18063643 100644 --- a/chain/evm/mocks/CompassBinding.go +++ b/chain/evm/mocks/CompassBinding.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks @@ -415,8 +415,7 @@ func (_m *CompassBinding) WatchValsetUpdated(opts *bind.WatchOpts, sink chan<- * func NewCompassBinding(t interface { mock.TestingT Cleanup(func()) -}, -) *CompassBinding { +}) *CompassBinding { mock := &CompassBinding{} mock.Mock.Test(t) diff --git a/chain/evm/mocks/PalomaClienter.go b/chain/evm/mocks/PalomaClienter.go index 7ccfa9e4..78e0f343 100644 --- a/chain/evm/mocks/PalomaClienter.go +++ b/chain/evm/mocks/PalomaClienter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks diff --git a/chain/mocks/Processor.go b/chain/mocks/Processor.go index 04b4f31d..24f55fa8 100644 --- a/chain/mocks/Processor.go +++ b/chain/mocks/Processor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks @@ -352,8 +352,7 @@ func (_m *Processor) SupportedQueues() []string { func NewProcessor(t interface { mock.TestingT Cleanup(func()) -}, -) *Processor { +}) *Processor { mock := &Processor{} mock.Mock.Test(t) diff --git a/chain/paloma/client.go b/chain/paloma/client.go index 7b38c123..cf80e796 100644 --- a/chain/paloma/client.go +++ b/chain/paloma/client.go @@ -19,11 +19,6 @@ import ( "github.com/palomachain/pigeon/util/slice" ) -type ( - ResultStatus = coretypes.ResultStatus - Unpacker = codectypes.AnyUnpacker -) - //go:generate mockery --name=MessageSender type MessageSender interface { SendMsg(ctx context.Context, msg sdk.Msg, memo string, opts ...ion.SendMsgOption) (*sdk.TxResponse, error) @@ -31,7 +26,7 @@ type MessageSender interface { //go:generate mockery --name=IonClient type IonClient interface { - Status(context.Context) (*ResultStatus, error) + Status(context.Context) (*coretypes.ResultStatus, error) DecodeBech32ValAddr(string) (sdk.ValAddress, error) GetKeybase() keyring.Keyring SetSDKContext() func() @@ -43,7 +38,7 @@ type Client struct { GRPCClient grpc.ClientConn ic IonClient - unpacker Unpacker + unpacker codectypes.AnyUnpacker messageSender MessageSender sendingOpts []ion.SendMsgOption @@ -214,7 +209,7 @@ func (c *Client) KeepValidatorAlive(ctx context.Context, appVersion string) erro return err } -func (c *Client) Status(ctx context.Context) (*ResultStatus, error) { +func (c *Client) Status(ctx context.Context) (*coretypes.ResultStatus, error) { res, err := c.ic.Status(ctx) if err != nil { return nil, err diff --git a/chain/paloma/mocks/IonClient.go b/chain/paloma/mocks/IonClient.go index f9a35a5b..967e661d 100644 --- a/chain/paloma/mocks/IonClient.go +++ b/chain/paloma/mocks/IonClient.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks @@ -153,8 +153,7 @@ func (_m *IonClient) Status(_a0 context.Context) (*coretypes.ResultStatus, error func NewIonClient(t interface { mock.TestingT Cleanup(func()) -}, -) *IonClient { +}) *IonClient { mock := &IonClient{} mock.Mock.Test(t) diff --git a/chain/paloma/mocks/MessageSender.go b/chain/paloma/mocks/MessageSender.go index c9323a43..1ebd1252 100644 --- a/chain/paloma/mocks/MessageSender.go +++ b/chain/paloma/mocks/MessageSender.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks @@ -8,8 +8,6 @@ import ( ion "github.com/palomachain/pigeon/util/ion" mock "github.com/stretchr/testify/mock" - proto "github.com/cosmos/gogoproto/proto" - types "github.com/cosmos/cosmos-sdk/types" ) @@ -19,7 +17,7 @@ type MessageSender struct { } // SendMsg provides a mock function with given fields: ctx, msg, memo, opts -func (_m *MessageSender) SendMsg(ctx context.Context, msg proto.Message, memo string, opts ...ion.SendMsgOption) (*types.TxResponse, error) { +func (_m *MessageSender) SendMsg(ctx context.Context, msg types.Msg, memo string, opts ...ion.SendMsgOption) (*types.TxResponse, error) { _va := make([]interface{}, len(opts)) for _i := range opts { _va[_i] = opts[_i] @@ -35,10 +33,10 @@ func (_m *MessageSender) SendMsg(ctx context.Context, msg proto.Message, memo st var r0 *types.TxResponse var r1 error - if rf, ok := ret.Get(0).(func(context.Context, proto.Message, string, ...ion.SendMsgOption) (*types.TxResponse, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, types.Msg, string, ...ion.SendMsgOption) (*types.TxResponse, error)); ok { return rf(ctx, msg, memo, opts...) } - if rf, ok := ret.Get(0).(func(context.Context, proto.Message, string, ...ion.SendMsgOption) *types.TxResponse); ok { + if rf, ok := ret.Get(0).(func(context.Context, types.Msg, string, ...ion.SendMsgOption) *types.TxResponse); ok { r0 = rf(ctx, msg, memo, opts...) } else { if ret.Get(0) != nil { @@ -46,7 +44,7 @@ func (_m *MessageSender) SendMsg(ctx context.Context, msg proto.Message, memo st } } - if rf, ok := ret.Get(1).(func(context.Context, proto.Message, string, ...ion.SendMsgOption) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, types.Msg, string, ...ion.SendMsgOption) error); ok { r1 = rf(ctx, msg, memo, opts...) } else { r1 = ret.Error(1) @@ -60,8 +58,7 @@ func (_m *MessageSender) SendMsg(ctx context.Context, msg proto.Message, memo st func NewMessageSender(t interface { mock.TestingT Cleanup(func()) -}, -) *MessageSender { +}) *MessageSender { mock := &MessageSender{} mock.Mock.Test(t) diff --git a/health/mocks/PalomaStatuser.go b/health/mocks/PalomaStatuser.go index 464fa629..3b06ed9d 100644 --- a/health/mocks/PalomaStatuser.go +++ b/health/mocks/PalomaStatuser.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks @@ -36,8 +36,7 @@ func (_m *PalomaStatuser) PalomaStatus(ctx context.Context) error { func NewPalomaStatuser(t interface { mock.TestingT Cleanup(func()) -}, -) *PalomaStatuser { +}) *PalomaStatuser { mock := &PalomaStatuser{} mock.Mock.Test(t) diff --git a/relayer/mocks/EvmFactorier.go b/relayer/mocks/EvmFactorier.go index 108626bd..f7359aef 100644 --- a/relayer/mocks/EvmFactorier.go +++ b/relayer/mocks/EvmFactorier.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks @@ -55,8 +55,7 @@ func (_m *EvmFactorier) Build(cfg config.EVM, chainReferenceID string, smartCont func NewEvmFactorier(t interface { mock.TestingT Cleanup(func()) -}, -) *EvmFactorier { +}) *EvmFactorier { mock := &EvmFactorier{} mock.Mock.Test(t) diff --git a/relayer/mocks/PalomaClienter.go b/relayer/mocks/PalomaClienter.go index 08c9c404..e7570d51 100644 --- a/relayer/mocks/PalomaClienter.go +++ b/relayer/mocks/PalomaClienter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks @@ -705,8 +705,7 @@ func (_m *PalomaClienter) SkywayQueryLastUnsignedBatch(ctx context.Context, chai func NewPalomaClienter(t interface { mock.TestingT Cleanup(func()) -}, -) *PalomaClienter { +}) *PalomaClienter { mock := &PalomaClienter{} mock.Mock.Test(t) diff --git a/util/ion/tx.go b/util/ion/tx.go index 3eb8449f..10c69b65 100644 --- a/util/ion/tx.go +++ b/util/ion/tx.go @@ -23,8 +23,6 @@ import ( "google.golang.org/grpc/status" ) -const txGasAdjustment = 1.2 - func (cc *Client) TxFactory() tx.Factory { return tx.Factory{}. WithAccountRetriever(cc). @@ -70,8 +68,6 @@ func (cc *Client) SendMsgs(ctx context.Context, msgs []sdk.Msg, memo string, opt return nil, err } - txf = txf.WithGasAdjustment(txGasAdjustment) - // TODO: Make this work with new CalculateGas method // TODO: This is related to GRPC client stuff? // https://github.com/cosmos/cosmos-sdk/blob/5725659684fc93790a63981c653feee33ecf3225/client/tx/tx.go#L297 diff --git a/util/time/mocks/Time.go b/util/time/mocks/Time.go index 2a45d778..c4f117fe 100644 --- a/util/time/mocks/Time.go +++ b/util/time/mocks/Time.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.43.2. DO NOT EDIT. +// Code generated by mockery v2.46.2. DO NOT EDIT. package mocks @@ -36,8 +36,7 @@ func (_m *Time) Now() time.Time { func NewTime(t interface { mock.TestingT Cleanup(func()) -}, -) *Time { +}) *Time { mock := &Time{} mock.Mock.Test(t)