github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/sequencer/mock_etherman.go (about) 1 // Code generated by mockery v2.22.1. DO NOT EDIT. 2 3 package sequencer 4 5 import ( 6 context "context" 7 big "math/big" 8 9 common "github.com/ethereum/go-ethereum/common" 10 11 mock "github.com/stretchr/testify/mock" 12 ) 13 14 // EthermanMock is an autogenerated mock type for the etherman type 15 type EthermanMock struct { 16 mock.Mock 17 } 18 19 // GetLastBatchTimestamp provides a mock function with given fields: 20 func (_m *EthermanMock) GetLastBatchTimestamp() (uint64, error) { 21 ret := _m.Called() 22 23 var r0 uint64 24 var r1 error 25 if rf, ok := ret.Get(0).(func() (uint64, error)); ok { 26 return rf() 27 } 28 if rf, ok := ret.Get(0).(func() uint64); ok { 29 r0 = rf() 30 } else { 31 r0 = ret.Get(0).(uint64) 32 } 33 34 if rf, ok := ret.Get(1).(func() error); ok { 35 r1 = rf() 36 } else { 37 r1 = ret.Error(1) 38 } 39 40 return r0, r1 41 } 42 43 // GetLatestBatchNumber provides a mock function with given fields: 44 func (_m *EthermanMock) GetLatestBatchNumber() (uint64, error) { 45 ret := _m.Called() 46 47 var r0 uint64 48 var r1 error 49 if rf, ok := ret.Get(0).(func() (uint64, error)); ok { 50 return rf() 51 } 52 if rf, ok := ret.Get(0).(func() uint64); ok { 53 r0 = rf() 54 } else { 55 r0 = ret.Get(0).(uint64) 56 } 57 58 if rf, ok := ret.Get(1).(func() error); ok { 59 r1 = rf() 60 } else { 61 r1 = ret.Error(1) 62 } 63 64 return r0, r1 65 } 66 67 // GetLatestBlockNumber provides a mock function with given fields: ctx 68 func (_m *EthermanMock) GetLatestBlockNumber(ctx context.Context) (uint64, error) { 69 ret := _m.Called(ctx) 70 71 var r0 uint64 72 var r1 error 73 if rf, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { 74 return rf(ctx) 75 } 76 if rf, ok := ret.Get(0).(func(context.Context) uint64); ok { 77 r0 = rf(ctx) 78 } else { 79 r0 = ret.Get(0).(uint64) 80 } 81 82 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 83 r1 = rf(ctx) 84 } else { 85 r1 = ret.Error(1) 86 } 87 88 return r0, r1 89 } 90 91 // GetLatestBlockTimestamp provides a mock function with given fields: ctx 92 func (_m *EthermanMock) GetLatestBlockTimestamp(ctx context.Context) (uint64, error) { 93 ret := _m.Called(ctx) 94 95 var r0 uint64 96 var r1 error 97 if rf, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { 98 return rf(ctx) 99 } 100 if rf, ok := ret.Get(0).(func(context.Context) uint64); ok { 101 r0 = rf(ctx) 102 } else { 103 r0 = ret.Get(0).(uint64) 104 } 105 106 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 107 r1 = rf(ctx) 108 } else { 109 r1 = ret.Error(1) 110 } 111 112 return r0, r1 113 } 114 115 // GetSendSequenceFee provides a mock function with given fields: numBatches 116 func (_m *EthermanMock) GetSendSequenceFee(numBatches uint64) (*big.Int, error) { 117 ret := _m.Called(numBatches) 118 119 var r0 *big.Int 120 var r1 error 121 if rf, ok := ret.Get(0).(func(uint64) (*big.Int, error)); ok { 122 return rf(numBatches) 123 } 124 if rf, ok := ret.Get(0).(func(uint64) *big.Int); ok { 125 r0 = rf(numBatches) 126 } else { 127 if ret.Get(0) != nil { 128 r0 = ret.Get(0).(*big.Int) 129 } 130 } 131 132 if rf, ok := ret.Get(1).(func(uint64) error); ok { 133 r1 = rf(numBatches) 134 } else { 135 r1 = ret.Error(1) 136 } 137 138 return r0, r1 139 } 140 141 // TrustedSequencer provides a mock function with given fields: 142 func (_m *EthermanMock) TrustedSequencer() (common.Address, error) { 143 ret := _m.Called() 144 145 var r0 common.Address 146 var r1 error 147 if rf, ok := ret.Get(0).(func() (common.Address, error)); ok { 148 return rf() 149 } 150 if rf, ok := ret.Get(0).(func() common.Address); ok { 151 r0 = rf() 152 } else { 153 if ret.Get(0) != nil { 154 r0 = ret.Get(0).(common.Address) 155 } 156 } 157 158 if rf, ok := ret.Get(1).(func() error); ok { 159 r1 = rf() 160 } else { 161 r1 = ret.Error(1) 162 } 163 164 return r0, r1 165 } 166 167 type mockConstructorTestingTNewEthermanMock interface { 168 mock.TestingT 169 Cleanup(func()) 170 } 171 172 // NewEthermanMock creates a new instance of EthermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 173 func NewEthermanMock(t mockConstructorTestingTNewEthermanMock) *EthermanMock { 174 mock := &EthermanMock{} 175 mock.Mock.Test(t) 176 177 t.Cleanup(func() { mock.AssertExpectations(t) }) 178 179 return mock 180 }