2024-05-26 08:31:13 +00:00
|
|
|
// Code generated by MockGen. DO NOT EDIT.
|
|
|
|
// Source: services/wallet/bridge/bridge.go
|
|
|
|
|
|
|
|
// Package mock_bridge is a generated GoMock package.
|
|
|
|
package mock_bridge
|
|
|
|
|
|
|
|
import (
|
|
|
|
big "math/big"
|
|
|
|
reflect "reflect"
|
|
|
|
|
|
|
|
common "github.com/ethereum/go-ethereum/common"
|
|
|
|
types "github.com/ethereum/go-ethereum/core/types"
|
2024-06-04 12:20:56 +00:00
|
|
|
gomock "github.com/golang/mock/gomock"
|
2024-05-26 08:31:13 +00:00
|
|
|
account "github.com/status-im/status-go/account"
|
|
|
|
types0 "github.com/status-im/status-go/eth-node/types"
|
|
|
|
params "github.com/status-im/status-go/params"
|
|
|
|
bridge "github.com/status-im/status-go/services/wallet/bridge"
|
|
|
|
token "github.com/status-im/status-go/services/wallet/token"
|
|
|
|
)
|
|
|
|
|
|
|
|
// MockBridge is a mock of Bridge interface.
|
|
|
|
type MockBridge struct {
|
|
|
|
ctrl *gomock.Controller
|
|
|
|
recorder *MockBridgeMockRecorder
|
|
|
|
}
|
|
|
|
|
|
|
|
// MockBridgeMockRecorder is the mock recorder for MockBridge.
|
|
|
|
type MockBridgeMockRecorder struct {
|
|
|
|
mock *MockBridge
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewMockBridge creates a new mock instance.
|
|
|
|
func NewMockBridge(ctrl *gomock.Controller) *MockBridge {
|
|
|
|
mock := &MockBridge{ctrl: ctrl}
|
|
|
|
mock.recorder = &MockBridgeMockRecorder{mock}
|
|
|
|
return mock
|
|
|
|
}
|
|
|
|
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
|
|
func (m *MockBridge) EXPECT() *MockBridgeMockRecorder {
|
|
|
|
return m.recorder
|
|
|
|
}
|
|
|
|
|
|
|
|
// AvailableFor mocks base method.
|
|
|
|
func (m *MockBridge) AvailableFor(from, to *params.Network, token, toToken *token.Token) (bool, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "AvailableFor", from, to, token, toToken)
|
|
|
|
ret0, _ := ret[0].(bool)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
// AvailableFor indicates an expected call of AvailableFor.
|
|
|
|
func (mr *MockBridgeMockRecorder) AvailableFor(from, to, token, toToken interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AvailableFor", reflect.TypeOf((*MockBridge)(nil).AvailableFor), from, to, token, toToken)
|
|
|
|
}
|
|
|
|
|
|
|
|
// BuildTransaction mocks base method.
|
|
|
|
func (m *MockBridge) BuildTransaction(sendArgs *bridge.TransactionBridge) (*types.Transaction, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "BuildTransaction", sendArgs)
|
|
|
|
ret0, _ := ret[0].(*types.Transaction)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
// BuildTransaction indicates an expected call of BuildTransaction.
|
|
|
|
func (mr *MockBridgeMockRecorder) BuildTransaction(sendArgs interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildTransaction", reflect.TypeOf((*MockBridge)(nil).BuildTransaction), sendArgs)
|
|
|
|
}
|
|
|
|
|
|
|
|
// BuildTx mocks base method.
|
|
|
|
func (m *MockBridge) BuildTx(fromNetwork, toNetwork *params.Network, fromAddress, toAddress common.Address, token *token.Token, amountIn, bonderFee *big.Int) (*types.Transaction, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "BuildTx", fromNetwork, toNetwork, fromAddress, toAddress, token, amountIn, bonderFee)
|
|
|
|
ret0, _ := ret[0].(*types.Transaction)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
// BuildTx indicates an expected call of BuildTx.
|
|
|
|
func (mr *MockBridgeMockRecorder) BuildTx(fromNetwork, toNetwork, fromAddress, toAddress, token, amountIn, bonderFee interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildTx", reflect.TypeOf((*MockBridge)(nil).BuildTx), fromNetwork, toNetwork, fromAddress, toAddress, token, amountIn, bonderFee)
|
|
|
|
}
|
|
|
|
|
|
|
|
// CalculateAmountOut mocks base method.
|
|
|
|
func (m *MockBridge) CalculateAmountOut(from, to *params.Network, amountIn *big.Int, symbol string) (*big.Int, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "CalculateAmountOut", from, to, amountIn, symbol)
|
|
|
|
ret0, _ := ret[0].(*big.Int)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
// CalculateAmountOut indicates an expected call of CalculateAmountOut.
|
|
|
|
func (mr *MockBridgeMockRecorder) CalculateAmountOut(from, to, amountIn, symbol interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateAmountOut", reflect.TypeOf((*MockBridge)(nil).CalculateAmountOut), from, to, amountIn, symbol)
|
|
|
|
}
|
|
|
|
|
|
|
|
// CalculateFees mocks base method.
|
|
|
|
func (m *MockBridge) CalculateFees(from, to *params.Network, token *token.Token, amountIn *big.Int) (*big.Int, *big.Int, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "CalculateFees", from, to, token, amountIn)
|
|
|
|
ret0, _ := ret[0].(*big.Int)
|
|
|
|
ret1, _ := ret[1].(*big.Int)
|
|
|
|
ret2, _ := ret[2].(error)
|
|
|
|
return ret0, ret1, ret2
|
|
|
|
}
|
|
|
|
|
|
|
|
// CalculateFees indicates an expected call of CalculateFees.
|
|
|
|
func (mr *MockBridgeMockRecorder) CalculateFees(from, to, token, amountIn interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateFees", reflect.TypeOf((*MockBridge)(nil).CalculateFees), from, to, token, amountIn)
|
|
|
|
}
|
|
|
|
|
|
|
|
// EstimateGas mocks base method.
|
|
|
|
func (m *MockBridge) EstimateGas(fromNetwork, toNetwork *params.Network, from, to common.Address, token, toToken *token.Token, amountIn *big.Int) (uint64, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "EstimateGas", fromNetwork, toNetwork, from, to, token, toToken, amountIn)
|
|
|
|
ret0, _ := ret[0].(uint64)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
// EstimateGas indicates an expected call of EstimateGas.
|
|
|
|
func (mr *MockBridgeMockRecorder) EstimateGas(fromNetwork, toNetwork, from, to, token, toToken, amountIn interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EstimateGas", reflect.TypeOf((*MockBridge)(nil).EstimateGas), fromNetwork, toNetwork, from, to, token, toToken, amountIn)
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetContractAddress mocks base method.
|
|
|
|
func (m *MockBridge) GetContractAddress(network *params.Network, token *token.Token) (common.Address, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "GetContractAddress", network, token)
|
|
|
|
ret0, _ := ret[0].(common.Address)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetContractAddress indicates an expected call of GetContractAddress.
|
|
|
|
func (mr *MockBridgeMockRecorder) GetContractAddress(network, token interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContractAddress", reflect.TypeOf((*MockBridge)(nil).GetContractAddress), network, token)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Name mocks base method.
|
|
|
|
func (m *MockBridge) Name() string {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "Name")
|
|
|
|
ret0, _ := ret[0].(string)
|
|
|
|
return ret0
|
|
|
|
}
|
|
|
|
|
|
|
|
// Name indicates an expected call of Name.
|
|
|
|
func (mr *MockBridgeMockRecorder) Name() *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockBridge)(nil).Name))
|
|
|
|
}
|
|
|
|
|
|
|
|
// PackTxInputData mocks base method.
|
|
|
|
func (m *MockBridge) PackTxInputData(contractType string, fromNetwork, toNetwork *params.Network, from, to common.Address, token *token.Token, amountIn *big.Int) ([]byte, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "PackTxInputData", contractType, fromNetwork, toNetwork, from, to, token, amountIn)
|
|
|
|
ret0, _ := ret[0].([]byte)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
// PackTxInputData indicates an expected call of PackTxInputData.
|
|
|
|
func (mr *MockBridgeMockRecorder) PackTxInputData(contractType, fromNetwork, toNetwork, from, to, token, amountIn interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackTxInputData", reflect.TypeOf((*MockBridge)(nil).PackTxInputData), contractType, fromNetwork, toNetwork, from, to, token, amountIn)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Send mocks base method.
|
|
|
|
func (m *MockBridge) Send(sendArgs *bridge.TransactionBridge, verifiedAccount *account.SelectedExtKey) (types0.Hash, error) {
|
|
|
|
m.ctrl.T.Helper()
|
|
|
|
ret := m.ctrl.Call(m, "Send", sendArgs, verifiedAccount)
|
|
|
|
ret0, _ := ret[0].(types0.Hash)
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
return ret0, ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
// Send indicates an expected call of Send.
|
|
|
|
func (mr *MockBridgeMockRecorder) Send(sendArgs, verifiedAccount interface{}) *gomock.Call {
|
|
|
|
mr.mock.ctrl.T.Helper()
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockBridge)(nil).Send), sendArgs, verifiedAccount)
|
|
|
|
}
|