Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code CleanUp (Issues from v1-audit) #990

Merged
merged 15 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions cmd/addStake.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ func (*UtilsStruct) ExecuteStake(flagSet *pflag.FlagSet) {
utils.CheckError("Approve error: ", err)

if approveTxnHash != core.NilHash {
err = razorUtils.WaitForBlockCompletion(txnArgs.Client, approveTxnHash.String())
err = razorUtils.WaitForBlockCompletion(txnArgs.Client, approveTxnHash.Hex())
utils.CheckError("Error in WaitForBlockCompletion for approve: ", err)
}

stakeTxnHash, err := cmdUtils.StakeCoins(txnArgs)
utils.CheckError("Stake error: ", err)

err = razorUtils.WaitForBlockCompletion(txnArgs.Client, stakeTxnHash.String())
err = razorUtils.WaitForBlockCompletion(txnArgs.Client, stakeTxnHash.Hex())
utils.CheckError("Error in WaitForBlockCompletion for stake: ", err)
}

Expand All @@ -110,12 +110,13 @@ func (*UtilsStruct) StakeCoins(txnArgs types.TransactionOptions) (common.Hash, e
txnArgs.Parameters = []interface{}{epoch, txnArgs.Amount}
txnArgs.ABI = bindings.StakeManagerMetaData.ABI
txnOpts := razorUtils.GetTxnOpts(txnArgs)
tx, err := stakeManagerUtils.Stake(txnArgs.Client, txnOpts, epoch, txnArgs.Amount)
txn, err := stakeManagerUtils.Stake(txnArgs.Client, txnOpts, epoch, txnArgs.Amount)
if err != nil {
return core.NilHash, err
}
log.Info("Txn Hash: ", transactionUtils.Hash(tx).Hex())
return transactionUtils.Hash(tx), nil
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
return txnHash, nil
}

func init() {
Expand Down
5 changes: 3 additions & 2 deletions cmd/approve.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ func (*UtilsStruct) Approve(txnArgs types.TransactionOptions) (common.Hash, erro
if err != nil {
return core.NilHash, err
}
log.Info("Txn Hash: ", transactionUtils.Hash(txn))
return transactionUtils.Hash(txn), nil
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
return txnHash, nil
}
}
10 changes: 6 additions & 4 deletions cmd/claimBounty.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (*UtilsStruct) ExecuteClaimBounty(flagSet *pflag.FlagSet) {
utils.CheckError("ClaimBounty error: ", err)

if txn != core.NilHash {
err = razorUtils.WaitForBlockCompletion(client, txn.String())
err = razorUtils.WaitForBlockCompletion(client, txn.Hex())
utils.CheckError("Error in WaitForBlockCompletion for claimBounty: ", err)
}
} else {
Expand Down Expand Up @@ -105,7 +105,7 @@ func (*UtilsStruct) HandleClaimBounty(client *ethclient.Client, config types.Con
return err
}
if claimBountyTxn != core.NilHash {
claimBountyErr := utilsInterface.WaitForBlockCompletion(client, claimBountyTxn.String())
claimBountyErr := utilsInterface.WaitForBlockCompletion(client, claimBountyTxn.Hex())
if claimBountyErr == nil {
if len(disputeData.BountyIdQueue) > 1 {
//Removing the bountyId from the queue as the bounty is being claimed
Expand Down Expand Up @@ -161,7 +161,7 @@ func (*UtilsStruct) ClaimBounty(config types.Configurations, client *ethclient.C
if waitFor > 0 {
log.Debug("Waiting for lock period to get over....")

timeRemaining := int64(waitFor) * core.EpochLength
timeRemaining := uint64(waitFor) * core.EpochLength
if waitFor == 1 {
log.Infof("Cannot claim bounty now. Please wait for %d epoch! (approximately %s)", waitFor, razorUtils.SecondsToReadableTime(int(timeRemaining)))
} else {
Expand All @@ -176,7 +176,9 @@ func (*UtilsStruct) ClaimBounty(config types.Configurations, client *ethclient.C
if err != nil {
return core.NilHash, err
}
return transactionUtils.Hash(tx), nil
txnHash := transactionUtils.Hash(tx)
log.Info("Txn Hash: ", txnHash.Hex())
return txnHash, nil
}

func init() {
Expand Down
6 changes: 4 additions & 2 deletions cmd/claimCommission.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ func (*UtilsStruct) ClaimCommission(flagSet *pflag.FlagSet) {

log.Info("Claiming commission")

txn, err := stakeManagerUtils.ClaimStakeReward(client, txnOpts)
txn, err := stakeManagerUtils.ClaimStakerReward(client, txnOpts)
utils.CheckError("Error in claiming stake reward: ", err)

err = razorUtils.WaitForBlockCompletion(client, transactionUtils.Hash(txn).String())
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
err = razorUtils.WaitForBlockCompletion(client, txnHash.Hex())
utils.CheckError("Error in WaitForBlockCompletion for claimCommission: ", err)
} else {
log.Error("no commission to claim")
Expand Down
4 changes: 2 additions & 2 deletions cmd/claimCommission_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestUtilsStruct_ClaimCommission(t *testing.T) {
expectedFatal bool
}{
{
name: "Test 1: When ClaimStakeReward runs successfully",
name: "Test 1: When ClaimStakerReward runs successfully",
args: args{
config: types.Configurations{},
stakerId: 1,
Expand Down Expand Up @@ -224,7 +224,7 @@ func TestUtilsStruct_ClaimCommission(t *testing.T) {
utilsMock.On("WaitForBlockCompletion", mock.AnythingOfType("*ethclient.Client"), mock.Anything).Return(nil)

stakeManagerUtilsMock.On("StakerInfo", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("*bind.CallOpts"), mock.AnythingOfType("uint32")).Return(tt.args.stakerInfo, tt.args.stakerInfoErr)
stakeManagerUtilsMock.On("ClaimStakeReward", mock.AnythingOfType("*ethclient.Client"), mock.Anything).Return(tt.args.txn, tt.args.err)
stakeManagerUtilsMock.On("ClaimStakerReward", mock.AnythingOfType("*ethclient.Client"), mock.Anything).Return(tt.args.txn, tt.args.err)

flagSetUtilsMock.On("GetStringAddress", mock.AnythingOfType("*pflag.FlagSet")).Return(tt.args.address, tt.args.addressErr)
cmdUtilsMock.On("GetConfigData").Return(tt.args.config, tt.args.configErr)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cmd-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (*UtilsStruct) GetEpochAndState(client *ethclient.Client) (uint32, int64, e
if err != nil {
return 0, 0, err
}
state, err := razorUtils.GetDelayedState(client, bufferPercent)
state, err := razorUtils.GetBufferedState(client, bufferPercent)
if err != nil {
return 0, 0, err
}
Expand All @@ -34,7 +34,7 @@ func (*UtilsStruct) GetEpochAndState(client *ethclient.Client) (uint32, int64, e

//This function waits for the appropriate states which are required
func (*UtilsStruct) WaitForAppropriateState(client *ethclient.Client, action string, states ...int) (uint32, error) {
statesAllowed := GetStatesAllowed(states)
statesAllowed := GetFormattedStateNames(states)
for {
epoch, state, err := cmdUtils.GetEpochAndState(client)
if err != nil {
Expand Down Expand Up @@ -96,7 +96,7 @@ func (*UtilsStruct) AssignAmountInWei(flagSet *pflag.FlagSet) (*big.Int, error)
}

//This function returns the states which are allowed
func GetStatesAllowed(states []int) string {
func GetFormattedStateNames(states []int) string {
var statesAllowed string
for i := 0; i < len(states); i++ {
if i == len(states)-1 {
Expand Down
8 changes: 4 additions & 4 deletions cmd/cmd-utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func TestGetEpochAndState(t *testing.T) {

utilsMock.On("GetEpoch", mock.AnythingOfType("*ethclient.Client")).Return(tt.args.epoch, tt.args.epochErr)
cmdUtilsMock.On("GetBufferPercent").Return(tt.args.bufferPercent, tt.args.bufferPercentErr)
utilsMock.On("GetDelayedState", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("int32")).Return(tt.args.state, tt.args.stateErr)
utilsMock.On("GetBufferedState", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("int32")).Return(tt.args.state, tt.args.stateErr)
utilsPkgMock.On("GetStateName", mock.AnythingOfType("int64")).Return(tt.args.stateName)

utils := &UtilsStruct{}
Expand Down Expand Up @@ -373,7 +373,7 @@ func TestAssignAmountInWei1(t *testing.T) {
}
}

func TestGetStatesAllowed(t *testing.T) {
func TestGetFormattedStateNames(t *testing.T) {
type args struct {
states []int
stateName string
Expand Down Expand Up @@ -414,8 +414,8 @@ func TestGetStatesAllowed(t *testing.T) {
utils.UtilsInterface = utilsPkgMock

utilsPkgMock.On("GetStateName", mock.AnythingOfType("int64")).Return(tt.args.stateName)
if got := GetStatesAllowed(tt.args.states); got != tt.want {
t.Errorf("GetStatesAllowed() = %v, want %v", got, tt.want)
if got := GetFormattedStateNames(tt.args.states); got != tt.want {
t.Errorf("GetFormattedStateNames() = %v, want %v", got, tt.want)
}
})
}
Expand Down
15 changes: 8 additions & 7 deletions cmd/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ If the previous epoch doesn't contain any medians, then the value is fetched fro
*/
func (*UtilsStruct) GetSalt(client *ethclient.Client, epoch uint32) ([32]byte, error) {
previousEpoch := epoch - 1
numProposedBlock, err := utils.UtilsInterface.GetNumberOfProposedBlocks(client, previousEpoch)
numProposedBlocks, err := utils.UtilsInterface.GetNumberOfProposedBlocks(client, previousEpoch)
if err != nil {
return [32]byte{}, err
}
blockIndexedToBeConfirmed, err := utils.UtilsInterface.GetBlockIndexToBeConfirmed(client)
blockIndexToBeConfirmed, err := utils.UtilsInterface.GetBlockIndexToBeConfirmed(client)
if err != nil {
return [32]byte{}, err
}
if numProposedBlock == 0 || (numProposedBlock > 0 && blockIndexedToBeConfirmed < 0) {
if numProposedBlocks == 0 || (numProposedBlocks > 0 && blockIndexToBeConfirmed < 0) {
return utils.VoteManagerInterface.GetSaltFromBlockchain(client)
}
blockId, err := utils.UtilsInterface.GetSortedProposedBlockId(client, previousEpoch, big.NewInt(int64(blockIndexedToBeConfirmed)))
blockId, err := utils.UtilsInterface.GetSortedProposedBlockId(client, previousEpoch, big.NewInt(int64(blockIndexToBeConfirmed)))
if err != nil {
return [32]byte{}, errors.New("Error in getting blockId: " + err.Error())
}
Expand Down Expand Up @@ -92,7 +92,7 @@ func (*UtilsStruct) HandleCommitState(client *ethclient.Client, epoch uint32, se
Commit finally commits the data to the smart contract. It calculates the commitment to send using the merkle tree root and the seed.
*/
func (*UtilsStruct) Commit(client *ethclient.Client, config types.Configurations, account types.Account, epoch uint32, seed []byte, root [32]byte) (common.Hash, error) {
if state, err := razorUtils.GetDelayedState(client, config.BufferPercent); err != nil || state != 0 {
if state, err := razorUtils.GetBufferedState(client, config.BufferPercent); err != nil || state != 0 {
log.Error("Not commit state")
return core.NilHash, err
}
Expand All @@ -119,6 +119,7 @@ func (*UtilsStruct) Commit(client *ethclient.Client, config types.Configurations
if err != nil {
return core.NilHash, err
}
log.Info("Txn Hash: ", transactionUtils.Hash(txn))
return transactionUtils.Hash(txn), nil
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
return txnHash, nil
}
2 changes: 1 addition & 1 deletion cmd/commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestCommit(t *testing.T) {
transactionUtils = transactionUtilsMock
voteManagerUtils = voteManagerUtilsMock

utilsMock.On("GetDelayedState", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("int32")).Return(tt.args.state, tt.args.stateErr)
utilsMock.On("GetBufferedState", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("int32")).Return(tt.args.state, tt.args.stateErr)
utilsMock.On("GetTxnOpts", mock.AnythingOfType("types.TransactionOptions")).Return(tt.args.txnOpts)
voteManagerUtilsMock.On("Commit", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("*bind.TransactOpts"), mock.AnythingOfType("uint32"), mock.Anything).Return(tt.args.commitTxn, tt.args.commitErr)
transactionUtilsMock.On("Hash", mock.AnythingOfType("*types.Transaction")).Return(tt.args.hash)
Expand Down
5 changes: 3 additions & 2 deletions cmd/confirm.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ func (*UtilsStruct) ClaimBlockReward(options types.TransactionOptions) (common.H
log.Error("Error in claiming block reward: ", err)
return core.NilHash, err
}
log.Info("Txn Hash: ", transactionUtils.Hash(txn).Hex())
return transactionUtils.Hash(txn), nil
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
return txnHash, nil
}

log.Debug("Only selected block proposer can claim block reward")
Expand Down
7 changes: 4 additions & 3 deletions cmd/createCollection.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (*UtilsStruct) ExecuteCreateCollection(flagSet *pflag.FlagSet) {

txn, err := cmdUtils.CreateCollection(client, config, collectionInput)
utils.CheckError("CreateCollection error: ", err)
err = razorUtils.WaitForBlockCompletion(client, txn.String())
err = razorUtils.WaitForBlockCompletion(client, txn.Hex())
utils.CheckError("Error in WaitForBlockCompletion for createCollection: ", err)
}

Expand Down Expand Up @@ -104,8 +104,9 @@ func (*UtilsStruct) CreateCollection(client *ethclient.Client, config types.Conf
return core.NilHash, err
}
log.Info("Creating collection...")
log.Info("Txn Hash: ", transactionUtils.Hash(txn))
return transactionUtils.Hash(txn), nil
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
return txnHash, nil
}

func init() {
Expand Down
7 changes: 4 additions & 3 deletions cmd/createJob.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (*UtilsStruct) ExecuteCreateJob(flagSet *pflag.FlagSet) {

txn, err := cmdUtils.CreateJob(client, config, jobInput)
utils.CheckError("CreateJob error: ", err)
err = razorUtils.WaitForBlockCompletion(client, txn.String())
err = razorUtils.WaitForBlockCompletion(client, txn.Hex())
utils.CheckError("Error in WaitForBlockCompletion for createJob: ", err)
}

Expand All @@ -103,8 +103,9 @@ func (*UtilsStruct) CreateJob(client *ethclient.Client, config types.Configurati
if err != nil {
return core.NilHash, err
}
log.Info("Transaction Hash: ", transactionUtils.Hash(txn))
return transactionUtils.Hash(txn), nil
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
return txnHash, nil
}

func init() {
Expand Down
9 changes: 5 additions & 4 deletions cmd/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ func (*UtilsStruct) ExecuteDelegate(flagSet *pflag.FlagSet) {
utils.CheckError("Approve error: ", err)

if approveTxnHash != core.NilHash {
err = razorUtils.WaitForBlockCompletion(txnArgs.Client, approveTxnHash.String())
err = razorUtils.WaitForBlockCompletion(txnArgs.Client, approveTxnHash.Hex())
utils.CheckError("Error in WaitForBlockCompletion for approve: ", err)
}

delegateTxnHash, err := cmdUtils.Delegate(txnArgs, stakerId)
utils.CheckError("Delegate error: ", err)
err = razorUtils.WaitForBlockCompletion(client, delegateTxnHash.String())
err = razorUtils.WaitForBlockCompletion(client, delegateTxnHash.Hex())
utils.CheckError("Error in WaitForBlockCompletion for delegate: ", err)
}

Expand All @@ -94,8 +94,9 @@ func (*UtilsStruct) Delegate(txnArgs types.TransactionOptions, stakerId uint32)
if err != nil {
return core.NilHash, err
}
log.Infof("Transaction hash: %s", transactionUtils.Hash(txn))
return transactionUtils.Hash(txn), nil
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
return txnHash, nil
}

func init() {
Expand Down
28 changes: 17 additions & 11 deletions cmd/dispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ func (*UtilsStruct) HandleDispute(client *ethclient.Client, config types.Configu
log.Error(err)
continue
}
log.Info("Txn Hash: ", transactionUtils.Hash(disputeBiggestStakeProposedTxn))
WaitForBlockCompletionErr := razorUtils.WaitForBlockCompletion(client, transactionUtils.Hash(disputeBiggestStakeProposedTxn).String())
disputeBiggestStakeProposedTxnHash := transactionUtils.Hash(disputeBiggestStakeProposedTxn)
log.Info("Txn Hash: ", disputeBiggestStakeProposedTxnHash.Hex())
WaitForBlockCompletionErr := razorUtils.WaitForBlockCompletion(client, disputeBiggestStakeProposedTxnHash.Hex())

//If dispute happens, then storing the bountyId into disputeData file
if WaitForBlockCompletionErr == nil {
Expand All @@ -120,8 +121,9 @@ func (*UtilsStruct) HandleDispute(client *ethclient.Client, config types.Configu
log.Error("Error in disputing: ", err)
}
if idDisputeTxn != nil {
log.Debugf("Txn Hash: %s", transactionUtils.Hash(idDisputeTxn).String())
WaitForBlockCompletionErr := razorUtils.WaitForBlockCompletion(client, transactionUtils.Hash(idDisputeTxn).String())
idDisputeTxnHash := transactionUtils.Hash(idDisputeTxn)
log.Debugf("Txn Hash: %s", idDisputeTxnHash.Hex())
WaitForBlockCompletionErr := razorUtils.WaitForBlockCompletion(client, idDisputeTxnHash.Hex())

//If dispute happens, then storing the bountyId into disputeData file
if WaitForBlockCompletionErr == nil {
Expand Down Expand Up @@ -358,7 +360,9 @@ func (*UtilsStruct) Dispute(client *ethclient.Client, config types.Configuration
var nilTransaction *Types.Transaction

if finalizeTxn != nilTransaction {
WaitForBlockCompletionErr := razorUtils.WaitForBlockCompletion(client, transactionUtils.Hash(finalizeTxn).String())
finalizeTxnHash := transactionUtils.Hash(finalizeTxn)
log.Info("Txn Hash: ", finalizeTxnHash.Hex())
WaitForBlockCompletionErr := razorUtils.WaitForBlockCompletion(client, finalizeTxnHash.Hex())
//If dispute happens, then storing the bountyId into disputeData file
if WaitForBlockCompletionErr == nil {
err = cmdUtils.StoreBountyId(client, account)
Expand Down Expand Up @@ -409,15 +413,16 @@ func GiveSorted(client *ethclient.Client, blockManager *bindings.BlockManager, t
return errors.New("another giveSorted in progress")
}

log.Info("Calling GiveSorted...")
txn, err := blockManagerUtils.GiveSorted(blockManager, txnOpts, epoch, leafId, sortedValues)
if err != nil {
return err
}

log.Info("Calling GiveSorted...")
log.Info("Txn Hash: ", transactionUtils.Hash(txn))
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
giveSortedLeafIds = append(giveSortedLeafIds, int(leafId))
err = razorUtils.WaitForBlockCompletion(client, transactionUtils.Hash(txn).String())
err = razorUtils.WaitForBlockCompletion(client, txnHash.Hex())
if err != nil {
log.Error("Error in WaitForBlockCompletion for giveSorted: ", err)
return err
Expand Down Expand Up @@ -488,8 +493,9 @@ func (*UtilsStruct) ResetDispute(client *ethclient.Client, blockManager *binding
log.Error("error in resetting dispute", err)
return
}
log.Info("Transaction hash: ", transactionUtils.Hash(txn))
err = razorUtils.WaitForBlockCompletion(client, transactionUtils.Hash(txn).String())
txnHash := transactionUtils.Hash(txn)
log.Info("Txn Hash: ", txnHash.Hex())
err = razorUtils.WaitForBlockCompletion(client, txnHash.Hex())
if err != nil {
log.Error("Error in WaitForBlockCompletion for resetDispute: ", err)
return
Expand All @@ -499,7 +505,7 @@ func (*UtilsStruct) ResetDispute(client *ethclient.Client, blockManager *binding

//This function returns the bountyId from events
func (*UtilsStruct) GetBountyIdFromEvents(client *ethclient.Client, blockNumber *big.Int, bountyHunter string) (uint32, error) {
fromBlock, err := utils.UtilsInterface.CalculateBlockNumberAtEpochBeginning(client, blockNumber)
fromBlock, err := utils.UtilsInterface.EstimateBlockNumberAtEpochBeginning(client, blockNumber)
if err != nil {
log.Error(err)
return 0, err
Expand Down
2 changes: 1 addition & 1 deletion cmd/dispute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ func TestGetBountyIdFromEvents(t *testing.T) {
utils.UtilsInterface = utilsPkgMock
utils.ABIInterface = abiUtilsMock

utilsPkgMock.On("CalculateBlockNumberAtEpochBeginning", mock.AnythingOfType("*ethclient.Client"), mock.Anything, mock.Anything).Return(tt.args.fromBlock, tt.args.fromBlockErr)
utilsPkgMock.On("EstimateBlockNumberAtEpochBeginning", mock.AnythingOfType("*ethclient.Client"), mock.Anything).Return(tt.args.fromBlock, tt.args.fromBlockErr)
abiUtilsMock.On("Parse", mock.Anything).Return(tt.args.contractABI, tt.args.contractABIErr)
utilsPkgMock.On("FilterLogsWithRetry", mock.AnythingOfType("*ethclient.Client"), mock.AnythingOfType("ethereum.FilterQuery")).Return(tt.args.logs, tt.args.logsErr)
abiMock.On("Unpack", mock.Anything, mock.Anything, mock.Anything).Return(tt.args.data, tt.args.unpackErr)
Expand Down
Loading