diff --git a/cmd/commit_test.go b/cmd/commit_test.go index bbcaa80cb..739179cf2 100644 --- a/cmd/commit_test.go +++ b/cmd/commit_test.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/mock" "math/big" + clientPkg "razor/client" "razor/core" "razor/core/types" "razor/pkg/bindings" @@ -228,11 +229,11 @@ func TestHandleCommitState(t *testing.T) { utilsMock.On("GetNumActiveCollections", mock.AnythingOfType("*ethclient.Client")).Return(tt.args.numActiveCollections, tt.args.numActiveCollectionsErr) utilsMock.On("GetAssignedCollections", mock.AnythingOfType("*ethclient.Client"), mock.Anything, mock.Anything).Return(tt.args.assignedCollections, tt.args.seqAllottedCollections, tt.args.assignedCollectionsErr) utilsMock.On("GetCollectionIdFromIndex", mock.AnythingOfType("*ethclient.Client"), mock.Anything).Return(tt.args.collectionId, tt.args.collectionIdErr) - utilsMock.On("GetAggregatedDataOfCollection", mock.AnythingOfType("*ethclient.Client"), mock.Anything, mock.Anything, mock.Anything).Return(tt.args.collectionData, tt.args.collectionDataErr) + utilsMock.On("GetAggregatedDataOfCollection", mock.AnythingOfType("*ethclient.Client"), mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.collectionData, tt.args.collectionDataErr) utilsMock.On("GetRogueRandomValue", mock.Anything).Return(rogueValue) utils := &UtilsStruct{} - got, err := utils.HandleCommitState(client, epoch, seed, tt.args.rogueData) + got, err := utils.HandleCommitState(client, epoch, seed, &clientPkg.HttpClient{}, tt.args.rogueData) if !reflect.DeepEqual(got, tt.want) { t.Errorf("Data from HandleCommitState function, got = %v, want = %v", got, tt.want) } @@ -393,11 +394,11 @@ func BenchmarkHandleCommitState(b *testing.B) { utilsMock.On("GetNumActiveCollections", mock.AnythingOfType("*ethclient.Client")).Return(v.numActiveCollections, nil) utilsMock.On("GetAssignedCollections", mock.AnythingOfType("*ethclient.Client"), mock.Anything, mock.Anything).Return(v.assignedCollections, nil, nil) utilsMock.On("GetCollectionIdFromIndex", mock.AnythingOfType("*ethclient.Client"), mock.Anything).Return(uint16(1), nil) - utilsMock.On("GetAggregatedDataOfCollection", mock.AnythingOfType("*ethclient.Client"), mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(1000), nil) + utilsMock.On("GetAggregatedDataOfCollection", mock.AnythingOfType("*ethclient.Client"), mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(1000), nil) utilsMock.On("GetRogueRandomValue", mock.Anything).Return(rogueValue) ut := &UtilsStruct{} - _, err := ut.HandleCommitState(client, epoch, seed, types.Rogue{IsRogue: false}) + _, err := ut.HandleCommitState(client, epoch, seed, &clientPkg.HttpClient{}, types.Rogue{IsRogue: false}) if err != nil { log.Fatal(err) } diff --git a/cmd/mocks/utils_cmd_interface.go b/cmd/mocks/utils_cmd_interface.go index 9b8b794a0..72a01e841 100644 --- a/cmd/mocks/utils_cmd_interface.go +++ b/cmd/mocks/utils_cmd_interface.go @@ -11,6 +11,8 @@ import ( bindings "razor/pkg/bindings" + client "razor/client" + common "github.com/ethereum/go-ethereum/common" context "context" @@ -57,17 +59,17 @@ func (_m *UtilsCmdInterface) Approve(txnArgs types.TransactionOptions) (common.H return r0, r1 } -// ApproveUnstake provides a mock function with given fields: client, stakerTokenAddress, txnArgs -func (_m *UtilsCmdInterface) ApproveUnstake(client *ethclient.Client, stakerTokenAddress common.Address, txnArgs types.TransactionOptions) (common.Hash, error) { - ret := _m.Called(client, stakerTokenAddress, txnArgs) +// ApproveUnstake provides a mock function with given fields: _a0, stakerTokenAddress, txnArgs +func (_m *UtilsCmdInterface) ApproveUnstake(_a0 *ethclient.Client, stakerTokenAddress common.Address, txnArgs types.TransactionOptions) (common.Hash, error) { + ret := _m.Called(_a0, stakerTokenAddress, txnArgs) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, common.Address, types.TransactionOptions) (common.Hash, error)); ok { - return rf(client, stakerTokenAddress, txnArgs) + return rf(_a0, stakerTokenAddress, txnArgs) } if rf, ok := ret.Get(0).(func(*ethclient.Client, common.Address, types.TransactionOptions) common.Hash); ok { - r0 = rf(client, stakerTokenAddress, txnArgs) + r0 = rf(_a0, stakerTokenAddress, txnArgs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -75,7 +77,7 @@ func (_m *UtilsCmdInterface) ApproveUnstake(client *ethclient.Client, stakerToke } if rf, ok := ret.Get(1).(func(*ethclient.Client, common.Address, types.TransactionOptions) error); ok { - r1 = rf(client, stakerTokenAddress, txnArgs) + r1 = rf(_a0, stakerTokenAddress, txnArgs) } else { r1 = ret.Error(1) } @@ -144,23 +146,23 @@ func (_m *UtilsCmdInterface) CalculateSecret(account types.Account, epoch uint32 return r0, r1, r2 } -// CheckCurrentStatus provides a mock function with given fields: client, collectionId -func (_m *UtilsCmdInterface) CheckCurrentStatus(client *ethclient.Client, collectionId uint16) (bool, error) { - ret := _m.Called(client, collectionId) +// CheckCurrentStatus provides a mock function with given fields: _a0, collectionId +func (_m *UtilsCmdInterface) CheckCurrentStatus(_a0 *ethclient.Client, collectionId uint16) (bool, error) { + ret := _m.Called(_a0, collectionId) var r0 bool var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) (bool, error)); ok { - return rf(client, collectionId) + return rf(_a0, collectionId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) bool); ok { - r0 = rf(client, collectionId) + r0 = rf(_a0, collectionId) } else { r0 = ret.Get(0).(bool) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16) error); ok { - r1 = rf(client, collectionId) + r1 = rf(_a0, collectionId) } else { r1 = ret.Error(1) } @@ -168,17 +170,17 @@ func (_m *UtilsCmdInterface) CheckCurrentStatus(client *ethclient.Client, collec return r0, r1 } -// CheckDisputeForIds provides a mock function with given fields: client, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds -func (_m *UtilsCmdInterface) CheckDisputeForIds(client *ethclient.Client, transactionOpts types.TransactionOptions, epoch uint32, blockIndex uint8, idsInProposedBlock []uint16, revealedCollectionIds []uint16) (*coretypes.Transaction, error) { - ret := _m.Called(client, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds) +// CheckDisputeForIds provides a mock function with given fields: _a0, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds +func (_m *UtilsCmdInterface) CheckDisputeForIds(_a0 *ethclient.Client, transactionOpts types.TransactionOptions, epoch uint32, blockIndex uint8, idsInProposedBlock []uint16, revealedCollectionIds []uint16) (*coretypes.Transaction, error) { + ret := _m.Called(_a0, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds) var r0 *coretypes.Transaction var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.TransactionOptions, uint32, uint8, []uint16, []uint16) (*coretypes.Transaction, error)); ok { - return rf(client, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds) + return rf(_a0, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.TransactionOptions, uint32, uint8, []uint16, []uint16) *coretypes.Transaction); ok { - r0 = rf(client, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds) + r0 = rf(_a0, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*coretypes.Transaction) @@ -186,7 +188,7 @@ func (_m *UtilsCmdInterface) CheckDisputeForIds(client *ethclient.Client, transa } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.TransactionOptions, uint32, uint8, []uint16, []uint16) error); ok { - r1 = rf(client, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds) + r1 = rf(_a0, transactionOpts, epoch, blockIndex, idsInProposedBlock, revealedCollectionIds) } else { r1 = ret.Error(1) } @@ -194,13 +196,13 @@ func (_m *UtilsCmdInterface) CheckDisputeForIds(client *ethclient.Client, transa return r0, r1 } -// CheckForLastCommitted provides a mock function with given fields: client, staker, epoch -func (_m *UtilsCmdInterface) CheckForLastCommitted(client *ethclient.Client, staker bindings.StructsStaker, epoch uint32) error { - ret := _m.Called(client, staker, epoch) +// CheckForLastCommitted provides a mock function with given fields: _a0, staker, epoch +func (_m *UtilsCmdInterface) CheckForLastCommitted(_a0 *ethclient.Client, staker bindings.StructsStaker, epoch uint32) error { + ret := _m.Called(_a0, staker, epoch) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, bindings.StructsStaker, uint32) error); ok { - r0 = rf(client, staker, epoch) + r0 = rf(_a0, staker, epoch) } else { r0 = ret.Error(0) } @@ -208,9 +210,9 @@ func (_m *UtilsCmdInterface) CheckForLastCommitted(client *ethclient.Client, sta return r0 } -// CheckToDoResetDispute provides a mock function with given fields: client, blockManager, txnOpts, epoch, sortedValues -func (_m *UtilsCmdInterface) CheckToDoResetDispute(client *ethclient.Client, blockManager *bindings.BlockManager, txnOpts *bind.TransactOpts, epoch uint32, sortedValues []*big.Int) { - _m.Called(client, blockManager, txnOpts, epoch, sortedValues) +// CheckToDoResetDispute provides a mock function with given fields: _a0, blockManager, txnOpts, epoch, sortedValues +func (_m *UtilsCmdInterface) CheckToDoResetDispute(_a0 *ethclient.Client, blockManager *bindings.BlockManager, txnOpts *bind.TransactOpts, epoch uint32, sortedValues []*big.Int) { + _m.Called(_a0, blockManager, txnOpts, epoch, sortedValues) } // ClaimBlockReward provides a mock function with given fields: options @@ -239,17 +241,17 @@ func (_m *UtilsCmdInterface) ClaimBlockReward(options types.TransactionOptions) return r0, r1 } -// ClaimBounty provides a mock function with given fields: config, client, redeemBountyInput -func (_m *UtilsCmdInterface) ClaimBounty(config types.Configurations, client *ethclient.Client, redeemBountyInput types.RedeemBountyInput) (common.Hash, error) { - ret := _m.Called(config, client, redeemBountyInput) +// ClaimBounty provides a mock function with given fields: config, _a1, redeemBountyInput +func (_m *UtilsCmdInterface) ClaimBounty(config types.Configurations, _a1 *ethclient.Client, redeemBountyInput types.RedeemBountyInput) (common.Hash, error) { + ret := _m.Called(config, _a1, redeemBountyInput) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(types.Configurations, *ethclient.Client, types.RedeemBountyInput) (common.Hash, error)); ok { - return rf(config, client, redeemBountyInput) + return rf(config, _a1, redeemBountyInput) } if rf, ok := ret.Get(0).(func(types.Configurations, *ethclient.Client, types.RedeemBountyInput) common.Hash); ok { - r0 = rf(config, client, redeemBountyInput) + r0 = rf(config, _a1, redeemBountyInput) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -257,7 +259,7 @@ func (_m *UtilsCmdInterface) ClaimBounty(config types.Configurations, client *et } if rf, ok := ret.Get(1).(func(types.Configurations, *ethclient.Client, types.RedeemBountyInput) error); ok { - r1 = rf(config, client, redeemBountyInput) + r1 = rf(config, _a1, redeemBountyInput) } else { r1 = ret.Error(1) } @@ -270,17 +272,17 @@ func (_m *UtilsCmdInterface) ClaimCommission(flagSet *pflag.FlagSet) { _m.Called(flagSet) } -// Commit provides a mock function with given fields: client, config, account, epoch, seed, values -func (_m *UtilsCmdInterface) Commit(client *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, seed []byte, values []*big.Int) (common.Hash, error) { - ret := _m.Called(client, config, account, epoch, seed, values) +// Commit provides a mock function with given fields: _a0, config, account, epoch, seed, values +func (_m *UtilsCmdInterface) Commit(_a0 *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, seed []byte, values []*big.Int) (common.Hash, error) { + ret := _m.Called(_a0, config, account, epoch, seed, values) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, []byte, []*big.Int) (common.Hash, error)); ok { - return rf(client, config, account, epoch, seed, values) + return rf(_a0, config, account, epoch, seed, values) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, []byte, []*big.Int) common.Hash); ok { - r0 = rf(client, config, account, epoch, seed, values) + r0 = rf(_a0, config, account, epoch, seed, values) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -288,7 +290,7 @@ func (_m *UtilsCmdInterface) Commit(client *ethclient.Client, config types.Confi } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.Account, uint32, []byte, []*big.Int) error); ok { - r1 = rf(client, config, account, epoch, seed, values) + r1 = rf(_a0, config, account, epoch, seed, values) } else { r1 = ret.Error(1) } @@ -325,17 +327,17 @@ func (_m *UtilsCmdInterface) Create(password string) (accounts.Account, error) { return r0, r1 } -// CreateCollection provides a mock function with given fields: client, config, collectionInput -func (_m *UtilsCmdInterface) CreateCollection(client *ethclient.Client, config types.Configurations, collectionInput types.CreateCollectionInput) (common.Hash, error) { - ret := _m.Called(client, config, collectionInput) +// CreateCollection provides a mock function with given fields: _a0, config, collectionInput +func (_m *UtilsCmdInterface) CreateCollection(_a0 *ethclient.Client, config types.Configurations, collectionInput types.CreateCollectionInput) (common.Hash, error) { + ret := _m.Called(_a0, config, collectionInput) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.CreateCollectionInput) (common.Hash, error)); ok { - return rf(client, config, collectionInput) + return rf(_a0, config, collectionInput) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.CreateCollectionInput) common.Hash); ok { - r0 = rf(client, config, collectionInput) + r0 = rf(_a0, config, collectionInput) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -343,7 +345,7 @@ func (_m *UtilsCmdInterface) CreateCollection(client *ethclient.Client, config t } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.CreateCollectionInput) error); ok { - r1 = rf(client, config, collectionInput) + r1 = rf(_a0, config, collectionInput) } else { r1 = ret.Error(1) } @@ -351,17 +353,17 @@ func (_m *UtilsCmdInterface) CreateCollection(client *ethclient.Client, config t return r0, r1 } -// CreateJob provides a mock function with given fields: client, config, jobInput -func (_m *UtilsCmdInterface) CreateJob(client *ethclient.Client, config types.Configurations, jobInput types.CreateJobInput) (common.Hash, error) { - ret := _m.Called(client, config, jobInput) +// CreateJob provides a mock function with given fields: _a0, config, jobInput +func (_m *UtilsCmdInterface) CreateJob(_a0 *ethclient.Client, config types.Configurations, jobInput types.CreateJobInput) (common.Hash, error) { + ret := _m.Called(_a0, config, jobInput) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.CreateJobInput) (common.Hash, error)); ok { - return rf(client, config, jobInput) + return rf(_a0, config, jobInput) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.CreateJobInput) common.Hash); ok { - r0 = rf(client, config, jobInput) + r0 = rf(_a0, config, jobInput) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -369,7 +371,7 @@ func (_m *UtilsCmdInterface) CreateJob(client *ethclient.Client, config types.Co } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.CreateJobInput) error); ok { - r1 = rf(client, config, jobInput) + r1 = rf(_a0, config, jobInput) } else { r1 = ret.Error(1) } @@ -403,13 +405,13 @@ func (_m *UtilsCmdInterface) Delegate(txnArgs types.TransactionOptions, stakerId return r0, r1 } -// Dispute provides a mock function with given fields: client, config, account, epoch, blockIndex, proposedBlock, leafId, sortedValues -func (_m *UtilsCmdInterface) Dispute(client *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, blockIndex uint8, proposedBlock bindings.StructsBlock, leafId uint16, sortedValues []*big.Int) error { - ret := _m.Called(client, config, account, epoch, blockIndex, proposedBlock, leafId, sortedValues) +// Dispute provides a mock function with given fields: _a0, config, account, epoch, blockIndex, proposedBlock, leafId, sortedValues +func (_m *UtilsCmdInterface) Dispute(_a0 *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, blockIndex uint8, proposedBlock bindings.StructsBlock, leafId uint16, sortedValues []*big.Int) error { + ret := _m.Called(_a0, config, account, epoch, blockIndex, proposedBlock, leafId, sortedValues) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, uint8, bindings.StructsBlock, uint16, []*big.Int) error); ok { - r0 = rf(client, config, account, epoch, blockIndex, proposedBlock, leafId, sortedValues) + r0 = rf(_a0, config, account, epoch, blockIndex, proposedBlock, leafId, sortedValues) } else { r0 = ret.Error(0) } @@ -570,18 +572,18 @@ func (_m *UtilsCmdInterface) GetAlternateProvider() (string, error) { return r0, r1 } -// GetBiggestStakeAndId provides a mock function with given fields: client, address, epoch -func (_m *UtilsCmdInterface) GetBiggestStakeAndId(client *ethclient.Client, address string, epoch uint32) (*big.Int, uint32, error) { - ret := _m.Called(client, address, epoch) +// GetBiggestStakeAndId provides a mock function with given fields: _a0, address, epoch +func (_m *UtilsCmdInterface) GetBiggestStakeAndId(_a0 *ethclient.Client, address string, epoch uint32) (*big.Int, uint32, error) { + ret := _m.Called(_a0, address, epoch) var r0 *big.Int var r1 uint32 var r2 error if rf, ok := ret.Get(0).(func(*ethclient.Client, string, uint32) (*big.Int, uint32, error)); ok { - return rf(client, address, epoch) + return rf(_a0, address, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, string, uint32) *big.Int); ok { - r0 = rf(client, address, epoch) + r0 = rf(_a0, address, epoch) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -589,13 +591,13 @@ func (_m *UtilsCmdInterface) GetBiggestStakeAndId(client *ethclient.Client, addr } if rf, ok := ret.Get(1).(func(*ethclient.Client, string, uint32) uint32); ok { - r1 = rf(client, address, epoch) + r1 = rf(_a0, address, epoch) } else { r1 = ret.Get(1).(uint32) } if rf, ok := ret.Get(2).(func(*ethclient.Client, string, uint32) error); ok { - r2 = rf(client, address, epoch) + r2 = rf(_a0, address, epoch) } else { r2 = ret.Error(2) } @@ -603,23 +605,23 @@ func (_m *UtilsCmdInterface) GetBiggestStakeAndId(client *ethclient.Client, addr return r0, r1, r2 } -// GetBountyIdFromEvents provides a mock function with given fields: client, blockNumber, bountyHunter -func (_m *UtilsCmdInterface) GetBountyIdFromEvents(client *ethclient.Client, blockNumber *big.Int, bountyHunter string) (uint32, error) { - ret := _m.Called(client, blockNumber, bountyHunter) +// GetBountyIdFromEvents provides a mock function with given fields: _a0, blockNumber, bountyHunter +func (_m *UtilsCmdInterface) GetBountyIdFromEvents(_a0 *ethclient.Client, blockNumber *big.Int, bountyHunter string) (uint32, error) { + ret := _m.Called(_a0, blockNumber, bountyHunter) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int, string) (uint32, error)); ok { - return rf(client, blockNumber, bountyHunter) + return rf(_a0, blockNumber, bountyHunter) } if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int, string) uint32); ok { - r0 = rf(client, blockNumber, bountyHunter) + r0 = rf(_a0, blockNumber, bountyHunter) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client, *big.Int, string) error); ok { - r1 = rf(client, blockNumber, bountyHunter) + r1 = rf(_a0, blockNumber, bountyHunter) } else { r1 = ret.Error(1) } @@ -651,13 +653,13 @@ func (_m *UtilsCmdInterface) GetBufferPercent() (int32, error) { return r0, r1 } -// GetCollectionIdPositionInBlock provides a mock function with given fields: client, leafId, proposedBlock -func (_m *UtilsCmdInterface) GetCollectionIdPositionInBlock(client *ethclient.Client, leafId uint16, proposedBlock bindings.StructsBlock) *big.Int { - ret := _m.Called(client, leafId, proposedBlock) +// GetCollectionIdPositionInBlock provides a mock function with given fields: _a0, leafId, proposedBlock +func (_m *UtilsCmdInterface) GetCollectionIdPositionInBlock(_a0 *ethclient.Client, leafId uint16, proposedBlock bindings.StructsBlock) *big.Int { + ret := _m.Called(_a0, leafId, proposedBlock) var r0 *big.Int if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16, bindings.StructsBlock) *big.Int); ok { - r0 = rf(client, leafId, proposedBlock) + r0 = rf(_a0, leafId, proposedBlock) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -667,13 +669,13 @@ func (_m *UtilsCmdInterface) GetCollectionIdPositionInBlock(client *ethclient.Cl return r0 } -// GetCollectionList provides a mock function with given fields: client -func (_m *UtilsCmdInterface) GetCollectionList(client *ethclient.Client) error { - ret := _m.Called(client) +// GetCollectionList provides a mock function with given fields: _a0 +func (_m *UtilsCmdInterface) GetCollectionList(_a0 *ethclient.Client) error { + ret := _m.Called(_a0) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client) error); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Error(0) } @@ -705,30 +707,30 @@ func (_m *UtilsCmdInterface) GetConfigData() (types.Configurations, error) { return r0, r1 } -// GetEpochAndState provides a mock function with given fields: client -func (_m *UtilsCmdInterface) GetEpochAndState(client *ethclient.Client) (uint32, int64, error) { - ret := _m.Called(client) +// GetEpochAndState provides a mock function with given fields: _a0 +func (_m *UtilsCmdInterface) GetEpochAndState(_a0 *ethclient.Client) (uint32, int64, error) { + ret := _m.Called(_a0) var r0 uint32 var r1 int64 var r2 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint32, int64, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint32); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client) int64); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Get(1).(int64) } if rf, ok := ret.Get(2).(func(*ethclient.Client) error); ok { - r2 = rf(client) + r2 = rf(_a0) } else { r2 = ret.Error(2) } @@ -832,13 +834,13 @@ func (_m *UtilsCmdInterface) GetHTTPTimeout() (int64, error) { return r0, r1 } -// GetIteration provides a mock function with given fields: client, proposer, bufferPercent -func (_m *UtilsCmdInterface) GetIteration(client *ethclient.Client, proposer types.ElectedProposer, bufferPercent int32) int { - ret := _m.Called(client, proposer, bufferPercent) +// GetIteration provides a mock function with given fields: _a0, proposer, bufferPercent +func (_m *UtilsCmdInterface) GetIteration(_a0 *ethclient.Client, proposer types.ElectedProposer, bufferPercent int32) int { + ret := _m.Called(_a0, proposer, bufferPercent) var r0 int if rf, ok := ret.Get(0).(func(*ethclient.Client, types.ElectedProposer, int32) int); ok { - r0 = rf(client, proposer, bufferPercent) + r0 = rf(_a0, proposer, bufferPercent) } else { r0 = ret.Get(0).(int) } @@ -846,13 +848,13 @@ func (_m *UtilsCmdInterface) GetIteration(client *ethclient.Client, proposer typ return r0 } -// GetJobList provides a mock function with given fields: client -func (_m *UtilsCmdInterface) GetJobList(client *ethclient.Client) error { - ret := _m.Called(client) +// GetJobList provides a mock function with given fields: _a0 +func (_m *UtilsCmdInterface) GetJobList(_a0 *ethclient.Client) error { + ret := _m.Called(_a0) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client) error); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Error(0) } @@ -860,23 +862,23 @@ func (_m *UtilsCmdInterface) GetJobList(client *ethclient.Client) error { return r0 } -// GetLocalMediansData provides a mock function with given fields: client, account, epoch, blockNumber, rogueData -func (_m *UtilsCmdInterface) GetLocalMediansData(client *ethclient.Client, account types.Account, epoch uint32, blockNumber *big.Int, rogueData types.Rogue) (types.ProposeFileData, error) { - ret := _m.Called(client, account, epoch, blockNumber, rogueData) +// GetLocalMediansData provides a mock function with given fields: _a0, account, epoch, blockNumber, rogueData +func (_m *UtilsCmdInterface) GetLocalMediansData(_a0 *ethclient.Client, account types.Account, epoch uint32, blockNumber *big.Int, rogueData types.Rogue) (types.ProposeFileData, error) { + ret := _m.Called(_a0, account, epoch, blockNumber, rogueData) var r0 types.ProposeFileData var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Account, uint32, *big.Int, types.Rogue) (types.ProposeFileData, error)); ok { - return rf(client, account, epoch, blockNumber, rogueData) + return rf(_a0, account, epoch, blockNumber, rogueData) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Account, uint32, *big.Int, types.Rogue) types.ProposeFileData); ok { - r0 = rf(client, account, epoch, blockNumber, rogueData) + r0 = rf(_a0, account, epoch, blockNumber, rogueData) } else { r0 = ret.Get(0).(types.ProposeFileData) } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Account, uint32, *big.Int, types.Rogue) error); ok { - r1 = rf(client, account, epoch, blockNumber, rogueData) + r1 = rf(_a0, account, epoch, blockNumber, rogueData) } else { r1 = ret.Error(1) } @@ -1052,17 +1054,17 @@ func (_m *UtilsCmdInterface) GetRPCTimeout() (int64, error) { return r0, r1 } -// GetSalt provides a mock function with given fields: client, epoch -func (_m *UtilsCmdInterface) GetSalt(client *ethclient.Client, epoch uint32) ([32]byte, error) { - ret := _m.Called(client, epoch) +// GetSalt provides a mock function with given fields: _a0, epoch +func (_m *UtilsCmdInterface) GetSalt(_a0 *ethclient.Client, epoch uint32) ([32]byte, error) { + ret := _m.Called(_a0, epoch) var r0 [32]byte var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) ([32]byte, error)); ok { - return rf(client, epoch) + return rf(_a0, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) [32]byte); ok { - r0 = rf(client, epoch) + r0 = rf(_a0, epoch) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([32]byte) @@ -1070,7 +1072,7 @@ func (_m *UtilsCmdInterface) GetSalt(client *ethclient.Client, epoch uint32) ([3 } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, epoch) + r1 = rf(_a0, epoch) } else { r1 = ret.Error(1) } @@ -1078,18 +1080,18 @@ func (_m *UtilsCmdInterface) GetSalt(client *ethclient.Client, epoch uint32) ([3 return r0, r1 } -// GetSmallestStakeAndId provides a mock function with given fields: client, epoch -func (_m *UtilsCmdInterface) GetSmallestStakeAndId(client *ethclient.Client, epoch uint32) (*big.Int, uint32, error) { - ret := _m.Called(client, epoch) +// GetSmallestStakeAndId provides a mock function with given fields: _a0, epoch +func (_m *UtilsCmdInterface) GetSmallestStakeAndId(_a0 *ethclient.Client, epoch uint32) (*big.Int, uint32, error) { + ret := _m.Called(_a0, epoch) var r0 *big.Int var r1 uint32 var r2 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) (*big.Int, uint32, error)); ok { - return rf(client, epoch) + return rf(_a0, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) *big.Int); ok { - r0 = rf(client, epoch) + r0 = rf(_a0, epoch) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -1097,13 +1099,13 @@ func (_m *UtilsCmdInterface) GetSmallestStakeAndId(client *ethclient.Client, epo } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) uint32); ok { - r1 = rf(client, epoch) + r1 = rf(_a0, epoch) } else { r1 = ret.Get(1).(uint32) } if rf, ok := ret.Get(2).(func(*ethclient.Client, uint32) error); ok { - r2 = rf(client, epoch) + r2 = rf(_a0, epoch) } else { r2 = ret.Error(2) } @@ -1111,17 +1113,17 @@ func (_m *UtilsCmdInterface) GetSmallestStakeAndId(client *ethclient.Client, epo return r0, r1, r2 } -// GetSortedRevealedValues provides a mock function with given fields: client, blockNumber, epoch -func (_m *UtilsCmdInterface) GetSortedRevealedValues(client *ethclient.Client, blockNumber *big.Int, epoch uint32) (*types.RevealedDataMaps, error) { - ret := _m.Called(client, blockNumber, epoch) +// GetSortedRevealedValues provides a mock function with given fields: _a0, blockNumber, epoch +func (_m *UtilsCmdInterface) GetSortedRevealedValues(_a0 *ethclient.Client, blockNumber *big.Int, epoch uint32) (*types.RevealedDataMaps, error) { + ret := _m.Called(_a0, blockNumber, epoch) var r0 *types.RevealedDataMaps var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int, uint32) (*types.RevealedDataMaps, error)); ok { - return rf(client, blockNumber, epoch) + return rf(_a0, blockNumber, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int, uint32) *types.RevealedDataMaps); ok { - r0 = rf(client, blockNumber, epoch) + r0 = rf(_a0, blockNumber, epoch) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*types.RevealedDataMaps) @@ -1129,7 +1131,7 @@ func (_m *UtilsCmdInterface) GetSortedRevealedValues(client *ethclient.Client, b } if rf, ok := ret.Get(1).(func(*ethclient.Client, *big.Int, uint32) error); ok { - r1 = rf(client, blockNumber, epoch) + r1 = rf(_a0, blockNumber, epoch) } else { r1 = ret.Error(1) } @@ -1137,13 +1139,13 @@ func (_m *UtilsCmdInterface) GetSortedRevealedValues(client *ethclient.Client, b return r0, r1 } -// GetStakerInfo provides a mock function with given fields: client, stakerId -func (_m *UtilsCmdInterface) GetStakerInfo(client *ethclient.Client, stakerId uint32) error { - ret := _m.Called(client, stakerId) +// GetStakerInfo provides a mock function with given fields: _a0, stakerId +func (_m *UtilsCmdInterface) GetStakerInfo(_a0 *ethclient.Client, stakerId uint32) error { + ret := _m.Called(_a0, stakerId) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) error); ok { - r0 = rf(client, stakerId) + r0 = rf(_a0, stakerId) } else { r0 = ret.Error(0) } @@ -1175,13 +1177,13 @@ func (_m *UtilsCmdInterface) GetWaitTime() (int32, error) { return r0, r1 } -// GiveSorted provides a mock function with given fields: client, blockManager, txnArgs, epoch, assetId, sortedStakers -func (_m *UtilsCmdInterface) GiveSorted(client *ethclient.Client, blockManager *bindings.BlockManager, txnArgs types.TransactionOptions, epoch uint32, assetId uint16, sortedStakers []*big.Int) error { - ret := _m.Called(client, blockManager, txnArgs, epoch, assetId, sortedStakers) +// GiveSorted provides a mock function with given fields: _a0, blockManager, txnArgs, epoch, assetId, sortedStakers +func (_m *UtilsCmdInterface) GiveSorted(_a0 *ethclient.Client, blockManager *bindings.BlockManager, txnArgs types.TransactionOptions, epoch uint32, assetId uint16, sortedStakers []*big.Int) error { + ret := _m.Called(_a0, blockManager, txnArgs, epoch, assetId, sortedStakers) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, *bindings.BlockManager, types.TransactionOptions, uint32, uint16, []*big.Int) error); ok { - r0 = rf(client, blockManager, txnArgs, epoch, assetId, sortedStakers) + r0 = rf(_a0, blockManager, txnArgs, epoch, assetId, sortedStakers) } else { r0 = ret.Error(0) } @@ -1189,18 +1191,18 @@ func (_m *UtilsCmdInterface) GiveSorted(client *ethclient.Client, blockManager * return r0 } -// HandleBlock provides a mock function with given fields: client, account, blockNumber, config, rogueData, backupNodeActionsToIgnore -func (_m *UtilsCmdInterface) HandleBlock(client *ethclient.Client, account types.Account, blockNumber *big.Int, config types.Configurations, rogueData types.Rogue, backupNodeActionsToIgnore []string) { - _m.Called(client, account, blockNumber, config, rogueData, backupNodeActionsToIgnore) +// HandleBlock provides a mock function with given fields: _a0, account, blockNumber, config, httpClient, rogueData, backupNodeActionsToIgnore +func (_m *UtilsCmdInterface) HandleBlock(_a0 *ethclient.Client, account types.Account, blockNumber *big.Int, config types.Configurations, httpClient *client.HttpClient, rogueData types.Rogue, backupNodeActionsToIgnore []string) { + _m.Called(_a0, account, blockNumber, config, httpClient, rogueData, backupNodeActionsToIgnore) } -// HandleClaimBounty provides a mock function with given fields: client, config, account -func (_m *UtilsCmdInterface) HandleClaimBounty(client *ethclient.Client, config types.Configurations, account types.Account) error { - ret := _m.Called(client, config, account) +// HandleClaimBounty provides a mock function with given fields: _a0, config, account +func (_m *UtilsCmdInterface) HandleClaimBounty(_a0 *ethclient.Client, config types.Configurations, account types.Account) error { + ret := _m.Called(_a0, config, account) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account) error); ok { - r0 = rf(client, config, account) + r0 = rf(_a0, config, account) } else { r0 = ret.Error(0) } @@ -1208,23 +1210,23 @@ func (_m *UtilsCmdInterface) HandleClaimBounty(client *ethclient.Client, config return r0 } -// HandleCommitState provides a mock function with given fields: client, epoch, seed, rogueData -func (_m *UtilsCmdInterface) HandleCommitState(client *ethclient.Client, epoch uint32, seed []byte, rogueData types.Rogue) (types.CommitData, error) { - ret := _m.Called(client, epoch, seed, rogueData) +// HandleCommitState provides a mock function with given fields: _a0, epoch, seed, httpClient, rogueData +func (_m *UtilsCmdInterface) HandleCommitState(_a0 *ethclient.Client, epoch uint32, seed []byte, httpClient *client.HttpClient, rogueData types.Rogue) (types.CommitData, error) { + ret := _m.Called(_a0, epoch, seed, httpClient, rogueData) var r0 types.CommitData var r1 error - if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, []byte, types.Rogue) (types.CommitData, error)); ok { - return rf(client, epoch, seed, rogueData) + if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, []byte, *client.HttpClient, types.Rogue) (types.CommitData, error)); ok { + return rf(_a0, epoch, seed, httpClient, rogueData) } - if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, []byte, types.Rogue) types.CommitData); ok { - r0 = rf(client, epoch, seed, rogueData) + if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, []byte, *client.HttpClient, types.Rogue) types.CommitData); ok { + r0 = rf(_a0, epoch, seed, httpClient, rogueData) } else { r0 = ret.Get(0).(types.CommitData) } - if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, []byte, types.Rogue) error); ok { - r1 = rf(client, epoch, seed, rogueData) + if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, []byte, *client.HttpClient, types.Rogue) error); ok { + r1 = rf(_a0, epoch, seed, httpClient, rogueData) } else { r1 = ret.Error(1) } @@ -1232,13 +1234,13 @@ func (_m *UtilsCmdInterface) HandleCommitState(client *ethclient.Client, epoch u return r0, r1 } -// HandleDispute provides a mock function with given fields: client, config, account, epoch, blockNumber, rogueData, backupNodeActionsToIgnore -func (_m *UtilsCmdInterface) HandleDispute(client *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, blockNumber *big.Int, rogueData types.Rogue, backupNodeActionsToIgnore []string) error { - ret := _m.Called(client, config, account, epoch, blockNumber, rogueData, backupNodeActionsToIgnore) +// HandleDispute provides a mock function with given fields: _a0, config, account, epoch, blockNumber, rogueData, backupNodeActionsToIgnore +func (_m *UtilsCmdInterface) HandleDispute(_a0 *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, blockNumber *big.Int, rogueData types.Rogue, backupNodeActionsToIgnore []string) error { + ret := _m.Called(_a0, config, account, epoch, blockNumber, rogueData, backupNodeActionsToIgnore) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, *big.Int, types.Rogue, []string) error); ok { - r0 = rf(client, config, account, epoch, blockNumber, rogueData, backupNodeActionsToIgnore) + r0 = rf(_a0, config, account, epoch, blockNumber, rogueData, backupNodeActionsToIgnore) } else { r0 = ret.Error(0) } @@ -1251,17 +1253,17 @@ func (_m *UtilsCmdInterface) HandleExit() { _m.Called() } -// HandleUnstakeLock provides a mock function with given fields: client, account, configurations, stakerId -func (_m *UtilsCmdInterface) HandleUnstakeLock(client *ethclient.Client, account types.Account, configurations types.Configurations, stakerId uint32) (common.Hash, error) { - ret := _m.Called(client, account, configurations, stakerId) +// HandleUnstakeLock provides a mock function with given fields: _a0, account, configurations, stakerId +func (_m *UtilsCmdInterface) HandleUnstakeLock(_a0 *ethclient.Client, account types.Account, configurations types.Configurations, stakerId uint32) (common.Hash, error) { + ret := _m.Called(_a0, account, configurations, stakerId) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Account, types.Configurations, uint32) (common.Hash, error)); ok { - return rf(client, account, configurations, stakerId) + return rf(_a0, account, configurations, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Account, types.Configurations, uint32) common.Hash); ok { - r0 = rf(client, account, configurations, stakerId) + r0 = rf(_a0, account, configurations, stakerId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1269,7 +1271,7 @@ func (_m *UtilsCmdInterface) HandleUnstakeLock(client *ethclient.Client, account } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Account, types.Configurations, uint32) error); ok { - r1 = rf(client, account, configurations, stakerId) + r1 = rf(_a0, account, configurations, stakerId) } else { r1 = ret.Error(1) } @@ -1277,17 +1279,17 @@ func (_m *UtilsCmdInterface) HandleUnstakeLock(client *ethclient.Client, account return r0, r1 } -// HandleWithdrawLock provides a mock function with given fields: client, account, configurations, stakerId -func (_m *UtilsCmdInterface) HandleWithdrawLock(client *ethclient.Client, account types.Account, configurations types.Configurations, stakerId uint32) (common.Hash, error) { - ret := _m.Called(client, account, configurations, stakerId) +// HandleWithdrawLock provides a mock function with given fields: _a0, account, configurations, stakerId +func (_m *UtilsCmdInterface) HandleWithdrawLock(_a0 *ethclient.Client, account types.Account, configurations types.Configurations, stakerId uint32) (common.Hash, error) { + ret := _m.Called(_a0, account, configurations, stakerId) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Account, types.Configurations, uint32) (common.Hash, error)); ok { - return rf(client, account, configurations, stakerId) + return rf(_a0, account, configurations, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Account, types.Configurations, uint32) common.Hash); ok { - r0 = rf(client, account, configurations, stakerId) + r0 = rf(_a0, account, configurations, stakerId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1295,7 +1297,7 @@ func (_m *UtilsCmdInterface) HandleWithdrawLock(client *ethclient.Client, accoun } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Account, types.Configurations, uint32) error); ok { - r1 = rf(client, account, configurations, stakerId) + r1 = rf(_a0, account, configurations, stakerId) } else { r1 = ret.Error(1) } @@ -1327,17 +1329,17 @@ func (_m *UtilsCmdInterface) ImportAccount() (accounts.Account, error) { return r0, r1 } -// IndexRevealEventsOfCurrentEpoch provides a mock function with given fields: client, blockNumber, epoch -func (_m *UtilsCmdInterface) IndexRevealEventsOfCurrentEpoch(client *ethclient.Client, blockNumber *big.Int, epoch uint32) ([]types.RevealedStruct, error) { - ret := _m.Called(client, blockNumber, epoch) +// IndexRevealEventsOfCurrentEpoch provides a mock function with given fields: _a0, blockNumber, epoch +func (_m *UtilsCmdInterface) IndexRevealEventsOfCurrentEpoch(_a0 *ethclient.Client, blockNumber *big.Int, epoch uint32) ([]types.RevealedStruct, error) { + ret := _m.Called(_a0, blockNumber, epoch) var r0 []types.RevealedStruct var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int, uint32) ([]types.RevealedStruct, error)); ok { - return rf(client, blockNumber, epoch) + return rf(_a0, blockNumber, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int, uint32) []types.RevealedStruct); ok { - r0 = rf(client, blockNumber, epoch) + r0 = rf(_a0, blockNumber, epoch) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]types.RevealedStruct) @@ -1345,7 +1347,7 @@ func (_m *UtilsCmdInterface) IndexRevealEventsOfCurrentEpoch(client *ethclient.C } if rf, ok := ret.Get(1).(func(*ethclient.Client, *big.Int, uint32) error); ok { - r1 = rf(client, blockNumber, epoch) + r1 = rf(_a0, blockNumber, epoch) } else { r1 = ret.Error(1) } @@ -1353,13 +1355,13 @@ func (_m *UtilsCmdInterface) IndexRevealEventsOfCurrentEpoch(client *ethclient.C return r0, r1 } -// InitiateCommit provides a mock function with given fields: client, config, account, epoch, stakerId, rogueData -func (_m *UtilsCmdInterface) InitiateCommit(client *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, stakerId uint32, rogueData types.Rogue) error { - ret := _m.Called(client, config, account, epoch, stakerId, rogueData) +// InitiateCommit provides a mock function with given fields: _a0, config, account, epoch, stakerId, httpClient, rogueData +func (_m *UtilsCmdInterface) InitiateCommit(_a0 *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, stakerId uint32, httpClient *client.HttpClient, rogueData types.Rogue) error { + ret := _m.Called(_a0, config, account, epoch, stakerId, httpClient, rogueData) var r0 error - if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, uint32, types.Rogue) error); ok { - r0 = rf(client, config, account, epoch, stakerId, rogueData) + if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, uint32, *client.HttpClient, types.Rogue) error); ok { + r0 = rf(_a0, config, account, epoch, stakerId, httpClient, rogueData) } else { r0 = ret.Error(0) } @@ -1367,13 +1369,13 @@ func (_m *UtilsCmdInterface) InitiateCommit(client *ethclient.Client, config typ return r0 } -// InitiatePropose provides a mock function with given fields: client, config, account, epoch, staker, blockNumber, rogueData -func (_m *UtilsCmdInterface) InitiatePropose(client *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, staker bindings.StructsStaker, blockNumber *big.Int, rogueData types.Rogue) error { - ret := _m.Called(client, config, account, epoch, staker, blockNumber, rogueData) +// InitiatePropose provides a mock function with given fields: _a0, config, account, epoch, staker, blockNumber, rogueData +func (_m *UtilsCmdInterface) InitiatePropose(_a0 *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, staker bindings.StructsStaker, blockNumber *big.Int, rogueData types.Rogue) error { + ret := _m.Called(_a0, config, account, epoch, staker, blockNumber, rogueData) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, bindings.StructsStaker, *big.Int, types.Rogue) error); ok { - r0 = rf(client, config, account, epoch, staker, blockNumber, rogueData) + r0 = rf(_a0, config, account, epoch, staker, blockNumber, rogueData) } else { r0 = ret.Error(0) } @@ -1381,13 +1383,13 @@ func (_m *UtilsCmdInterface) InitiatePropose(client *ethclient.Client, config ty return r0 } -// InitiateReveal provides a mock function with given fields: client, config, account, epoch, staker, rogueData -func (_m *UtilsCmdInterface) InitiateReveal(client *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, staker bindings.StructsStaker, rogueData types.Rogue) error { - ret := _m.Called(client, config, account, epoch, staker, rogueData) +// InitiateReveal provides a mock function with given fields: _a0, config, account, epoch, staker, rogueData +func (_m *UtilsCmdInterface) InitiateReveal(_a0 *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, staker bindings.StructsStaker, rogueData types.Rogue) error { + ret := _m.Called(_a0, config, account, epoch, staker, rogueData) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, bindings.StructsStaker, types.Rogue) error); ok { - r0 = rf(client, config, account, epoch, staker, rogueData) + r0 = rf(_a0, config, account, epoch, staker, rogueData) } else { r0 = ret.Error(0) } @@ -1395,17 +1397,17 @@ func (_m *UtilsCmdInterface) InitiateReveal(client *ethclient.Client, config typ return r0 } -// InitiateWithdraw provides a mock function with given fields: client, txnOpts, stakerId -func (_m *UtilsCmdInterface) InitiateWithdraw(client *ethclient.Client, txnOpts *bind.TransactOpts, stakerId uint32) (common.Hash, error) { - ret := _m.Called(client, txnOpts, stakerId) +// InitiateWithdraw provides a mock function with given fields: _a0, txnOpts, stakerId +func (_m *UtilsCmdInterface) InitiateWithdraw(_a0 *ethclient.Client, txnOpts *bind.TransactOpts, stakerId uint32) (common.Hash, error) { + ret := _m.Called(_a0, txnOpts, stakerId) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, *bind.TransactOpts, uint32) (common.Hash, error)); ok { - return rf(client, txnOpts, stakerId) + return rf(_a0, txnOpts, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, *bind.TransactOpts, uint32) common.Hash); ok { - r0 = rf(client, txnOpts, stakerId) + r0 = rf(_a0, txnOpts, stakerId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1413,7 +1415,7 @@ func (_m *UtilsCmdInterface) InitiateWithdraw(client *ethclient.Client, txnOpts } if rf, ok := ret.Get(1).(func(*ethclient.Client, *bind.TransactOpts, uint32) error); ok { - r1 = rf(client, txnOpts, stakerId) + r1 = rf(_a0, txnOpts, stakerId) } else { r1 = ret.Error(1) } @@ -1461,19 +1463,19 @@ func (_m *UtilsCmdInterface) ListAccounts() ([]accounts.Account, error) { return r0, r1 } -// MakeBlock provides a mock function with given fields: client, blockNumber, epoch, rogueData -func (_m *UtilsCmdInterface) MakeBlock(client *ethclient.Client, blockNumber *big.Int, epoch uint32, rogueData types.Rogue) ([]*big.Int, []uint16, *types.RevealedDataMaps, error) { - ret := _m.Called(client, blockNumber, epoch, rogueData) +// MakeBlock provides a mock function with given fields: _a0, blockNumber, epoch, rogueData +func (_m *UtilsCmdInterface) MakeBlock(_a0 *ethclient.Client, blockNumber *big.Int, epoch uint32, rogueData types.Rogue) ([]*big.Int, []uint16, *types.RevealedDataMaps, error) { + ret := _m.Called(_a0, blockNumber, epoch, rogueData) var r0 []*big.Int var r1 []uint16 var r2 *types.RevealedDataMaps var r3 error if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int, uint32, types.Rogue) ([]*big.Int, []uint16, *types.RevealedDataMaps, error)); ok { - return rf(client, blockNumber, epoch, rogueData) + return rf(_a0, blockNumber, epoch, rogueData) } if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int, uint32, types.Rogue) []*big.Int); ok { - r0 = rf(client, blockNumber, epoch, rogueData) + r0 = rf(_a0, blockNumber, epoch, rogueData) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*big.Int) @@ -1481,7 +1483,7 @@ func (_m *UtilsCmdInterface) MakeBlock(client *ethclient.Client, blockNumber *bi } if rf, ok := ret.Get(1).(func(*ethclient.Client, *big.Int, uint32, types.Rogue) []uint16); ok { - r1 = rf(client, blockNumber, epoch, rogueData) + r1 = rf(_a0, blockNumber, epoch, rogueData) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]uint16) @@ -1489,7 +1491,7 @@ func (_m *UtilsCmdInterface) MakeBlock(client *ethclient.Client, blockNumber *bi } if rf, ok := ret.Get(2).(func(*ethclient.Client, *big.Int, uint32, types.Rogue) *types.RevealedDataMaps); ok { - r2 = rf(client, blockNumber, epoch, rogueData) + r2 = rf(_a0, blockNumber, epoch, rogueData) } else { if ret.Get(2) != nil { r2 = ret.Get(2).(*types.RevealedDataMaps) @@ -1497,7 +1499,7 @@ func (_m *UtilsCmdInterface) MakeBlock(client *ethclient.Client, blockNumber *bi } if rf, ok := ret.Get(3).(func(*ethclient.Client, *big.Int, uint32, types.Rogue) error); ok { - r3 = rf(client, blockNumber, epoch, rogueData) + r3 = rf(_a0, blockNumber, epoch, rogueData) } else { r3 = ret.Error(3) } @@ -1505,17 +1507,17 @@ func (_m *UtilsCmdInterface) MakeBlock(client *ethclient.Client, blockNumber *bi return r0, r1, r2, r3 } -// ModifyCollectionStatus provides a mock function with given fields: client, config, modifyCollectionInput -func (_m *UtilsCmdInterface) ModifyCollectionStatus(client *ethclient.Client, config types.Configurations, modifyCollectionInput types.ModifyCollectionInput) (common.Hash, error) { - ret := _m.Called(client, config, modifyCollectionInput) +// ModifyCollectionStatus provides a mock function with given fields: _a0, config, modifyCollectionInput +func (_m *UtilsCmdInterface) ModifyCollectionStatus(_a0 *ethclient.Client, config types.Configurations, modifyCollectionInput types.ModifyCollectionInput) (common.Hash, error) { + ret := _m.Called(_a0, config, modifyCollectionInput) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.ModifyCollectionInput) (common.Hash, error)); ok { - return rf(client, config, modifyCollectionInput) + return rf(_a0, config, modifyCollectionInput) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.ModifyCollectionInput) common.Hash); ok { - r0 = rf(client, config, modifyCollectionInput) + r0 = rf(_a0, config, modifyCollectionInput) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1523,7 +1525,7 @@ func (_m *UtilsCmdInterface) ModifyCollectionStatus(client *ethclient.Client, co } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.ModifyCollectionInput) error); ok { - r1 = rf(client, config, modifyCollectionInput) + r1 = rf(_a0, config, modifyCollectionInput) } else { r1 = ret.Error(1) } @@ -1531,13 +1533,13 @@ func (_m *UtilsCmdInterface) ModifyCollectionStatus(client *ethclient.Client, co return r0, r1 } -// Propose provides a mock function with given fields: client, config, account, staker, epoch, blockNumber, rogueData -func (_m *UtilsCmdInterface) Propose(client *ethclient.Client, config types.Configurations, account types.Account, staker bindings.StructsStaker, epoch uint32, blockNumber *big.Int, rogueData types.Rogue) error { - ret := _m.Called(client, config, account, staker, epoch, blockNumber, rogueData) +// Propose provides a mock function with given fields: _a0, config, account, staker, epoch, blockNumber, rogueData +func (_m *UtilsCmdInterface) Propose(_a0 *ethclient.Client, config types.Configurations, account types.Account, staker bindings.StructsStaker, epoch uint32, blockNumber *big.Int, rogueData types.Rogue) error { + ret := _m.Called(_a0, config, account, staker, epoch, blockNumber, rogueData) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, bindings.StructsStaker, uint32, *big.Int, types.Rogue) error); ok { - r0 = rf(client, config, account, staker, epoch, blockNumber, rogueData) + r0 = rf(_a0, config, account, staker, epoch, blockNumber, rogueData) } else { r0 = ret.Error(0) } @@ -1545,22 +1547,22 @@ func (_m *UtilsCmdInterface) Propose(client *ethclient.Client, config types.Conf return r0 } -// ResetDispute provides a mock function with given fields: client, blockManager, txnOpts, epoch -func (_m *UtilsCmdInterface) ResetDispute(client *ethclient.Client, blockManager *bindings.BlockManager, txnOpts *bind.TransactOpts, epoch uint32) { - _m.Called(client, blockManager, txnOpts, epoch) +// ResetDispute provides a mock function with given fields: _a0, blockManager, txnOpts, epoch +func (_m *UtilsCmdInterface) ResetDispute(_a0 *ethclient.Client, blockManager *bindings.BlockManager, txnOpts *bind.TransactOpts, epoch uint32) { + _m.Called(_a0, blockManager, txnOpts, epoch) } -// ResetUnstakeLock provides a mock function with given fields: client, config, extendLockInput -func (_m *UtilsCmdInterface) ResetUnstakeLock(client *ethclient.Client, config types.Configurations, extendLockInput types.ExtendLockInput) (common.Hash, error) { - ret := _m.Called(client, config, extendLockInput) +// ResetUnstakeLock provides a mock function with given fields: _a0, config, extendLockInput +func (_m *UtilsCmdInterface) ResetUnstakeLock(_a0 *ethclient.Client, config types.Configurations, extendLockInput types.ExtendLockInput) (common.Hash, error) { + ret := _m.Called(_a0, config, extendLockInput) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.ExtendLockInput) (common.Hash, error)); ok { - return rf(client, config, extendLockInput) + return rf(_a0, config, extendLockInput) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.ExtendLockInput) common.Hash); ok { - r0 = rf(client, config, extendLockInput) + r0 = rf(_a0, config, extendLockInput) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1568,7 +1570,7 @@ func (_m *UtilsCmdInterface) ResetUnstakeLock(client *ethclient.Client, config t } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.ExtendLockInput) error); ok { - r1 = rf(client, config, extendLockInput) + r1 = rf(_a0, config, extendLockInput) } else { r1 = ret.Error(1) } @@ -1576,17 +1578,17 @@ func (_m *UtilsCmdInterface) ResetUnstakeLock(client *ethclient.Client, config t return r0, r1 } -// Reveal provides a mock function with given fields: client, config, account, epoch, commitData, signature -func (_m *UtilsCmdInterface) Reveal(client *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, commitData types.CommitData, signature []byte) (common.Hash, error) { - ret := _m.Called(client, config, account, epoch, commitData, signature) +// Reveal provides a mock function with given fields: _a0, config, account, epoch, commitData, signature +func (_m *UtilsCmdInterface) Reveal(_a0 *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, commitData types.CommitData, signature []byte) (common.Hash, error) { + ret := _m.Called(_a0, config, account, epoch, commitData, signature) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, types.CommitData, []byte) (common.Hash, error)); ok { - return rf(client, config, account, epoch, commitData, signature) + return rf(_a0, config, account, epoch, commitData, signature) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.Account, uint32, types.CommitData, []byte) common.Hash); ok { - r0 = rf(client, config, account, epoch, commitData, signature) + r0 = rf(_a0, config, account, epoch, commitData, signature) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1594,7 +1596,7 @@ func (_m *UtilsCmdInterface) Reveal(client *ethclient.Client, config types.Confi } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.Account, uint32, types.CommitData, []byte) error); ok { - r1 = rf(client, config, account, epoch, commitData, signature) + r1 = rf(_a0, config, account, epoch, commitData, signature) } else { r1 = ret.Error(1) } @@ -1616,17 +1618,17 @@ func (_m *UtilsCmdInterface) SetConfig(flagSet *pflag.FlagSet) error { return r0 } -// SetDelegation provides a mock function with given fields: client, config, delegationInput -func (_m *UtilsCmdInterface) SetDelegation(client *ethclient.Client, config types.Configurations, delegationInput types.SetDelegationInput) (common.Hash, error) { - ret := _m.Called(client, config, delegationInput) +// SetDelegation provides a mock function with given fields: _a0, config, delegationInput +func (_m *UtilsCmdInterface) SetDelegation(_a0 *ethclient.Client, config types.Configurations, delegationInput types.SetDelegationInput) (common.Hash, error) { + ret := _m.Called(_a0, config, delegationInput) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.SetDelegationInput) (common.Hash, error)); ok { - return rf(client, config, delegationInput) + return rf(_a0, config, delegationInput) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.SetDelegationInput) common.Hash); ok { - r0 = rf(client, config, delegationInput) + r0 = rf(_a0, config, delegationInput) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1634,7 +1636,7 @@ func (_m *UtilsCmdInterface) SetDelegation(client *ethclient.Client, config type } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.SetDelegationInput) error); ok { - r1 = rf(client, config, delegationInput) + r1 = rf(_a0, config, delegationInput) } else { r1 = ret.Error(1) } @@ -1668,13 +1670,13 @@ func (_m *UtilsCmdInterface) StakeCoins(txnArgs types.TransactionOptions) (commo return r0, r1 } -// StoreBountyId provides a mock function with given fields: client, account -func (_m *UtilsCmdInterface) StoreBountyId(client *ethclient.Client, account types.Account) error { - ret := _m.Called(client, account) +// StoreBountyId provides a mock function with given fields: _a0, account +func (_m *UtilsCmdInterface) StoreBountyId(_a0 *ethclient.Client, account types.Account) error { + ret := _m.Called(_a0, account) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Account) error); ok { - r0 = rf(client, account) + r0 = rf(_a0, account) } else { r0 = ret.Error(0) } @@ -1682,17 +1684,17 @@ func (_m *UtilsCmdInterface) StoreBountyId(client *ethclient.Client, account typ return r0 } -// Transfer provides a mock function with given fields: client, config, transferInput -func (_m *UtilsCmdInterface) Transfer(client *ethclient.Client, config types.Configurations, transferInput types.TransferInput) (common.Hash, error) { - ret := _m.Called(client, config, transferInput) +// Transfer provides a mock function with given fields: _a0, config, transferInput +func (_m *UtilsCmdInterface) Transfer(_a0 *ethclient.Client, config types.Configurations, transferInput types.TransferInput) (common.Hash, error) { + ret := _m.Called(_a0, config, transferInput) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.TransferInput) (common.Hash, error)); ok { - return rf(client, config, transferInput) + return rf(_a0, config, transferInput) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.TransferInput) common.Hash); ok { - r0 = rf(client, config, transferInput) + r0 = rf(_a0, config, transferInput) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1700,7 +1702,7 @@ func (_m *UtilsCmdInterface) Transfer(client *ethclient.Client, config types.Con } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.TransferInput) error); ok { - r1 = rf(client, config, transferInput) + r1 = rf(_a0, config, transferInput) } else { r1 = ret.Error(1) } @@ -1708,17 +1710,17 @@ func (_m *UtilsCmdInterface) Transfer(client *ethclient.Client, config types.Con return r0, r1 } -// UnlockWithdraw provides a mock function with given fields: client, txnOpts, stakerId -func (_m *UtilsCmdInterface) UnlockWithdraw(client *ethclient.Client, txnOpts *bind.TransactOpts, stakerId uint32) (common.Hash, error) { - ret := _m.Called(client, txnOpts, stakerId) +// UnlockWithdraw provides a mock function with given fields: _a0, txnOpts, stakerId +func (_m *UtilsCmdInterface) UnlockWithdraw(_a0 *ethclient.Client, txnOpts *bind.TransactOpts, stakerId uint32) (common.Hash, error) { + ret := _m.Called(_a0, txnOpts, stakerId) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, *bind.TransactOpts, uint32) (common.Hash, error)); ok { - return rf(client, txnOpts, stakerId) + return rf(_a0, txnOpts, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, *bind.TransactOpts, uint32) common.Hash); ok { - r0 = rf(client, txnOpts, stakerId) + r0 = rf(_a0, txnOpts, stakerId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1726,7 +1728,7 @@ func (_m *UtilsCmdInterface) UnlockWithdraw(client *ethclient.Client, txnOpts *b } if rf, ok := ret.Get(1).(func(*ethclient.Client, *bind.TransactOpts, uint32) error); ok { - r1 = rf(client, txnOpts, stakerId) + r1 = rf(_a0, txnOpts, stakerId) } else { r1 = ret.Error(1) } @@ -1734,17 +1736,17 @@ func (_m *UtilsCmdInterface) UnlockWithdraw(client *ethclient.Client, txnOpts *b return r0, r1 } -// Unstake provides a mock function with given fields: config, client, input -func (_m *UtilsCmdInterface) Unstake(config types.Configurations, client *ethclient.Client, input types.UnstakeInput) (common.Hash, error) { - ret := _m.Called(config, client, input) +// Unstake provides a mock function with given fields: config, _a1, input +func (_m *UtilsCmdInterface) Unstake(config types.Configurations, _a1 *ethclient.Client, input types.UnstakeInput) (common.Hash, error) { + ret := _m.Called(config, _a1, input) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(types.Configurations, *ethclient.Client, types.UnstakeInput) (common.Hash, error)); ok { - return rf(config, client, input) + return rf(config, _a1, input) } if rf, ok := ret.Get(0).(func(types.Configurations, *ethclient.Client, types.UnstakeInput) common.Hash); ok { - r0 = rf(config, client, input) + r0 = rf(config, _a1, input) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1752,7 +1754,7 @@ func (_m *UtilsCmdInterface) Unstake(config types.Configurations, client *ethcli } if rf, ok := ret.Get(1).(func(types.Configurations, *ethclient.Client, types.UnstakeInput) error); ok { - r1 = rf(config, client, input) + r1 = rf(config, _a1, input) } else { r1 = ret.Error(1) } @@ -1760,17 +1762,17 @@ func (_m *UtilsCmdInterface) Unstake(config types.Configurations, client *ethcli return r0, r1 } -// UpdateCollection provides a mock function with given fields: client, config, collectionInput, collectionId -func (_m *UtilsCmdInterface) UpdateCollection(client *ethclient.Client, config types.Configurations, collectionInput types.CreateCollectionInput, collectionId uint16) (common.Hash, error) { - ret := _m.Called(client, config, collectionInput, collectionId) +// UpdateCollection provides a mock function with given fields: _a0, config, collectionInput, collectionId +func (_m *UtilsCmdInterface) UpdateCollection(_a0 *ethclient.Client, config types.Configurations, collectionInput types.CreateCollectionInput, collectionId uint16) (common.Hash, error) { + ret := _m.Called(_a0, config, collectionInput, collectionId) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.CreateCollectionInput, uint16) (common.Hash, error)); ok { - return rf(client, config, collectionInput, collectionId) + return rf(_a0, config, collectionInput, collectionId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.CreateCollectionInput, uint16) common.Hash); ok { - r0 = rf(client, config, collectionInput, collectionId) + r0 = rf(_a0, config, collectionInput, collectionId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1778,7 +1780,7 @@ func (_m *UtilsCmdInterface) UpdateCollection(client *ethclient.Client, config t } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.CreateCollectionInput, uint16) error); ok { - r1 = rf(client, config, collectionInput, collectionId) + r1 = rf(_a0, config, collectionInput, collectionId) } else { r1 = ret.Error(1) } @@ -1786,13 +1788,13 @@ func (_m *UtilsCmdInterface) UpdateCollection(client *ethclient.Client, config t return r0, r1 } -// UpdateCommission provides a mock function with given fields: config, client, updateCommissionInput -func (_m *UtilsCmdInterface) UpdateCommission(config types.Configurations, client *ethclient.Client, updateCommissionInput types.UpdateCommissionInput) error { - ret := _m.Called(config, client, updateCommissionInput) +// UpdateCommission provides a mock function with given fields: config, _a1, updateCommissionInput +func (_m *UtilsCmdInterface) UpdateCommission(config types.Configurations, _a1 *ethclient.Client, updateCommissionInput types.UpdateCommissionInput) error { + ret := _m.Called(config, _a1, updateCommissionInput) var r0 error if rf, ok := ret.Get(0).(func(types.Configurations, *ethclient.Client, types.UpdateCommissionInput) error); ok { - r0 = rf(config, client, updateCommissionInput) + r0 = rf(config, _a1, updateCommissionInput) } else { r0 = ret.Error(0) } @@ -1800,17 +1802,17 @@ func (_m *UtilsCmdInterface) UpdateCommission(config types.Configurations, clien return r0 } -// UpdateJob provides a mock function with given fields: client, config, jobInput, jobId -func (_m *UtilsCmdInterface) UpdateJob(client *ethclient.Client, config types.Configurations, jobInput types.CreateJobInput, jobId uint16) (common.Hash, error) { - ret := _m.Called(client, config, jobInput, jobId) +// UpdateJob provides a mock function with given fields: _a0, config, jobInput, jobId +func (_m *UtilsCmdInterface) UpdateJob(_a0 *ethclient.Client, config types.Configurations, jobInput types.CreateJobInput, jobId uint16) (common.Hash, error) { + ret := _m.Called(_a0, config, jobInput, jobId) var r0 common.Hash var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.CreateJobInput, uint16) (common.Hash, error)); ok { - return rf(client, config, jobInput, jobId) + return rf(_a0, config, jobInput, jobId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, types.Configurations, types.CreateJobInput, uint16) common.Hash); ok { - r0 = rf(client, config, jobInput, jobId) + r0 = rf(_a0, config, jobInput, jobId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(common.Hash) @@ -1818,7 +1820,7 @@ func (_m *UtilsCmdInterface) UpdateJob(client *ethclient.Client, config types.Co } if rf, ok := ret.Get(1).(func(*ethclient.Client, types.Configurations, types.CreateJobInput, uint16) error); ok { - r1 = rf(client, config, jobInput, jobId) + r1 = rf(_a0, config, jobInput, jobId) } else { r1 = ret.Error(1) } @@ -1826,13 +1828,13 @@ func (_m *UtilsCmdInterface) UpdateJob(client *ethclient.Client, config types.Co return r0, r1 } -// Vote provides a mock function with given fields: ctx, config, client, rogueData, account, backupNodeActionsToIgnore -func (_m *UtilsCmdInterface) Vote(ctx context.Context, config types.Configurations, client *ethclient.Client, rogueData types.Rogue, account types.Account, backupNodeActionsToIgnore []string) error { - ret := _m.Called(ctx, config, client, rogueData, account, backupNodeActionsToIgnore) +// Vote provides a mock function with given fields: ctx, config, _a2, account, httpClient, rogueData, backupNodeActionsToIgnore +func (_m *UtilsCmdInterface) Vote(ctx context.Context, config types.Configurations, _a2 *ethclient.Client, account types.Account, httpClient *client.HttpClient, rogueData types.Rogue, backupNodeActionsToIgnore []string) error { + ret := _m.Called(ctx, config, _a2, account, httpClient, rogueData, backupNodeActionsToIgnore) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, types.Configurations, *ethclient.Client, types.Rogue, types.Account, []string) error); ok { - r0 = rf(ctx, config, client, rogueData, account, backupNodeActionsToIgnore) + if rf, ok := ret.Get(0).(func(context.Context, types.Configurations, *ethclient.Client, types.Account, *client.HttpClient, types.Rogue, []string) error); ok { + r0 = rf(ctx, config, _a2, account, httpClient, rogueData, backupNodeActionsToIgnore) } else { r0 = ret.Error(0) } @@ -1840,30 +1842,30 @@ func (_m *UtilsCmdInterface) Vote(ctx context.Context, config types.Configuratio return r0 } -// WaitForAppropriateState provides a mock function with given fields: client, action, states -func (_m *UtilsCmdInterface) WaitForAppropriateState(client *ethclient.Client, action string, states ...int) (uint32, error) { +// WaitForAppropriateState provides a mock function with given fields: _a0, action, states +func (_m *UtilsCmdInterface) WaitForAppropriateState(_a0 *ethclient.Client, action string, states ...int) (uint32, error) { _va := make([]interface{}, len(states)) for _i := range states { _va[_i] = states[_i] } var _ca []interface{} - _ca = append(_ca, client, action) + _ca = append(_ca, _a0, action) _ca = append(_ca, _va...) ret := _m.Called(_ca...) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, string, ...int) (uint32, error)); ok { - return rf(client, action, states...) + return rf(_a0, action, states...) } if rf, ok := ret.Get(0).(func(*ethclient.Client, string, ...int) uint32); ok { - r0 = rf(client, action, states...) + r0 = rf(_a0, action, states...) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client, string, ...int) error); ok { - r1 = rf(client, action, states...) + r1 = rf(_a0, action, states...) } else { r1 = ret.Error(1) } @@ -1871,23 +1873,23 @@ func (_m *UtilsCmdInterface) WaitForAppropriateState(client *ethclient.Client, a return r0, r1 } -// WaitIfCommitState provides a mock function with given fields: client, action -func (_m *UtilsCmdInterface) WaitIfCommitState(client *ethclient.Client, action string) (uint32, error) { - ret := _m.Called(client, action) +// WaitIfCommitState provides a mock function with given fields: _a0, action +func (_m *UtilsCmdInterface) WaitIfCommitState(_a0 *ethclient.Client, action string) (uint32, error) { + ret := _m.Called(_a0, action) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, string) (uint32, error)); ok { - return rf(client, action) + return rf(_a0, action) } if rf, ok := ret.Get(0).(func(*ethclient.Client, string) uint32); ok { - r0 = rf(client, action) + r0 = rf(_a0, action) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client, string) error); ok { - r1 = rf(client, action) + r1 = rf(_a0, action) } else { r1 = ret.Error(1) } diff --git a/cmd/vote_test.go b/cmd/vote_test.go index 4dadc4683..f5f30c426 100644 --- a/cmd/vote_test.go +++ b/cmd/vote_test.go @@ -7,6 +7,7 @@ import ( "os" "path" "path/filepath" + clientPkg "razor/client" "razor/core/types" "razor/pkg/bindings" "razor/utils" @@ -135,7 +136,7 @@ func TestExecuteVote(t *testing.T) { flagSetMock.On("GetBoolRogue", mock.AnythingOfType("*pflag.FlagSet")).Return(tt.args.rogueStatus, tt.args.rogueErr) flagSetMock.On("GetStringSliceRogueMode", mock.AnythingOfType("*pflag.FlagSet")).Return(tt.args.rogueMode, tt.args.rogueModeErr) cmdUtilsMock.On("HandleExit").Return() - cmdUtilsMock.On("Vote", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.voteErr) + cmdUtilsMock.On("Vote", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.voteErr) osMock.On("Exit", mock.AnythingOfType("int")).Return() utils := &UtilsStruct{} @@ -501,14 +502,14 @@ func TestInitiateCommit(t *testing.T) { utilsMock.On("GetEpochLastCommitted", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("uint32")).Return(tt.args.lastCommit, tt.args.lastCommitErr) cmdUtilsMock.On("CalculateSecret", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.signature, tt.args.secret, tt.args.secretErr) cmdUtilsMock.On("GetSalt", mock.AnythingOfType("*ethclient.Client"), mock.Anything).Return(tt.args.salt, tt.args.saltErr) - cmdUtilsMock.On("HandleCommitState", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.commitData, tt.args.commitDataErr) + cmdUtilsMock.On("HandleCommitState", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.commitData, tt.args.commitDataErr) pathMock.On("GetDefaultPath").Return(tt.args.path, tt.args.pathErr) cmdUtilsMock.On("Commit", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.commitTxn, tt.args.commitTxnErr) utilsMock.On("WaitForBlockCompletion", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("string")).Return(tt.args.waitForBlockCompletionErr) pathMock.On("GetCommitDataFileName", mock.AnythingOfType("string")).Return(tt.args.fileName, tt.args.fileNameErr) fileUtilsMock.On("SaveDataToCommitJsonFile", mock.Anything, mock.Anything, mock.Anything).Return(tt.args.saveErr) ut := &UtilsStruct{} - if err := ut.InitiateCommit(client, config, account, tt.args.epoch, stakerId, rogueData); (err != nil) != tt.wantErr { + if err := ut.InitiateCommit(client, config, account, tt.args.epoch, stakerId, &clientPkg.HttpClient{}, rogueData); (err != nil) != tt.wantErr { t.Errorf("InitiateCommit() error = %v, wantErr %v", err, tt.wantErr) } }) @@ -1208,7 +1209,7 @@ func TestHandleBlock(t *testing.T) { clientUtilsMock.On("BalanceAtWithRetry", mock.AnythingOfType("*ethclient.Client"), mock.Anything).Return(tt.args.ethBalance, tt.args.ethBalanceErr) utilsMock.On("GetStakerSRZRBalance", mock.Anything, mock.Anything).Return(tt.args.sRZRBalance, tt.args.sRZRBalanceErr) osMock.On("Exit", mock.AnythingOfType("int")).Return() - cmdUtilsMock.On("InitiateCommit", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.initiateCommitErr) + cmdUtilsMock.On("InitiateCommit", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.initiateCommitErr) cmdUtilsMock.On("InitiateReveal", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.initiateRevealErr) cmdUtilsMock.On("InitiatePropose", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.initiateProposeErr) cmdUtilsMock.On("HandleDispute", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.handleDisputeErr) @@ -1220,7 +1221,7 @@ func TestHandleBlock(t *testing.T) { utilsMock.On("WaitTillNextNSecs", mock.AnythingOfType("int32")).Return() lastVerification = tt.args.lastVerification ut := &UtilsStruct{} - ut.HandleBlock(client, account, blockNumber, tt.args.config, rogueData, backupNodeActionsToIgnore) + ut.HandleBlock(client, account, blockNumber, tt.args.config, &clientPkg.HttpClient{}, rogueData, backupNodeActionsToIgnore) }) } } diff --git a/utils/asset_test.go b/utils/asset_test.go index 4df204b48..c23eaafb8 100644 --- a/utils/asset_test.go +++ b/utils/asset_test.go @@ -7,6 +7,7 @@ import ( "math/big" "os" "razor/cache" + clientPkg "razor/client" "razor/core" "razor/core/types" "razor/path" @@ -186,7 +187,7 @@ func TestAggregate(t *testing.T) { utils := StartRazor(optionsPackageStruct) utilsMock.On("GetActiveJob", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("uint16")).Return(tt.args.activeJob, tt.args.activeJobErr) - utilsMock.On("GetDataToCommitFromJobs", mock.Anything, mock.Anything).Return(tt.args.dataToCommit, tt.args.weight, tt.args.dataToCommitErr) + utilsMock.On("GetDataToCommitFromJobs", mock.Anything, mock.Anything, mock.Anything).Return(tt.args.dataToCommit, tt.args.weight, tt.args.dataToCommitErr) utilsMock.On("FetchPreviousValue", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("uint32"), mock.AnythingOfType("uint16")).Return(tt.args.prevCommitmentData, tt.args.prevCommitmentDataErr) pathUtilsMock.On("GetJobFilePath").Return(tt.args.assetFilePath, tt.args.assetFilePathErr) osUtilsMock.On("Stat", mock.Anything).Return(fileInfo, tt.args.statErr) @@ -194,7 +195,7 @@ func TestAggregate(t *testing.T) { ioMock.On("ReadAll", mock.Anything).Return(tt.args.fileData, tt.args.fileDataErr) utilsMock.On("HandleOfficialJobsFromJSONFile", mock.Anything, mock.Anything, mock.Anything).Return(tt.args.overrrideJobs, tt.args.overrideJobIds) - got, err := utils.Aggregate(client, previousEpoch, tt.args.collection, &cache.LocalCache{}) + got, err := utils.Aggregate(client, previousEpoch, tt.args.collection, &cache.LocalCache{}, &clientPkg.HttpClient{}) if (err != nil) != tt.wantErr { t.Errorf("Aggregate() error = %v, wantErr %v", err, tt.wantErr) return @@ -553,6 +554,12 @@ func TestGetAllCollections(t *testing.T) { } func TestGetDataToCommitFromJobs(t *testing.T) { + httpClient := clientPkg.NewHttpClient(types.HttpClientConfig{ + Timeout: 10, + MaxIdleConnections: 2, + MaxIdleConnectionsPerHost: 1, + }) + jobsArray := []bindings.StructsJob{ {Id: 1, SelectorType: 0, Weight: 10, Power: 2, Name: "ethusd_gemini", Selector: "last", @@ -631,7 +638,7 @@ func TestGetDataToCommitFromJobs(t *testing.T) { UtilsInterface = &UtilsStruct{} lc := cache.NewLocalCache(time.Second * 10) - gotDataArray, gotWeightArray := UtilsInterface.GetDataToCommitFromJobs(tt.args.jobs, lc) + gotDataArray, gotWeightArray := UtilsInterface.GetDataToCommitFromJobs(tt.args.jobs, lc, httpClient) if len(gotDataArray) != tt.wantArrayLength || len(gotWeightArray) != tt.wantArrayLength { t.Errorf("GetDataToCommitFromJobs() got = %v, want %v", gotDataArray, tt.wantArrayLength) } @@ -642,6 +649,12 @@ func TestGetDataToCommitFromJobs(t *testing.T) { } func TestGetDataToCommitFromJob(t *testing.T) { + httpClient := clientPkg.NewHttpClient(types.HttpClientConfig{ + Timeout: 10, + MaxIdleConnections: 2, + MaxIdleConnectionsPerHost: 1, + }) + job := bindings.StructsJob{Id: 1, SelectorType: 0, Weight: 100, Power: 2, Name: "ethusd_kraken", Selector: "result.XETHZUSD.c[0]", Url: `{"type": "GET","url": "https://api.kraken.com/0/public/Ticker?pair=ETHUSD","body": {},"header": {}}`, @@ -738,7 +751,7 @@ func TestGetDataToCommitFromJob(t *testing.T) { utils := StartRazor(optionsPackageStruct) lc := cache.NewLocalCache(time.Second * 10) - data, err := utils.GetDataToCommitFromJob(tt.args.job, lc) + data, err := utils.GetDataToCommitFromJob(tt.args.job, lc, httpClient) fmt.Println("JOB returns data: ", data) if (err != nil) != tt.wantErr { t.Errorf("GetDataToCommitFromJob() error = %v, wantErr %v", err, tt.wantErr) @@ -1271,9 +1284,9 @@ func TestGetAggregatedDataOfCollection(t *testing.T) { utils := StartRazor(optionsPackageStruct) utilsMock.On("GetActiveCollection", mock.Anything, mock.Anything).Return(tt.args.activeCollection, tt.args.activeCollectionErr) - utilsMock.On("Aggregate", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.collectionData, tt.args.aggregationErr) + utilsMock.On("Aggregate", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(tt.args.collectionData, tt.args.aggregationErr) - got, err := utils.GetAggregatedDataOfCollection(client, collectionId, epoch, &cache.LocalCache{}) + got, err := utils.GetAggregatedDataOfCollection(client, collectionId, epoch, &cache.LocalCache{}, &clientPkg.HttpClient{}) if (err != nil) != tt.wantErr { t.Errorf("GetAggregatedDataOfCollection() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/utils/mocks/utils.go b/utils/mocks/utils.go index a30978eaf..c37a39562 100644 --- a/utils/mocks/utils.go +++ b/utils/mocks/utils.go @@ -10,6 +10,8 @@ import ( cache "razor/cache" + client "razor/client" + common "github.com/ethereum/go-ethereum/common" ethclient "github.com/ethereum/go-ethereum/ethclient" @@ -40,25 +42,25 @@ func (_m *Utils) AddJobToJSON(fileName string, job *types.StructsJob) error { return r0 } -// Aggregate provides a mock function with given fields: client, previousEpoch, collection, localCache -func (_m *Utils) Aggregate(client *ethclient.Client, previousEpoch uint32, collection bindings.StructsCollection, localCache *cache.LocalCache) (*big.Int, error) { - ret := _m.Called(client, previousEpoch, collection, localCache) +// Aggregate provides a mock function with given fields: _a0, previousEpoch, collection, localCache, httpClient +func (_m *Utils) Aggregate(_a0 *ethclient.Client, previousEpoch uint32, collection bindings.StructsCollection, localCache *cache.LocalCache, httpClient *client.HttpClient) (*big.Int, error) { + ret := _m.Called(_a0, previousEpoch, collection, localCache, httpClient) var r0 *big.Int var r1 error - if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, bindings.StructsCollection, *cache.LocalCache) (*big.Int, error)); ok { - return rf(client, previousEpoch, collection, localCache) + if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, bindings.StructsCollection, *cache.LocalCache, *client.HttpClient) (*big.Int, error)); ok { + return rf(_a0, previousEpoch, collection, localCache, httpClient) } - if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, bindings.StructsCollection, *cache.LocalCache) *big.Int); ok { - r0 = rf(client, previousEpoch, collection, localCache) + if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, bindings.StructsCollection, *cache.LocalCache, *client.HttpClient) *big.Int); ok { + r0 = rf(_a0, previousEpoch, collection, localCache, httpClient) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) } } - if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, bindings.StructsCollection, *cache.LocalCache) error); ok { - r1 = rf(client, previousEpoch, collection, localCache) + if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, bindings.StructsCollection, *cache.LocalCache, *client.HttpClient) error); ok { + r1 = rf(_a0, previousEpoch, collection, localCache, httpClient) } else { r1 = ret.Error(1) } @@ -80,23 +82,23 @@ func (_m *Utils) AssignPassword(flagSet *pflag.FlagSet) string { return r0 } -// AssignStakerId provides a mock function with given fields: flagSet, client, address -func (_m *Utils) AssignStakerId(flagSet *pflag.FlagSet, client *ethclient.Client, address string) (uint32, error) { - ret := _m.Called(flagSet, client, address) +// AssignStakerId provides a mock function with given fields: flagSet, _a1, address +func (_m *Utils) AssignStakerId(flagSet *pflag.FlagSet, _a1 *ethclient.Client, address string) (uint32, error) { + ret := _m.Called(flagSet, _a1, address) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*pflag.FlagSet, *ethclient.Client, string) (uint32, error)); ok { - return rf(flagSet, client, address) + return rf(flagSet, _a1, address) } if rf, ok := ret.Get(0).(func(*pflag.FlagSet, *ethclient.Client, string) uint32); ok { - r0 = rf(flagSet, client, address) + r0 = rf(flagSet, _a1, address) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*pflag.FlagSet, *ethclient.Client, string) error); ok { - r1 = rf(flagSet, client, address) + r1 = rf(flagSet, _a1, address) } else { r1 = ret.Error(1) } @@ -104,13 +106,13 @@ func (_m *Utils) AssignStakerId(flagSet *pflag.FlagSet, client *ethclient.Client return r0, r1 } -// CalculateBlockTime provides a mock function with given fields: client -func (_m *Utils) CalculateBlockTime(client *ethclient.Client) int64 { - ret := _m.Called(client) +// CalculateBlockTime provides a mock function with given fields: _a0 +func (_m *Utils) CalculateBlockTime(_a0 *ethclient.Client) int64 { + ret := _m.Called(_a0) var r0 int64 if rf, ok := ret.Get(0).(func(*ethclient.Client) int64); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(int64) } @@ -150,9 +152,9 @@ func (_m *Utils) CheckAmountAndBalance(amountInWei *big.Int, balance *big.Int) * return r0 } -// CheckEthBalanceIsZero provides a mock function with given fields: client, address -func (_m *Utils) CheckEthBalanceIsZero(client *ethclient.Client, address string) { - _m.Called(client, address) +// CheckEthBalanceIsZero provides a mock function with given fields: _a0, address +func (_m *Utils) CheckEthBalanceIsZero(_a0 *ethclient.Client, address string) { + _m.Called(_a0, address) } // CheckPassword provides a mock function with given fields: address, password @@ -169,13 +171,13 @@ func (_m *Utils) CheckPassword(address string, password string) error { return r0 } -// CheckTransactionReceipt provides a mock function with given fields: client, _txHash -func (_m *Utils) CheckTransactionReceipt(client *ethclient.Client, _txHash string) int { - ret := _m.Called(client, _txHash) +// CheckTransactionReceipt provides a mock function with given fields: _a0, _txHash +func (_m *Utils) CheckTransactionReceipt(_a0 *ethclient.Client, _txHash string) int { + ret := _m.Called(_a0, _txHash) var r0 int if rf, ok := ret.Get(0).(func(*ethclient.Client, string) int); ok { - r0 = rf(client, _txHash) + r0 = rf(_a0, _txHash) } else { r0 = ret.Get(0).(int) } @@ -213,17 +215,17 @@ func (_m *Utils) DeleteJobFromJSON(fileName string, jobId string) error { return r0 } -// EstimateBlockNumberAtEpochBeginning provides a mock function with given fields: client, currentBlockNumber -func (_m *Utils) EstimateBlockNumberAtEpochBeginning(client *ethclient.Client, currentBlockNumber *big.Int) (*big.Int, error) { - ret := _m.Called(client, currentBlockNumber) +// EstimateBlockNumberAtEpochBeginning provides a mock function with given fields: _a0, currentBlockNumber +func (_m *Utils) EstimateBlockNumberAtEpochBeginning(_a0 *ethclient.Client, currentBlockNumber *big.Int) (*big.Int, error) { + ret := _m.Called(_a0, currentBlockNumber) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int) (*big.Int, error)); ok { - return rf(client, currentBlockNumber) + return rf(_a0, currentBlockNumber) } if rf, ok := ret.Get(0).(func(*ethclient.Client, *big.Int) *big.Int); ok { - r0 = rf(client, currentBlockNumber) + r0 = rf(_a0, currentBlockNumber) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -231,7 +233,7 @@ func (_m *Utils) EstimateBlockNumberAtEpochBeginning(client *ethclient.Client, c } if rf, ok := ret.Get(1).(func(*ethclient.Client, *big.Int) error); ok { - r1 = rf(client, currentBlockNumber) + r1 = rf(_a0, currentBlockNumber) } else { r1 = ret.Error(1) } @@ -239,17 +241,17 @@ func (_m *Utils) EstimateBlockNumberAtEpochBeginning(client *ethclient.Client, c return r0, r1 } -// FetchBalance provides a mock function with given fields: client, accountAddress -func (_m *Utils) FetchBalance(client *ethclient.Client, accountAddress string) (*big.Int, error) { - ret := _m.Called(client, accountAddress) +// FetchBalance provides a mock function with given fields: _a0, accountAddress +func (_m *Utils) FetchBalance(_a0 *ethclient.Client, accountAddress string) (*big.Int, error) { + ret := _m.Called(_a0, accountAddress) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, string) (*big.Int, error)); ok { - return rf(client, accountAddress) + return rf(_a0, accountAddress) } if rf, ok := ret.Get(0).(func(*ethclient.Client, string) *big.Int); ok { - r0 = rf(client, accountAddress) + r0 = rf(_a0, accountAddress) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -257,7 +259,7 @@ func (_m *Utils) FetchBalance(client *ethclient.Client, accountAddress string) ( } if rf, ok := ret.Get(1).(func(*ethclient.Client, string) error); ok { - r1 = rf(client, accountAddress) + r1 = rf(_a0, accountAddress) } else { r1 = ret.Error(1) } @@ -265,17 +267,17 @@ func (_m *Utils) FetchBalance(client *ethclient.Client, accountAddress string) ( return r0, r1 } -// FetchPreviousValue provides a mock function with given fields: client, epoch, assetId -func (_m *Utils) FetchPreviousValue(client *ethclient.Client, epoch uint32, assetId uint16) (*big.Int, error) { - ret := _m.Called(client, epoch, assetId) +// FetchPreviousValue provides a mock function with given fields: _a0, epoch, assetId +func (_m *Utils) FetchPreviousValue(_a0 *ethclient.Client, epoch uint32, assetId uint16) (*big.Int, error) { + ret := _m.Called(_a0, epoch, assetId) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint16) (*big.Int, error)); ok { - return rf(client, epoch, assetId) + return rf(_a0, epoch, assetId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint16) *big.Int); ok { - r0 = rf(client, epoch, assetId) + r0 = rf(_a0, epoch, assetId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -283,7 +285,7 @@ func (_m *Utils) FetchPreviousValue(client *ethclient.Client, epoch uint32, asse } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, uint16) error); ok { - r1 = rf(client, epoch, assetId) + r1 = rf(_a0, epoch, assetId) } else { r1 = ret.Error(1) } @@ -291,23 +293,23 @@ func (_m *Utils) FetchPreviousValue(client *ethclient.Client, epoch uint32, asse return r0, r1 } -// GetActiveCollection provides a mock function with given fields: client, collectionId -func (_m *Utils) GetActiveCollection(client *ethclient.Client, collectionId uint16) (bindings.StructsCollection, error) { - ret := _m.Called(client, collectionId) +// GetActiveCollection provides a mock function with given fields: _a0, collectionId +func (_m *Utils) GetActiveCollection(_a0 *ethclient.Client, collectionId uint16) (bindings.StructsCollection, error) { + ret := _m.Called(_a0, collectionId) var r0 bindings.StructsCollection var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) (bindings.StructsCollection, error)); ok { - return rf(client, collectionId) + return rf(_a0, collectionId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) bindings.StructsCollection); ok { - r0 = rf(client, collectionId) + r0 = rf(_a0, collectionId) } else { r0 = ret.Get(0).(bindings.StructsCollection) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16) error); ok { - r1 = rf(client, collectionId) + r1 = rf(_a0, collectionId) } else { r1 = ret.Error(1) } @@ -315,17 +317,17 @@ func (_m *Utils) GetActiveCollection(client *ethclient.Client, collectionId uint return r0, r1 } -// GetActiveCollectionIds provides a mock function with given fields: client -func (_m *Utils) GetActiveCollectionIds(client *ethclient.Client) ([]uint16, error) { - ret := _m.Called(client) +// GetActiveCollectionIds provides a mock function with given fields: _a0 +func (_m *Utils) GetActiveCollectionIds(_a0 *ethclient.Client) ([]uint16, error) { + ret := _m.Called(_a0) var r0 []uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) ([]uint16, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) []uint16); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]uint16) @@ -333,7 +335,7 @@ func (_m *Utils) GetActiveCollectionIds(client *ethclient.Client) ([]uint16, err } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -341,23 +343,23 @@ func (_m *Utils) GetActiveCollectionIds(client *ethclient.Client) ([]uint16, err return r0, r1 } -// GetActiveJob provides a mock function with given fields: client, jobId -func (_m *Utils) GetActiveJob(client *ethclient.Client, jobId uint16) (bindings.StructsJob, error) { - ret := _m.Called(client, jobId) +// GetActiveJob provides a mock function with given fields: _a0, jobId +func (_m *Utils) GetActiveJob(_a0 *ethclient.Client, jobId uint16) (bindings.StructsJob, error) { + ret := _m.Called(_a0, jobId) var r0 bindings.StructsJob var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) (bindings.StructsJob, error)); ok { - return rf(client, jobId) + return rf(_a0, jobId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) bindings.StructsJob); ok { - r0 = rf(client, jobId) + r0 = rf(_a0, jobId) } else { r0 = ret.Get(0).(bindings.StructsJob) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16) error); ok { - r1 = rf(client, jobId) + r1 = rf(_a0, jobId) } else { r1 = ret.Error(1) } @@ -365,25 +367,25 @@ func (_m *Utils) GetActiveJob(client *ethclient.Client, jobId uint16) (bindings. return r0, r1 } -// GetAggregatedDataOfCollection provides a mock function with given fields: client, collectionId, epoch, localCache -func (_m *Utils) GetAggregatedDataOfCollection(client *ethclient.Client, collectionId uint16, epoch uint32, localCache *cache.LocalCache) (*big.Int, error) { - ret := _m.Called(client, collectionId, epoch, localCache) +// GetAggregatedDataOfCollection provides a mock function with given fields: _a0, collectionId, epoch, localCache, httpClient +func (_m *Utils) GetAggregatedDataOfCollection(_a0 *ethclient.Client, collectionId uint16, epoch uint32, localCache *cache.LocalCache, httpClient *client.HttpClient) (*big.Int, error) { + ret := _m.Called(_a0, collectionId, epoch, localCache, httpClient) var r0 *big.Int var r1 error - if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16, uint32, *cache.LocalCache) (*big.Int, error)); ok { - return rf(client, collectionId, epoch, localCache) + if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16, uint32, *cache.LocalCache, *client.HttpClient) (*big.Int, error)); ok { + return rf(_a0, collectionId, epoch, localCache, httpClient) } - if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16, uint32, *cache.LocalCache) *big.Int); ok { - r0 = rf(client, collectionId, epoch, localCache) + if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16, uint32, *cache.LocalCache, *client.HttpClient) *big.Int); ok { + r0 = rf(_a0, collectionId, epoch, localCache, httpClient) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) } } - if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16, uint32, *cache.LocalCache) error); ok { - r1 = rf(client, collectionId, epoch, localCache) + if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16, uint32, *cache.LocalCache, *client.HttpClient) error); ok { + r1 = rf(_a0, collectionId, epoch, localCache, httpClient) } else { r1 = ret.Error(1) } @@ -391,17 +393,17 @@ func (_m *Utils) GetAggregatedDataOfCollection(client *ethclient.Client, collect return r0, r1 } -// GetAllCollections provides a mock function with given fields: client -func (_m *Utils) GetAllCollections(client *ethclient.Client) ([]bindings.StructsCollection, error) { - ret := _m.Called(client) +// GetAllCollections provides a mock function with given fields: _a0 +func (_m *Utils) GetAllCollections(_a0 *ethclient.Client) ([]bindings.StructsCollection, error) { + ret := _m.Called(_a0) var r0 []bindings.StructsCollection var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) ([]bindings.StructsCollection, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) []bindings.StructsCollection); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]bindings.StructsCollection) @@ -409,7 +411,7 @@ func (_m *Utils) GetAllCollections(client *ethclient.Client) ([]bindings.Structs } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -417,18 +419,18 @@ func (_m *Utils) GetAllCollections(client *ethclient.Client) ([]bindings.Structs return r0, r1 } -// GetAssignedCollections provides a mock function with given fields: client, numActiveCollections, seed -func (_m *Utils) GetAssignedCollections(client *ethclient.Client, numActiveCollections uint16, seed []byte) (map[int]bool, []*big.Int, error) { - ret := _m.Called(client, numActiveCollections, seed) +// GetAssignedCollections provides a mock function with given fields: _a0, numActiveCollections, seed +func (_m *Utils) GetAssignedCollections(_a0 *ethclient.Client, numActiveCollections uint16, seed []byte) (map[int]bool, []*big.Int, error) { + ret := _m.Called(_a0, numActiveCollections, seed) var r0 map[int]bool var r1 []*big.Int var r2 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16, []byte) (map[int]bool, []*big.Int, error)); ok { - return rf(client, numActiveCollections, seed) + return rf(_a0, numActiveCollections, seed) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16, []byte) map[int]bool); ok { - r0 = rf(client, numActiveCollections, seed) + r0 = rf(_a0, numActiveCollections, seed) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[int]bool) @@ -436,7 +438,7 @@ func (_m *Utils) GetAssignedCollections(client *ethclient.Client, numActiveColle } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16, []byte) []*big.Int); ok { - r1 = rf(client, numActiveCollections, seed) + r1 = rf(_a0, numActiveCollections, seed) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]*big.Int) @@ -444,7 +446,7 @@ func (_m *Utils) GetAssignedCollections(client *ethclient.Client, numActiveColle } if rf, ok := ret.Get(2).(func(*ethclient.Client, uint16, []byte) error); ok { - r2 = rf(client, numActiveCollections, seed) + r2 = rf(_a0, numActiveCollections, seed) } else { r2 = ret.Error(2) } @@ -452,23 +454,23 @@ func (_m *Utils) GetAssignedCollections(client *ethclient.Client, numActiveColle return r0, r1, r2 } -// GetBlock provides a mock function with given fields: client, epoch -func (_m *Utils) GetBlock(client *ethclient.Client, epoch uint32) (bindings.StructsBlock, error) { - ret := _m.Called(client, epoch) +// GetBlock provides a mock function with given fields: _a0, epoch +func (_m *Utils) GetBlock(_a0 *ethclient.Client, epoch uint32) (bindings.StructsBlock, error) { + ret := _m.Called(_a0, epoch) var r0 bindings.StructsBlock var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) (bindings.StructsBlock, error)); ok { - return rf(client, epoch) + return rf(_a0, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) bindings.StructsBlock); ok { - r0 = rf(client, epoch) + r0 = rf(_a0, epoch) } else { r0 = ret.Get(0).(bindings.StructsBlock) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, epoch) + r1 = rf(_a0, epoch) } else { r1 = ret.Error(1) } @@ -476,23 +478,23 @@ func (_m *Utils) GetBlock(client *ethclient.Client, epoch uint32) (bindings.Stru return r0, r1 } -// GetBlockIndexToBeConfirmed provides a mock function with given fields: client -func (_m *Utils) GetBlockIndexToBeConfirmed(client *ethclient.Client) (int8, error) { - ret := _m.Called(client) +// GetBlockIndexToBeConfirmed provides a mock function with given fields: _a0 +func (_m *Utils) GetBlockIndexToBeConfirmed(_a0 *ethclient.Client) (int8, error) { + ret := _m.Called(_a0) var r0 int8 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (int8, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) int8); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(int8) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -500,13 +502,13 @@ func (_m *Utils) GetBlockIndexToBeConfirmed(client *ethclient.Client) (int8, err return r0, r1 } -// GetBlockManager provides a mock function with given fields: client -func (_m *Utils) GetBlockManager(client *ethclient.Client) *bindings.BlockManager { - ret := _m.Called(client) +// GetBlockManager provides a mock function with given fields: _a0 +func (_m *Utils) GetBlockManager(_a0 *ethclient.Client) *bindings.BlockManager { + ret := _m.Called(_a0) var r0 *bindings.BlockManager if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.BlockManager); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.BlockManager) @@ -516,17 +518,17 @@ func (_m *Utils) GetBlockManager(client *ethclient.Client) *bindings.BlockManage return r0 } -// GetBlockManagerWithOpts provides a mock function with given fields: client -func (_m *Utils) GetBlockManagerWithOpts(client *ethclient.Client) (*bindings.BlockManager, bind.CallOpts) { - ret := _m.Called(client) +// GetBlockManagerWithOpts provides a mock function with given fields: _a0 +func (_m *Utils) GetBlockManagerWithOpts(_a0 *ethclient.Client) (*bindings.BlockManager, bind.CallOpts) { + ret := _m.Called(_a0) var r0 *bindings.BlockManager var r1 bind.CallOpts if rf, ok := ret.Get(0).(func(*ethclient.Client) (*bindings.BlockManager, bind.CallOpts)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.BlockManager); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.BlockManager) @@ -534,7 +536,7 @@ func (_m *Utils) GetBlockManagerWithOpts(client *ethclient.Client) (*bindings.Bl } if rf, ok := ret.Get(1).(func(*ethclient.Client) bind.CallOpts); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Get(1).(bind.CallOpts) } @@ -542,23 +544,23 @@ func (_m *Utils) GetBlockManagerWithOpts(client *ethclient.Client) (*bindings.Bl return r0, r1 } -// GetBufferedState provides a mock function with given fields: client, buffer -func (_m *Utils) GetBufferedState(client *ethclient.Client, buffer int32) (int64, error) { - ret := _m.Called(client, buffer) +// GetBufferedState provides a mock function with given fields: _a0, buffer +func (_m *Utils) GetBufferedState(_a0 *ethclient.Client, buffer int32) (int64, error) { + ret := _m.Called(_a0, buffer) var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, int32) (int64, error)); ok { - return rf(client, buffer) + return rf(_a0, buffer) } if rf, ok := ret.Get(0).(func(*ethclient.Client, int32) int64); ok { - r0 = rf(client, buffer) + r0 = rf(_a0, buffer) } else { r0 = ret.Get(0).(int64) } if rf, ok := ret.Get(1).(func(*ethclient.Client, int32) error); ok { - r1 = rf(client, buffer) + r1 = rf(_a0, buffer) } else { r1 = ret.Error(1) } @@ -566,23 +568,23 @@ func (_m *Utils) GetBufferedState(client *ethclient.Client, buffer int32) (int64 return r0, r1 } -// GetCollection provides a mock function with given fields: client, collectionId -func (_m *Utils) GetCollection(client *ethclient.Client, collectionId uint16) (bindings.StructsCollection, error) { - ret := _m.Called(client, collectionId) +// GetCollection provides a mock function with given fields: _a0, collectionId +func (_m *Utils) GetCollection(_a0 *ethclient.Client, collectionId uint16) (bindings.StructsCollection, error) { + ret := _m.Called(_a0, collectionId) var r0 bindings.StructsCollection var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) (bindings.StructsCollection, error)); ok { - return rf(client, collectionId) + return rf(_a0, collectionId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) bindings.StructsCollection); ok { - r0 = rf(client, collectionId) + r0 = rf(_a0, collectionId) } else { r0 = ret.Get(0).(bindings.StructsCollection) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16) error); ok { - r1 = rf(client, collectionId) + r1 = rf(_a0, collectionId) } else { r1 = ret.Error(1) } @@ -590,23 +592,23 @@ func (_m *Utils) GetCollection(client *ethclient.Client, collectionId uint16) (b return r0, r1 } -// GetCollectionIdFromIndex provides a mock function with given fields: client, medianIndex -func (_m *Utils) GetCollectionIdFromIndex(client *ethclient.Client, medianIndex uint16) (uint16, error) { - ret := _m.Called(client, medianIndex) +// GetCollectionIdFromIndex provides a mock function with given fields: _a0, medianIndex +func (_m *Utils) GetCollectionIdFromIndex(_a0 *ethclient.Client, medianIndex uint16) (uint16, error) { + ret := _m.Called(_a0, medianIndex) var r0 uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) (uint16, error)); ok { - return rf(client, medianIndex) + return rf(_a0, medianIndex) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) uint16); ok { - r0 = rf(client, medianIndex) + r0 = rf(_a0, medianIndex) } else { r0 = ret.Get(0).(uint16) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16) error); ok { - r1 = rf(client, medianIndex) + r1 = rf(_a0, medianIndex) } else { r1 = ret.Error(1) } @@ -614,23 +616,23 @@ func (_m *Utils) GetCollectionIdFromIndex(client *ethclient.Client, medianIndex return r0, r1 } -// GetCollectionIdFromLeafId provides a mock function with given fields: client, leafId -func (_m *Utils) GetCollectionIdFromLeafId(client *ethclient.Client, leafId uint16) (uint16, error) { - ret := _m.Called(client, leafId) +// GetCollectionIdFromLeafId provides a mock function with given fields: _a0, leafId +func (_m *Utils) GetCollectionIdFromLeafId(_a0 *ethclient.Client, leafId uint16) (uint16, error) { + ret := _m.Called(_a0, leafId) var r0 uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) (uint16, error)); ok { - return rf(client, leafId) + return rf(_a0, leafId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) uint16); ok { - r0 = rf(client, leafId) + r0 = rf(_a0, leafId) } else { r0 = ret.Get(0).(uint16) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16) error); ok { - r1 = rf(client, leafId) + r1 = rf(_a0, leafId) } else { r1 = ret.Error(1) } @@ -638,13 +640,13 @@ func (_m *Utils) GetCollectionIdFromLeafId(client *ethclient.Client, leafId uint return r0, r1 } -// GetCollectionManager provides a mock function with given fields: client -func (_m *Utils) GetCollectionManager(client *ethclient.Client) *bindings.CollectionManager { - ret := _m.Called(client) +// GetCollectionManager provides a mock function with given fields: _a0 +func (_m *Utils) GetCollectionManager(_a0 *ethclient.Client) *bindings.CollectionManager { + ret := _m.Called(_a0) var r0 *bindings.CollectionManager if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.CollectionManager); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.CollectionManager) @@ -654,17 +656,17 @@ func (_m *Utils) GetCollectionManager(client *ethclient.Client) *bindings.Collec return r0 } -// GetCollectionManagerWithOpts provides a mock function with given fields: client -func (_m *Utils) GetCollectionManagerWithOpts(client *ethclient.Client) (*bindings.CollectionManager, bind.CallOpts) { - ret := _m.Called(client) +// GetCollectionManagerWithOpts provides a mock function with given fields: _a0 +func (_m *Utils) GetCollectionManagerWithOpts(_a0 *ethclient.Client) (*bindings.CollectionManager, bind.CallOpts) { + ret := _m.Called(_a0) var r0 *bindings.CollectionManager var r1 bind.CallOpts if rf, ok := ret.Get(0).(func(*ethclient.Client) (*bindings.CollectionManager, bind.CallOpts)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.CollectionManager); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.CollectionManager) @@ -672,7 +674,7 @@ func (_m *Utils) GetCollectionManagerWithOpts(client *ethclient.Client) (*bindin } if rf, ok := ret.Get(1).(func(*ethclient.Client) bind.CallOpts); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Get(1).(bind.CallOpts) } @@ -680,23 +682,23 @@ func (_m *Utils) GetCollectionManagerWithOpts(client *ethclient.Client) (*bindin return r0, r1 } -// GetCommitment provides a mock function with given fields: client, address -func (_m *Utils) GetCommitment(client *ethclient.Client, address string) (types.Commitment, error) { - ret := _m.Called(client, address) +// GetCommitment provides a mock function with given fields: _a0, address +func (_m *Utils) GetCommitment(_a0 *ethclient.Client, address string) (types.Commitment, error) { + ret := _m.Called(_a0, address) var r0 types.Commitment var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, string) (types.Commitment, error)); ok { - return rf(client, address) + return rf(_a0, address) } if rf, ok := ret.Get(0).(func(*ethclient.Client, string) types.Commitment); ok { - r0 = rf(client, address) + r0 = rf(_a0, address) } else { r0 = ret.Get(0).(types.Commitment) } if rf, ok := ret.Get(1).(func(*ethclient.Client, string) error); ok { - r1 = rf(client, address) + r1 = rf(_a0, address) } else { r1 = ret.Error(1) } @@ -704,25 +706,25 @@ func (_m *Utils) GetCommitment(client *ethclient.Client, address string) (types. return r0, r1 } -// GetDataToCommitFromJob provides a mock function with given fields: job, localCache -func (_m *Utils) GetDataToCommitFromJob(job bindings.StructsJob, localCache *cache.LocalCache) (*big.Int, error) { - ret := _m.Called(job, localCache) +// GetDataToCommitFromJob provides a mock function with given fields: job, localCache, httpClient +func (_m *Utils) GetDataToCommitFromJob(job bindings.StructsJob, localCache *cache.LocalCache, httpClient *client.HttpClient) (*big.Int, error) { + ret := _m.Called(job, localCache, httpClient) var r0 *big.Int var r1 error - if rf, ok := ret.Get(0).(func(bindings.StructsJob, *cache.LocalCache) (*big.Int, error)); ok { - return rf(job, localCache) + if rf, ok := ret.Get(0).(func(bindings.StructsJob, *cache.LocalCache, *client.HttpClient) (*big.Int, error)); ok { + return rf(job, localCache, httpClient) } - if rf, ok := ret.Get(0).(func(bindings.StructsJob, *cache.LocalCache) *big.Int); ok { - r0 = rf(job, localCache) + if rf, ok := ret.Get(0).(func(bindings.StructsJob, *cache.LocalCache, *client.HttpClient) *big.Int); ok { + r0 = rf(job, localCache, httpClient) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) } } - if rf, ok := ret.Get(1).(func(bindings.StructsJob, *cache.LocalCache) error); ok { - r1 = rf(job, localCache) + if rf, ok := ret.Get(1).(func(bindings.StructsJob, *cache.LocalCache, *client.HttpClient) error); ok { + r1 = rf(job, localCache, httpClient) } else { r1 = ret.Error(1) } @@ -730,25 +732,25 @@ func (_m *Utils) GetDataToCommitFromJob(job bindings.StructsJob, localCache *cac return r0, r1 } -// GetDataToCommitFromJobs provides a mock function with given fields: jobs, localCache -func (_m *Utils) GetDataToCommitFromJobs(jobs []bindings.StructsJob, localCache *cache.LocalCache) ([]*big.Int, []uint8) { - ret := _m.Called(jobs, localCache) +// GetDataToCommitFromJobs provides a mock function with given fields: jobs, localCache, httpClient +func (_m *Utils) GetDataToCommitFromJobs(jobs []bindings.StructsJob, localCache *cache.LocalCache, httpClient *client.HttpClient) ([]*big.Int, []uint8) { + ret := _m.Called(jobs, localCache, httpClient) var r0 []*big.Int var r1 []uint8 - if rf, ok := ret.Get(0).(func([]bindings.StructsJob, *cache.LocalCache) ([]*big.Int, []uint8)); ok { - return rf(jobs, localCache) + if rf, ok := ret.Get(0).(func([]bindings.StructsJob, *cache.LocalCache, *client.HttpClient) ([]*big.Int, []uint8)); ok { + return rf(jobs, localCache, httpClient) } - if rf, ok := ret.Get(0).(func([]bindings.StructsJob, *cache.LocalCache) []*big.Int); ok { - r0 = rf(jobs, localCache) + if rf, ok := ret.Get(0).(func([]bindings.StructsJob, *cache.LocalCache, *client.HttpClient) []*big.Int); ok { + r0 = rf(jobs, localCache, httpClient) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*big.Int) } } - if rf, ok := ret.Get(1).(func([]bindings.StructsJob, *cache.LocalCache) []uint8); ok { - r1 = rf(jobs, localCache) + if rf, ok := ret.Get(1).(func([]bindings.StructsJob, *cache.LocalCache, *client.HttpClient) []uint8); ok { + r1 = rf(jobs, localCache, httpClient) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]uint8) @@ -758,23 +760,23 @@ func (_m *Utils) GetDataToCommitFromJobs(jobs []bindings.StructsJob, localCache return r0, r1 } -// GetEpoch provides a mock function with given fields: client -func (_m *Utils) GetEpoch(client *ethclient.Client) (uint32, error) { - ret := _m.Called(client) +// GetEpoch provides a mock function with given fields: _a0 +func (_m *Utils) GetEpoch(_a0 *ethclient.Client) (uint32, error) { + ret := _m.Called(_a0) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint32, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint32); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -782,23 +784,23 @@ func (_m *Utils) GetEpoch(client *ethclient.Client) (uint32, error) { return r0, r1 } -// GetEpochLastCommitted provides a mock function with given fields: client, stakerId -func (_m *Utils) GetEpochLastCommitted(client *ethclient.Client, stakerId uint32) (uint32, error) { - ret := _m.Called(client, stakerId) +// GetEpochLastCommitted provides a mock function with given fields: _a0, stakerId +func (_m *Utils) GetEpochLastCommitted(_a0 *ethclient.Client, stakerId uint32) (uint32, error) { + ret := _m.Called(_a0, stakerId) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) (uint32, error)); ok { - return rf(client, stakerId) + return rf(_a0, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) uint32); ok { - r0 = rf(client, stakerId) + r0 = rf(_a0, stakerId) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, stakerId) + r1 = rf(_a0, stakerId) } else { r1 = ret.Error(1) } @@ -806,23 +808,23 @@ func (_m *Utils) GetEpochLastCommitted(client *ethclient.Client, stakerId uint32 return r0, r1 } -// GetEpochLastProposed provides a mock function with given fields: client, stakerId -func (_m *Utils) GetEpochLastProposed(client *ethclient.Client, stakerId uint32) (uint32, error) { - ret := _m.Called(client, stakerId) +// GetEpochLastProposed provides a mock function with given fields: _a0, stakerId +func (_m *Utils) GetEpochLastProposed(_a0 *ethclient.Client, stakerId uint32) (uint32, error) { + ret := _m.Called(_a0, stakerId) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) (uint32, error)); ok { - return rf(client, stakerId) + return rf(_a0, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) uint32); ok { - r0 = rf(client, stakerId) + r0 = rf(_a0, stakerId) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, stakerId) + r1 = rf(_a0, stakerId) } else { r1 = ret.Error(1) } @@ -830,23 +832,23 @@ func (_m *Utils) GetEpochLastProposed(client *ethclient.Client, stakerId uint32) return r0, r1 } -// GetEpochLastRevealed provides a mock function with given fields: client, stakerId -func (_m *Utils) GetEpochLastRevealed(client *ethclient.Client, stakerId uint32) (uint32, error) { - ret := _m.Called(client, stakerId) +// GetEpochLastRevealed provides a mock function with given fields: _a0, stakerId +func (_m *Utils) GetEpochLastRevealed(_a0 *ethclient.Client, stakerId uint32) (uint32, error) { + ret := _m.Called(_a0, stakerId) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) (uint32, error)); ok { - return rf(client, stakerId) + return rf(_a0, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) uint32); ok { - r0 = rf(client, stakerId) + r0 = rf(_a0, stakerId) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, stakerId) + r1 = rf(_a0, stakerId) } else { r1 = ret.Error(1) } @@ -854,23 +856,23 @@ func (_m *Utils) GetEpochLastRevealed(client *ethclient.Client, stakerId uint32) return r0, r1 } -// GetEpochLimitForUpdateCommission provides a mock function with given fields: client -func (_m *Utils) GetEpochLimitForUpdateCommission(client *ethclient.Client) (uint16, error) { - ret := _m.Called(client) +// GetEpochLimitForUpdateCommission provides a mock function with given fields: _a0 +func (_m *Utils) GetEpochLimitForUpdateCommission(_a0 *ethclient.Client) (uint16, error) { + ret := _m.Called(_a0) var r0 uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint16, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint16); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint16) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -878,17 +880,17 @@ func (_m *Utils) GetEpochLimitForUpdateCommission(client *ethclient.Client) (uin return r0, r1 } -// GetInfluenceSnapshot provides a mock function with given fields: client, stakerId, epoch -func (_m *Utils) GetInfluenceSnapshot(client *ethclient.Client, stakerId uint32, epoch uint32) (*big.Int, error) { - ret := _m.Called(client, stakerId, epoch) +// GetInfluenceSnapshot provides a mock function with given fields: _a0, stakerId, epoch +func (_m *Utils) GetInfluenceSnapshot(_a0 *ethclient.Client, stakerId uint32, epoch uint32) (*big.Int, error) { + ret := _m.Called(_a0, stakerId, epoch) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint32) (*big.Int, error)); ok { - return rf(client, stakerId, epoch) + return rf(_a0, stakerId, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint32) *big.Int); ok { - r0 = rf(client, stakerId, epoch) + r0 = rf(_a0, stakerId, epoch) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -896,7 +898,7 @@ func (_m *Utils) GetInfluenceSnapshot(client *ethclient.Client, stakerId uint32, } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, uint32) error); ok { - r1 = rf(client, stakerId, epoch) + r1 = rf(_a0, stakerId, epoch) } else { r1 = ret.Error(1) } @@ -904,17 +906,17 @@ func (_m *Utils) GetInfluenceSnapshot(client *ethclient.Client, stakerId uint32, return r0, r1 } -// GetJobs provides a mock function with given fields: client -func (_m *Utils) GetJobs(client *ethclient.Client) ([]bindings.StructsJob, error) { - ret := _m.Called(client) +// GetJobs provides a mock function with given fields: _a0 +func (_m *Utils) GetJobs(_a0 *ethclient.Client) ([]bindings.StructsJob, error) { + ret := _m.Called(_a0) var r0 []bindings.StructsJob var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) ([]bindings.StructsJob, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) []bindings.StructsJob); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]bindings.StructsJob) @@ -922,7 +924,7 @@ func (_m *Utils) GetJobs(client *ethclient.Client) ([]bindings.StructsJob, error } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -930,23 +932,23 @@ func (_m *Utils) GetJobs(client *ethclient.Client) ([]bindings.StructsJob, error return r0, r1 } -// GetLeafIdOfACollection provides a mock function with given fields: client, collectionId -func (_m *Utils) GetLeafIdOfACollection(client *ethclient.Client, collectionId uint16) (uint16, error) { - ret := _m.Called(client, collectionId) +// GetLeafIdOfACollection provides a mock function with given fields: _a0, collectionId +func (_m *Utils) GetLeafIdOfACollection(_a0 *ethclient.Client, collectionId uint16) (uint16, error) { + ret := _m.Called(_a0, collectionId) var r0 uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) (uint16, error)); ok { - return rf(client, collectionId) + return rf(_a0, collectionId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint16) uint16); ok { - r0 = rf(client, collectionId) + r0 = rf(_a0, collectionId) } else { r0 = ret.Get(0).(uint16) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint16) error); ok { - r1 = rf(client, collectionId) + r1 = rf(_a0, collectionId) } else { r1 = ret.Error(1) } @@ -954,23 +956,23 @@ func (_m *Utils) GetLeafIdOfACollection(client *ethclient.Client, collectionId u return r0, r1 } -// GetLock provides a mock function with given fields: client, address, stakerId, lockType -func (_m *Utils) GetLock(client *ethclient.Client, address string, stakerId uint32, lockType uint8) (types.Locks, error) { - ret := _m.Called(client, address, stakerId, lockType) +// GetLock provides a mock function with given fields: _a0, address, stakerId, lockType +func (_m *Utils) GetLock(_a0 *ethclient.Client, address string, stakerId uint32, lockType uint8) (types.Locks, error) { + ret := _m.Called(_a0, address, stakerId, lockType) var r0 types.Locks var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, string, uint32, uint8) (types.Locks, error)); ok { - return rf(client, address, stakerId, lockType) + return rf(_a0, address, stakerId, lockType) } if rf, ok := ret.Get(0).(func(*ethclient.Client, string, uint32, uint8) types.Locks); ok { - r0 = rf(client, address, stakerId, lockType) + r0 = rf(_a0, address, stakerId, lockType) } else { r0 = ret.Get(0).(types.Locks) } if rf, ok := ret.Get(1).(func(*ethclient.Client, string, uint32, uint8) error); ok { - r1 = rf(client, address, stakerId, lockType) + r1 = rf(_a0, address, stakerId, lockType) } else { r1 = ret.Error(1) } @@ -978,23 +980,23 @@ func (_m *Utils) GetLock(client *ethclient.Client, address string, stakerId uint return r0, r1 } -// GetMaxAltBlocks provides a mock function with given fields: client -func (_m *Utils) GetMaxAltBlocks(client *ethclient.Client) (uint8, error) { - ret := _m.Called(client) +// GetMaxAltBlocks provides a mock function with given fields: _a0 +func (_m *Utils) GetMaxAltBlocks(_a0 *ethclient.Client) (uint8, error) { + ret := _m.Called(_a0) var r0 uint8 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint8, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint8); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint8) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1002,23 +1004,23 @@ func (_m *Utils) GetMaxAltBlocks(client *ethclient.Client) (uint8, error) { return r0, r1 } -// GetMaxCommission provides a mock function with given fields: client -func (_m *Utils) GetMaxCommission(client *ethclient.Client) (uint8, error) { - ret := _m.Called(client) +// GetMaxCommission provides a mock function with given fields: _a0 +func (_m *Utils) GetMaxCommission(_a0 *ethclient.Client) (uint8, error) { + ret := _m.Called(_a0) var r0 uint8 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint8, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint8); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint8) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1026,17 +1028,17 @@ func (_m *Utils) GetMaxCommission(client *ethclient.Client) (uint8, error) { return r0, r1 } -// GetMinSafeRazor provides a mock function with given fields: client -func (_m *Utils) GetMinSafeRazor(client *ethclient.Client) (*big.Int, error) { - ret := _m.Called(client) +// GetMinSafeRazor provides a mock function with given fields: _a0 +func (_m *Utils) GetMinSafeRazor(_a0 *ethclient.Client) (*big.Int, error) { + ret := _m.Called(_a0) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (*big.Int, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) *big.Int); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -1044,7 +1046,7 @@ func (_m *Utils) GetMinSafeRazor(client *ethclient.Client) (*big.Int, error) { } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1052,17 +1054,17 @@ func (_m *Utils) GetMinSafeRazor(client *ethclient.Client) (*big.Int, error) { return r0, r1 } -// GetMinStakeAmount provides a mock function with given fields: client -func (_m *Utils) GetMinStakeAmount(client *ethclient.Client) (*big.Int, error) { - ret := _m.Called(client) +// GetMinStakeAmount provides a mock function with given fields: _a0 +func (_m *Utils) GetMinStakeAmount(_a0 *ethclient.Client) (*big.Int, error) { + ret := _m.Called(_a0) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (*big.Int, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) *big.Int); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -1070,7 +1072,7 @@ func (_m *Utils) GetMinStakeAmount(client *ethclient.Client) (*big.Int, error) { } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1078,23 +1080,23 @@ func (_m *Utils) GetMinStakeAmount(client *ethclient.Client) (*big.Int, error) { return r0, r1 } -// GetNumActiveCollections provides a mock function with given fields: client -func (_m *Utils) GetNumActiveCollections(client *ethclient.Client) (uint16, error) { - ret := _m.Called(client) +// GetNumActiveCollections provides a mock function with given fields: _a0 +func (_m *Utils) GetNumActiveCollections(_a0 *ethclient.Client) (uint16, error) { + ret := _m.Called(_a0) var r0 uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint16, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint16); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint16) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1102,23 +1104,23 @@ func (_m *Utils) GetNumActiveCollections(client *ethclient.Client) (uint16, erro return r0, r1 } -// GetNumCollections provides a mock function with given fields: client -func (_m *Utils) GetNumCollections(client *ethclient.Client) (uint16, error) { - ret := _m.Called(client) +// GetNumCollections provides a mock function with given fields: _a0 +func (_m *Utils) GetNumCollections(_a0 *ethclient.Client) (uint16, error) { + ret := _m.Called(_a0) var r0 uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint16, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint16); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint16) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1126,23 +1128,23 @@ func (_m *Utils) GetNumCollections(client *ethclient.Client) (uint16, error) { return r0, r1 } -// GetNumberOfProposedBlocks provides a mock function with given fields: client, epoch -func (_m *Utils) GetNumberOfProposedBlocks(client *ethclient.Client, epoch uint32) (uint8, error) { - ret := _m.Called(client, epoch) +// GetNumberOfProposedBlocks provides a mock function with given fields: _a0, epoch +func (_m *Utils) GetNumberOfProposedBlocks(_a0 *ethclient.Client, epoch uint32) (uint8, error) { + ret := _m.Called(_a0, epoch) var r0 uint8 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) (uint8, error)); ok { - return rf(client, epoch) + return rf(_a0, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) uint8); ok { - r0 = rf(client, epoch) + r0 = rf(_a0, epoch) } else { r0 = ret.Get(0).(uint8) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, epoch) + r1 = rf(_a0, epoch) } else { r1 = ret.Error(1) } @@ -1150,23 +1152,23 @@ func (_m *Utils) GetNumberOfProposedBlocks(client *ethclient.Client, epoch uint3 return r0, r1 } -// GetNumberOfStakers provides a mock function with given fields: client -func (_m *Utils) GetNumberOfStakers(client *ethclient.Client) (uint32, error) { - ret := _m.Called(client) +// GetNumberOfStakers provides a mock function with given fields: _a0 +func (_m *Utils) GetNumberOfStakers(_a0 *ethclient.Client) (uint32, error) { + ret := _m.Called(_a0) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint32, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint32); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1188,23 +1190,23 @@ func (_m *Utils) GetOptions() bind.CallOpts { return r0 } -// GetProposedBlock provides a mock function with given fields: client, epoch, proposedBlockId -func (_m *Utils) GetProposedBlock(client *ethclient.Client, epoch uint32, proposedBlockId uint32) (bindings.StructsBlock, error) { - ret := _m.Called(client, epoch, proposedBlockId) +// GetProposedBlock provides a mock function with given fields: _a0, epoch, proposedBlockId +func (_m *Utils) GetProposedBlock(_a0 *ethclient.Client, epoch uint32, proposedBlockId uint32) (bindings.StructsBlock, error) { + ret := _m.Called(_a0, epoch, proposedBlockId) var r0 bindings.StructsBlock var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint32) (bindings.StructsBlock, error)); ok { - return rf(client, epoch, proposedBlockId) + return rf(_a0, epoch, proposedBlockId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint32) bindings.StructsBlock); ok { - r0 = rf(client, epoch, proposedBlockId) + r0 = rf(_a0, epoch, proposedBlockId) } else { r0 = ret.Get(0).(bindings.StructsBlock) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, uint32) error); ok { - r1 = rf(client, epoch, proposedBlockId) + r1 = rf(_a0, epoch, proposedBlockId) } else { r1 = ret.Error(1) } @@ -1212,23 +1214,23 @@ func (_m *Utils) GetProposedBlock(client *ethclient.Client, epoch uint32, propos return r0, r1 } -// GetRemainingTimeOfCurrentState provides a mock function with given fields: client, bufferPercent -func (_m *Utils) GetRemainingTimeOfCurrentState(client *ethclient.Client, bufferPercent int32) (int64, error) { - ret := _m.Called(client, bufferPercent) +// GetRemainingTimeOfCurrentState provides a mock function with given fields: _a0, bufferPercent +func (_m *Utils) GetRemainingTimeOfCurrentState(_a0 *ethclient.Client, bufferPercent int32) (int64, error) { + ret := _m.Called(_a0, bufferPercent) var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, int32) (int64, error)); ok { - return rf(client, bufferPercent) + return rf(_a0, bufferPercent) } if rf, ok := ret.Get(0).(func(*ethclient.Client, int32) int64); ok { - r0 = rf(client, bufferPercent) + r0 = rf(_a0, bufferPercent) } else { r0 = ret.Get(0).(int64) } if rf, ok := ret.Get(1).(func(*ethclient.Client, int32) error); ok { - r1 = rf(client, bufferPercent) + r1 = rf(_a0, bufferPercent) } else { r1 = ret.Error(1) } @@ -1252,23 +1254,23 @@ func (_m *Utils) GetRogueRandomValue(value int) *big.Int { return r0 } -// GetSortedProposedBlockId provides a mock function with given fields: client, epoch, index -func (_m *Utils) GetSortedProposedBlockId(client *ethclient.Client, epoch uint32, index *big.Int) (uint32, error) { - ret := _m.Called(client, epoch, index) +// GetSortedProposedBlockId provides a mock function with given fields: _a0, epoch, index +func (_m *Utils) GetSortedProposedBlockId(_a0 *ethclient.Client, epoch uint32, index *big.Int) (uint32, error) { + ret := _m.Called(_a0, epoch, index) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, *big.Int) (uint32, error)); ok { - return rf(client, epoch, index) + return rf(_a0, epoch, index) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, *big.Int) uint32); ok { - r0 = rf(client, epoch, index) + r0 = rf(_a0, epoch, index) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, *big.Int) error); ok { - r1 = rf(client, epoch, index) + r1 = rf(_a0, epoch, index) } else { r1 = ret.Error(1) } @@ -1276,17 +1278,17 @@ func (_m *Utils) GetSortedProposedBlockId(client *ethclient.Client, epoch uint32 return r0, r1 } -// GetSortedProposedBlockIds provides a mock function with given fields: client, epoch -func (_m *Utils) GetSortedProposedBlockIds(client *ethclient.Client, epoch uint32) ([]uint32, error) { - ret := _m.Called(client, epoch) +// GetSortedProposedBlockIds provides a mock function with given fields: _a0, epoch +func (_m *Utils) GetSortedProposedBlockIds(_a0 *ethclient.Client, epoch uint32) ([]uint32, error) { + ret := _m.Called(_a0, epoch) var r0 []uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) ([]uint32, error)); ok { - return rf(client, epoch) + return rf(_a0, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) []uint32); ok { - r0 = rf(client, epoch) + r0 = rf(_a0, epoch) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]uint32) @@ -1294,7 +1296,7 @@ func (_m *Utils) GetSortedProposedBlockIds(client *ethclient.Client, epoch uint3 } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, epoch) + r1 = rf(_a0, epoch) } else { r1 = ret.Error(1) } @@ -1302,17 +1304,17 @@ func (_m *Utils) GetSortedProposedBlockIds(client *ethclient.Client, epoch uint3 return r0, r1 } -// GetStake provides a mock function with given fields: client, stakerId -func (_m *Utils) GetStake(client *ethclient.Client, stakerId uint32) (*big.Int, error) { - ret := _m.Called(client, stakerId) +// GetStake provides a mock function with given fields: _a0, stakerId +func (_m *Utils) GetStake(_a0 *ethclient.Client, stakerId uint32) (*big.Int, error) { + ret := _m.Called(_a0, stakerId) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) (*big.Int, error)); ok { - return rf(client, stakerId) + return rf(_a0, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) *big.Int); ok { - r0 = rf(client, stakerId) + r0 = rf(_a0, stakerId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -1320,7 +1322,7 @@ func (_m *Utils) GetStake(client *ethclient.Client, stakerId uint32) (*big.Int, } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, stakerId) + r1 = rf(_a0, stakerId) } else { r1 = ret.Error(1) } @@ -1328,13 +1330,13 @@ func (_m *Utils) GetStake(client *ethclient.Client, stakerId uint32) (*big.Int, return r0, r1 } -// GetStakeManager provides a mock function with given fields: client -func (_m *Utils) GetStakeManager(client *ethclient.Client) *bindings.StakeManager { - ret := _m.Called(client) +// GetStakeManager provides a mock function with given fields: _a0 +func (_m *Utils) GetStakeManager(_a0 *ethclient.Client) *bindings.StakeManager { + ret := _m.Called(_a0) var r0 *bindings.StakeManager if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.StakeManager); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.StakeManager) @@ -1344,17 +1346,17 @@ func (_m *Utils) GetStakeManager(client *ethclient.Client) *bindings.StakeManage return r0 } -// GetStakeManagerWithOpts provides a mock function with given fields: client -func (_m *Utils) GetStakeManagerWithOpts(client *ethclient.Client) (*bindings.StakeManager, bind.CallOpts) { - ret := _m.Called(client) +// GetStakeManagerWithOpts provides a mock function with given fields: _a0 +func (_m *Utils) GetStakeManagerWithOpts(_a0 *ethclient.Client) (*bindings.StakeManager, bind.CallOpts) { + ret := _m.Called(_a0) var r0 *bindings.StakeManager var r1 bind.CallOpts if rf, ok := ret.Get(0).(func(*ethclient.Client) (*bindings.StakeManager, bind.CallOpts)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.StakeManager); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.StakeManager) @@ -1362,7 +1364,7 @@ func (_m *Utils) GetStakeManagerWithOpts(client *ethclient.Client) (*bindings.St } if rf, ok := ret.Get(1).(func(*ethclient.Client) bind.CallOpts); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Get(1).(bind.CallOpts) } @@ -1370,17 +1372,17 @@ func (_m *Utils) GetStakeManagerWithOpts(client *ethclient.Client) (*bindings.St return r0, r1 } -// GetStakeSnapshot provides a mock function with given fields: client, stakerId, epoch -func (_m *Utils) GetStakeSnapshot(client *ethclient.Client, stakerId uint32, epoch uint32) (*big.Int, error) { - ret := _m.Called(client, stakerId, epoch) +// GetStakeSnapshot provides a mock function with given fields: _a0, stakerId, epoch +func (_m *Utils) GetStakeSnapshot(_a0 *ethclient.Client, stakerId uint32, epoch uint32) (*big.Int, error) { + ret := _m.Called(_a0, stakerId, epoch) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint32) (*big.Int, error)); ok { - return rf(client, stakerId, epoch) + return rf(_a0, stakerId, epoch) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint32) *big.Int); ok { - r0 = rf(client, stakerId, epoch) + r0 = rf(_a0, stakerId, epoch) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -1388,7 +1390,7 @@ func (_m *Utils) GetStakeSnapshot(client *ethclient.Client, stakerId uint32, epo } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, uint32) error); ok { - r1 = rf(client, stakerId, epoch) + r1 = rf(_a0, stakerId, epoch) } else { r1 = ret.Error(1) } @@ -1396,13 +1398,13 @@ func (_m *Utils) GetStakeSnapshot(client *ethclient.Client, stakerId uint32, epo return r0, r1 } -// GetStakedToken provides a mock function with given fields: client, tokenAddress -func (_m *Utils) GetStakedToken(client *ethclient.Client, tokenAddress common.Address) *bindings.StakedToken { - ret := _m.Called(client, tokenAddress) +// GetStakedToken provides a mock function with given fields: _a0, tokenAddress +func (_m *Utils) GetStakedToken(_a0 *ethclient.Client, tokenAddress common.Address) *bindings.StakedToken { + ret := _m.Called(_a0, tokenAddress) var r0 *bindings.StakedToken if rf, ok := ret.Get(0).(func(*ethclient.Client, common.Address) *bindings.StakedToken); ok { - r0 = rf(client, tokenAddress) + r0 = rf(_a0, tokenAddress) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.StakedToken) @@ -1412,17 +1414,17 @@ func (_m *Utils) GetStakedToken(client *ethclient.Client, tokenAddress common.Ad return r0 } -// GetStakedTokenManagerWithOpts provides a mock function with given fields: client, tokenAddress -func (_m *Utils) GetStakedTokenManagerWithOpts(client *ethclient.Client, tokenAddress common.Address) (*bindings.StakedToken, bind.CallOpts) { - ret := _m.Called(client, tokenAddress) +// GetStakedTokenManagerWithOpts provides a mock function with given fields: _a0, tokenAddress +func (_m *Utils) GetStakedTokenManagerWithOpts(_a0 *ethclient.Client, tokenAddress common.Address) (*bindings.StakedToken, bind.CallOpts) { + ret := _m.Called(_a0, tokenAddress) var r0 *bindings.StakedToken var r1 bind.CallOpts if rf, ok := ret.Get(0).(func(*ethclient.Client, common.Address) (*bindings.StakedToken, bind.CallOpts)); ok { - return rf(client, tokenAddress) + return rf(_a0, tokenAddress) } if rf, ok := ret.Get(0).(func(*ethclient.Client, common.Address) *bindings.StakedToken); ok { - r0 = rf(client, tokenAddress) + r0 = rf(_a0, tokenAddress) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.StakedToken) @@ -1430,7 +1432,7 @@ func (_m *Utils) GetStakedTokenManagerWithOpts(client *ethclient.Client, tokenAd } if rf, ok := ret.Get(1).(func(*ethclient.Client, common.Address) bind.CallOpts); ok { - r1 = rf(client, tokenAddress) + r1 = rf(_a0, tokenAddress) } else { r1 = ret.Get(1).(bind.CallOpts) } @@ -1438,23 +1440,23 @@ func (_m *Utils) GetStakedTokenManagerWithOpts(client *ethclient.Client, tokenAd return r0, r1 } -// GetStaker provides a mock function with given fields: client, stakerId -func (_m *Utils) GetStaker(client *ethclient.Client, stakerId uint32) (bindings.StructsStaker, error) { - ret := _m.Called(client, stakerId) +// GetStaker provides a mock function with given fields: _a0, stakerId +func (_m *Utils) GetStaker(_a0 *ethclient.Client, stakerId uint32) (bindings.StructsStaker, error) { + ret := _m.Called(_a0, stakerId) var r0 bindings.StructsStaker var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) (bindings.StructsStaker, error)); ok { - return rf(client, stakerId) + return rf(_a0, stakerId) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32) bindings.StructsStaker); ok { - r0 = rf(client, stakerId) + r0 = rf(_a0, stakerId) } else { r0 = ret.Get(0).(bindings.StructsStaker) } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32) error); ok { - r1 = rf(client, stakerId) + r1 = rf(_a0, stakerId) } else { r1 = ret.Error(1) } @@ -1462,23 +1464,23 @@ func (_m *Utils) GetStaker(client *ethclient.Client, stakerId uint32) (bindings. return r0, r1 } -// GetStakerId provides a mock function with given fields: client, address -func (_m *Utils) GetStakerId(client *ethclient.Client, address string) (uint32, error) { - ret := _m.Called(client, address) +// GetStakerId provides a mock function with given fields: _a0, address +func (_m *Utils) GetStakerId(_a0 *ethclient.Client, address string) (uint32, error) { + ret := _m.Called(_a0, address) var r0 uint32 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, string) (uint32, error)); ok { - return rf(client, address) + return rf(_a0, address) } if rf, ok := ret.Get(0).(func(*ethclient.Client, string) uint32); ok { - r0 = rf(client, address) + r0 = rf(_a0, address) } else { r0 = ret.Get(0).(uint32) } if rf, ok := ret.Get(1).(func(*ethclient.Client, string) error); ok { - r1 = rf(client, address) + r1 = rf(_a0, address) } else { r1 = ret.Error(1) } @@ -1486,17 +1488,17 @@ func (_m *Utils) GetStakerId(client *ethclient.Client, address string) (uint32, return r0, r1 } -// GetStakerSRZRBalance provides a mock function with given fields: client, staker -func (_m *Utils) GetStakerSRZRBalance(client *ethclient.Client, staker bindings.StructsStaker) (*big.Int, error) { - ret := _m.Called(client, staker) +// GetStakerSRZRBalance provides a mock function with given fields: _a0, staker +func (_m *Utils) GetStakerSRZRBalance(_a0 *ethclient.Client, staker bindings.StructsStaker) (*big.Int, error) { + ret := _m.Called(_a0, staker) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, bindings.StructsStaker) (*big.Int, error)); ok { - return rf(client, staker) + return rf(_a0, staker) } if rf, ok := ret.Get(0).(func(*ethclient.Client, bindings.StructsStaker) *big.Int); ok { - r0 = rf(client, staker) + r0 = rf(_a0, staker) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -1504,7 +1506,7 @@ func (_m *Utils) GetStakerSRZRBalance(client *ethclient.Client, staker bindings. } if rf, ok := ret.Get(1).(func(*ethclient.Client, bindings.StructsStaker) error); ok { - r1 = rf(client, staker) + r1 = rf(_a0, staker) } else { r1 = ret.Error(1) } @@ -1512,23 +1514,23 @@ func (_m *Utils) GetStakerSRZRBalance(client *ethclient.Client, staker bindings. return r0, r1 } -// GetStateBuffer provides a mock function with given fields: client -func (_m *Utils) GetStateBuffer(client *ethclient.Client) (uint64, error) { - ret := _m.Called(client) +// GetStateBuffer provides a mock function with given fields: _a0 +func (_m *Utils) GetStateBuffer(_a0 *ethclient.Client) (uint64, error) { + ret := _m.Called(_a0) var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint64, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint64); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint64) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1536,13 +1538,13 @@ func (_m *Utils) GetStateBuffer(client *ethclient.Client) (uint64, error) { return r0, r1 } -// GetTokenManager provides a mock function with given fields: client -func (_m *Utils) GetTokenManager(client *ethclient.Client) *bindings.RAZOR { - ret := _m.Called(client) +// GetTokenManager provides a mock function with given fields: _a0 +func (_m *Utils) GetTokenManager(_a0 *ethclient.Client) *bindings.RAZOR { + ret := _m.Called(_a0) var r0 *bindings.RAZOR if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.RAZOR); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.RAZOR) @@ -1552,17 +1554,17 @@ func (_m *Utils) GetTokenManager(client *ethclient.Client) *bindings.RAZOR { return r0 } -// GetTotalInfluenceRevealed provides a mock function with given fields: client, epoch, medianIndex -func (_m *Utils) GetTotalInfluenceRevealed(client *ethclient.Client, epoch uint32, medianIndex uint16) (*big.Int, error) { - ret := _m.Called(client, epoch, medianIndex) +// GetTotalInfluenceRevealed provides a mock function with given fields: _a0, epoch, medianIndex +func (_m *Utils) GetTotalInfluenceRevealed(_a0 *ethclient.Client, epoch uint32, medianIndex uint16) (*big.Int, error) { + ret := _m.Called(_a0, epoch, medianIndex) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint16) (*big.Int, error)); ok { - return rf(client, epoch, medianIndex) + return rf(_a0, epoch, medianIndex) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint16) *big.Int); ok { - r0 = rf(client, epoch, medianIndex) + r0 = rf(_a0, epoch, medianIndex) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -1570,7 +1572,7 @@ func (_m *Utils) GetTotalInfluenceRevealed(client *ethclient.Client, epoch uint3 } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, uint16) error); ok { - r1 = rf(client, epoch, medianIndex) + r1 = rf(_a0, epoch, medianIndex) } else { r1 = ret.Error(1) } @@ -1618,13 +1620,13 @@ func (_m *Utils) GetUint32(flagSet *pflag.FlagSet, name string) (uint32, error) return r0, r1 } -// GetVoteManager provides a mock function with given fields: client -func (_m *Utils) GetVoteManager(client *ethclient.Client) *bindings.VoteManager { - ret := _m.Called(client) +// GetVoteManager provides a mock function with given fields: _a0 +func (_m *Utils) GetVoteManager(_a0 *ethclient.Client) *bindings.VoteManager { + ret := _m.Called(_a0) var r0 *bindings.VoteManager if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.VoteManager); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.VoteManager) @@ -1634,17 +1636,17 @@ func (_m *Utils) GetVoteManager(client *ethclient.Client) *bindings.VoteManager return r0 } -// GetVoteManagerWithOpts provides a mock function with given fields: client -func (_m *Utils) GetVoteManagerWithOpts(client *ethclient.Client) (*bindings.VoteManager, bind.CallOpts) { - ret := _m.Called(client) +// GetVoteManagerWithOpts provides a mock function with given fields: _a0 +func (_m *Utils) GetVoteManagerWithOpts(_a0 *ethclient.Client) (*bindings.VoteManager, bind.CallOpts) { + ret := _m.Called(_a0) var r0 *bindings.VoteManager var r1 bind.CallOpts if rf, ok := ret.Get(0).(func(*ethclient.Client) (*bindings.VoteManager, bind.CallOpts)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) *bindings.VoteManager); ok { - r0 = rf(client) + r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*bindings.VoteManager) @@ -1652,7 +1654,7 @@ func (_m *Utils) GetVoteManagerWithOpts(client *ethclient.Client) (*bindings.Vot } if rf, ok := ret.Get(1).(func(*ethclient.Client) bind.CallOpts); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Get(1).(bind.CallOpts) } @@ -1660,17 +1662,17 @@ func (_m *Utils) GetVoteManagerWithOpts(client *ethclient.Client) (*bindings.Vot return r0, r1 } -// GetVoteValue provides a mock function with given fields: client, epoch, stakerId, medianIndex -func (_m *Utils) GetVoteValue(client *ethclient.Client, epoch uint32, stakerId uint32, medianIndex uint16) (*big.Int, error) { - ret := _m.Called(client, epoch, stakerId, medianIndex) +// GetVoteValue provides a mock function with given fields: _a0, epoch, stakerId, medianIndex +func (_m *Utils) GetVoteValue(_a0 *ethclient.Client, epoch uint32, stakerId uint32, medianIndex uint16) (*big.Int, error) { + ret := _m.Called(_a0, epoch, stakerId, medianIndex) var r0 *big.Int var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint32, uint16) (*big.Int, error)); ok { - return rf(client, epoch, stakerId, medianIndex) + return rf(_a0, epoch, stakerId, medianIndex) } if rf, ok := ret.Get(0).(func(*ethclient.Client, uint32, uint32, uint16) *big.Int); ok { - r0 = rf(client, epoch, stakerId, medianIndex) + r0 = rf(_a0, epoch, stakerId, medianIndex) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*big.Int) @@ -1678,7 +1680,7 @@ func (_m *Utils) GetVoteValue(client *ethclient.Client, epoch uint32, stakerId u } if rf, ok := ret.Get(1).(func(*ethclient.Client, uint32, uint32, uint16) error); ok { - r1 = rf(client, epoch, stakerId, medianIndex) + r1 = rf(_a0, epoch, stakerId, medianIndex) } else { r1 = ret.Error(1) } @@ -1686,23 +1688,23 @@ func (_m *Utils) GetVoteValue(client *ethclient.Client, epoch uint32, stakerId u return r0, r1 } -// GetWithdrawInitiationPeriod provides a mock function with given fields: client -func (_m *Utils) GetWithdrawInitiationPeriod(client *ethclient.Client) (uint16, error) { - ret := _m.Called(client) +// GetWithdrawInitiationPeriod provides a mock function with given fields: _a0 +func (_m *Utils) GetWithdrawInitiationPeriod(_a0 *ethclient.Client) (uint16, error) { + ret := _m.Called(_a0) var r0 uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint16, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint16); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint16) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1710,17 +1712,17 @@ func (_m *Utils) GetWithdrawInitiationPeriod(client *ethclient.Client) (uint16, return r0, r1 } -// HandleOfficialJobsFromJSONFile provides a mock function with given fields: client, collection, dataString -func (_m *Utils) HandleOfficialJobsFromJSONFile(client *ethclient.Client, collection bindings.StructsCollection, dataString string) ([]bindings.StructsJob, []uint16) { - ret := _m.Called(client, collection, dataString) +// HandleOfficialJobsFromJSONFile provides a mock function with given fields: _a0, collection, dataString +func (_m *Utils) HandleOfficialJobsFromJSONFile(_a0 *ethclient.Client, collection bindings.StructsCollection, dataString string) ([]bindings.StructsJob, []uint16) { + ret := _m.Called(_a0, collection, dataString) var r0 []bindings.StructsJob var r1 []uint16 if rf, ok := ret.Get(0).(func(*ethclient.Client, bindings.StructsCollection, string) ([]bindings.StructsJob, []uint16)); ok { - return rf(client, collection, dataString) + return rf(_a0, collection, dataString) } if rf, ok := ret.Get(0).(func(*ethclient.Client, bindings.StructsCollection, string) []bindings.StructsJob); ok { - r0 = rf(client, collection, dataString) + r0 = rf(_a0, collection, dataString) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]bindings.StructsJob) @@ -1728,7 +1730,7 @@ func (_m *Utils) HandleOfficialJobsFromJSONFile(client *ethclient.Client, collec } if rf, ok := ret.Get(1).(func(*ethclient.Client, bindings.StructsCollection, string) []uint16); ok { - r1 = rf(client, collection, dataString) + r1 = rf(_a0, collection, dataString) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]uint16) @@ -1852,23 +1854,23 @@ func (_m *Utils) SecondsToReadableTime(input int) string { return r0 } -// ToAssign provides a mock function with given fields: client -func (_m *Utils) ToAssign(client *ethclient.Client) (uint16, error) { - ret := _m.Called(client) +// ToAssign provides a mock function with given fields: _a0 +func (_m *Utils) ToAssign(_a0 *ethclient.Client) (uint16, error) { + ret := _m.Called(_a0) var r0 uint16 var r1 error if rf, ok := ret.Get(0).(func(*ethclient.Client) (uint16, error)); ok { - return rf(client) + return rf(_a0) } if rf, ok := ret.Get(0).(func(*ethclient.Client) uint16); ok { - r0 = rf(client) + r0 = rf(_a0) } else { r0 = ret.Get(0).(uint16) } if rf, ok := ret.Get(1).(func(*ethclient.Client) error); ok { - r1 = rf(client) + r1 = rf(_a0) } else { r1 = ret.Error(1) } @@ -1876,13 +1878,13 @@ func (_m *Utils) ToAssign(client *ethclient.Client) (uint16, error) { return r0, r1 } -// WaitForBlockCompletion provides a mock function with given fields: client, hashToRead -func (_m *Utils) WaitForBlockCompletion(client *ethclient.Client, hashToRead string) error { - ret := _m.Called(client, hashToRead) +// WaitForBlockCompletion provides a mock function with given fields: _a0, hashToRead +func (_m *Utils) WaitForBlockCompletion(_a0 *ethclient.Client, hashToRead string) error { + ret := _m.Called(_a0, hashToRead) var r0 error if rf, ok := ret.Get(0).(func(*ethclient.Client, string) error); ok { - r0 = rf(client, hashToRead) + r0 = rf(_a0, hashToRead) } else { r0 = ret.Error(0) }