github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/access/mock/api.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	context "context"
     7  
     8  	access "github.com/onflow/flow-go/access"
     9  
    10  	entities "github.com/onflow/flow/protobuf/go/flow/entities"
    11  
    12  	flow "github.com/onflow/flow-go/model/flow"
    13  
    14  	mock "github.com/stretchr/testify/mock"
    15  
    16  	subscription "github.com/onflow/flow-go/engine/access/subscription"
    17  )
    18  
    19  // API is an autogenerated mock type for the API type
    20  type API struct {
    21  	mock.Mock
    22  }
    23  
    24  // ExecuteScriptAtBlockHeight provides a mock function with given fields: ctx, blockHeight, script, arguments
    25  func (_m *API) ExecuteScriptAtBlockHeight(ctx context.Context, blockHeight uint64, script []byte, arguments [][]byte) ([]byte, error) {
    26  	ret := _m.Called(ctx, blockHeight, script, arguments)
    27  
    28  	var r0 []byte
    29  	var r1 error
    30  	if rf, ok := ret.Get(0).(func(context.Context, uint64, []byte, [][]byte) ([]byte, error)); ok {
    31  		return rf(ctx, blockHeight, script, arguments)
    32  	}
    33  	if rf, ok := ret.Get(0).(func(context.Context, uint64, []byte, [][]byte) []byte); ok {
    34  		r0 = rf(ctx, blockHeight, script, arguments)
    35  	} else {
    36  		if ret.Get(0) != nil {
    37  			r0 = ret.Get(0).([]byte)
    38  		}
    39  	}
    40  
    41  	if rf, ok := ret.Get(1).(func(context.Context, uint64, []byte, [][]byte) error); ok {
    42  		r1 = rf(ctx, blockHeight, script, arguments)
    43  	} else {
    44  		r1 = ret.Error(1)
    45  	}
    46  
    47  	return r0, r1
    48  }
    49  
    50  // ExecuteScriptAtBlockID provides a mock function with given fields: ctx, blockID, script, arguments
    51  func (_m *API) ExecuteScriptAtBlockID(ctx context.Context, blockID flow.Identifier, script []byte, arguments [][]byte) ([]byte, error) {
    52  	ret := _m.Called(ctx, blockID, script, arguments)
    53  
    54  	var r0 []byte
    55  	var r1 error
    56  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, [][]byte) ([]byte, error)); ok {
    57  		return rf(ctx, blockID, script, arguments)
    58  	}
    59  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, [][]byte) []byte); ok {
    60  		r0 = rf(ctx, blockID, script, arguments)
    61  	} else {
    62  		if ret.Get(0) != nil {
    63  			r0 = ret.Get(0).([]byte)
    64  		}
    65  	}
    66  
    67  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, []byte, [][]byte) error); ok {
    68  		r1 = rf(ctx, blockID, script, arguments)
    69  	} else {
    70  		r1 = ret.Error(1)
    71  	}
    72  
    73  	return r0, r1
    74  }
    75  
    76  // ExecuteScriptAtLatestBlock provides a mock function with given fields: ctx, script, arguments
    77  func (_m *API) ExecuteScriptAtLatestBlock(ctx context.Context, script []byte, arguments [][]byte) ([]byte, error) {
    78  	ret := _m.Called(ctx, script, arguments)
    79  
    80  	var r0 []byte
    81  	var r1 error
    82  	if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte) ([]byte, error)); ok {
    83  		return rf(ctx, script, arguments)
    84  	}
    85  	if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte) []byte); ok {
    86  		r0 = rf(ctx, script, arguments)
    87  	} else {
    88  		if ret.Get(0) != nil {
    89  			r0 = ret.Get(0).([]byte)
    90  		}
    91  	}
    92  
    93  	if rf, ok := ret.Get(1).(func(context.Context, []byte, [][]byte) error); ok {
    94  		r1 = rf(ctx, script, arguments)
    95  	} else {
    96  		r1 = ret.Error(1)
    97  	}
    98  
    99  	return r0, r1
   100  }
   101  
   102  // GetAccount provides a mock function with given fields: ctx, address
   103  func (_m *API) GetAccount(ctx context.Context, address flow.Address) (*flow.Account, error) {
   104  	ret := _m.Called(ctx, address)
   105  
   106  	var r0 *flow.Account
   107  	var r1 error
   108  	if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok {
   109  		return rf(ctx, address)
   110  	}
   111  	if rf, ok := ret.Get(0).(func(context.Context, flow.Address) *flow.Account); ok {
   112  		r0 = rf(ctx, address)
   113  	} else {
   114  		if ret.Get(0) != nil {
   115  			r0 = ret.Get(0).(*flow.Account)
   116  		}
   117  	}
   118  
   119  	if rf, ok := ret.Get(1).(func(context.Context, flow.Address) error); ok {
   120  		r1 = rf(ctx, address)
   121  	} else {
   122  		r1 = ret.Error(1)
   123  	}
   124  
   125  	return r0, r1
   126  }
   127  
   128  // GetAccountAtBlockHeight provides a mock function with given fields: ctx, address, height
   129  func (_m *API) GetAccountAtBlockHeight(ctx context.Context, address flow.Address, height uint64) (*flow.Account, error) {
   130  	ret := _m.Called(ctx, address, height)
   131  
   132  	var r0 *flow.Account
   133  	var r1 error
   134  	if rf, ok := ret.Get(0).(func(context.Context, flow.Address, uint64) (*flow.Account, error)); ok {
   135  		return rf(ctx, address, height)
   136  	}
   137  	if rf, ok := ret.Get(0).(func(context.Context, flow.Address, uint64) *flow.Account); ok {
   138  		r0 = rf(ctx, address, height)
   139  	} else {
   140  		if ret.Get(0) != nil {
   141  			r0 = ret.Get(0).(*flow.Account)
   142  		}
   143  	}
   144  
   145  	if rf, ok := ret.Get(1).(func(context.Context, flow.Address, uint64) error); ok {
   146  		r1 = rf(ctx, address, height)
   147  	} else {
   148  		r1 = ret.Error(1)
   149  	}
   150  
   151  	return r0, r1
   152  }
   153  
   154  // GetAccountAtLatestBlock provides a mock function with given fields: ctx, address
   155  func (_m *API) GetAccountAtLatestBlock(ctx context.Context, address flow.Address) (*flow.Account, error) {
   156  	ret := _m.Called(ctx, address)
   157  
   158  	var r0 *flow.Account
   159  	var r1 error
   160  	if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok {
   161  		return rf(ctx, address)
   162  	}
   163  	if rf, ok := ret.Get(0).(func(context.Context, flow.Address) *flow.Account); ok {
   164  		r0 = rf(ctx, address)
   165  	} else {
   166  		if ret.Get(0) != nil {
   167  			r0 = ret.Get(0).(*flow.Account)
   168  		}
   169  	}
   170  
   171  	if rf, ok := ret.Get(1).(func(context.Context, flow.Address) error); ok {
   172  		r1 = rf(ctx, address)
   173  	} else {
   174  		r1 = ret.Error(1)
   175  	}
   176  
   177  	return r0, r1
   178  }
   179  
   180  // GetBlockByHeight provides a mock function with given fields: ctx, height
   181  func (_m *API) GetBlockByHeight(ctx context.Context, height uint64) (*flow.Block, flow.BlockStatus, error) {
   182  	ret := _m.Called(ctx, height)
   183  
   184  	var r0 *flow.Block
   185  	var r1 flow.BlockStatus
   186  	var r2 error
   187  	if rf, ok := ret.Get(0).(func(context.Context, uint64) (*flow.Block, flow.BlockStatus, error)); ok {
   188  		return rf(ctx, height)
   189  	}
   190  	if rf, ok := ret.Get(0).(func(context.Context, uint64) *flow.Block); ok {
   191  		r0 = rf(ctx, height)
   192  	} else {
   193  		if ret.Get(0) != nil {
   194  			r0 = ret.Get(0).(*flow.Block)
   195  		}
   196  	}
   197  
   198  	if rf, ok := ret.Get(1).(func(context.Context, uint64) flow.BlockStatus); ok {
   199  		r1 = rf(ctx, height)
   200  	} else {
   201  		r1 = ret.Get(1).(flow.BlockStatus)
   202  	}
   203  
   204  	if rf, ok := ret.Get(2).(func(context.Context, uint64) error); ok {
   205  		r2 = rf(ctx, height)
   206  	} else {
   207  		r2 = ret.Error(2)
   208  	}
   209  
   210  	return r0, r1, r2
   211  }
   212  
   213  // GetBlockByID provides a mock function with given fields: ctx, id
   214  func (_m *API) GetBlockByID(ctx context.Context, id flow.Identifier) (*flow.Block, flow.BlockStatus, error) {
   215  	ret := _m.Called(ctx, id)
   216  
   217  	var r0 *flow.Block
   218  	var r1 flow.BlockStatus
   219  	var r2 error
   220  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Block, flow.BlockStatus, error)); ok {
   221  		return rf(ctx, id)
   222  	}
   223  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.Block); ok {
   224  		r0 = rf(ctx, id)
   225  	} else {
   226  		if ret.Get(0) != nil {
   227  			r0 = ret.Get(0).(*flow.Block)
   228  		}
   229  	}
   230  
   231  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) flow.BlockStatus); ok {
   232  		r1 = rf(ctx, id)
   233  	} else {
   234  		r1 = ret.Get(1).(flow.BlockStatus)
   235  	}
   236  
   237  	if rf, ok := ret.Get(2).(func(context.Context, flow.Identifier) error); ok {
   238  		r2 = rf(ctx, id)
   239  	} else {
   240  		r2 = ret.Error(2)
   241  	}
   242  
   243  	return r0, r1, r2
   244  }
   245  
   246  // GetBlockHeaderByHeight provides a mock function with given fields: ctx, height
   247  func (_m *API) GetBlockHeaderByHeight(ctx context.Context, height uint64) (*flow.Header, flow.BlockStatus, error) {
   248  	ret := _m.Called(ctx, height)
   249  
   250  	var r0 *flow.Header
   251  	var r1 flow.BlockStatus
   252  	var r2 error
   253  	if rf, ok := ret.Get(0).(func(context.Context, uint64) (*flow.Header, flow.BlockStatus, error)); ok {
   254  		return rf(ctx, height)
   255  	}
   256  	if rf, ok := ret.Get(0).(func(context.Context, uint64) *flow.Header); ok {
   257  		r0 = rf(ctx, height)
   258  	} else {
   259  		if ret.Get(0) != nil {
   260  			r0 = ret.Get(0).(*flow.Header)
   261  		}
   262  	}
   263  
   264  	if rf, ok := ret.Get(1).(func(context.Context, uint64) flow.BlockStatus); ok {
   265  		r1 = rf(ctx, height)
   266  	} else {
   267  		r1 = ret.Get(1).(flow.BlockStatus)
   268  	}
   269  
   270  	if rf, ok := ret.Get(2).(func(context.Context, uint64) error); ok {
   271  		r2 = rf(ctx, height)
   272  	} else {
   273  		r2 = ret.Error(2)
   274  	}
   275  
   276  	return r0, r1, r2
   277  }
   278  
   279  // GetBlockHeaderByID provides a mock function with given fields: ctx, id
   280  func (_m *API) GetBlockHeaderByID(ctx context.Context, id flow.Identifier) (*flow.Header, flow.BlockStatus, error) {
   281  	ret := _m.Called(ctx, id)
   282  
   283  	var r0 *flow.Header
   284  	var r1 flow.BlockStatus
   285  	var r2 error
   286  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Header, flow.BlockStatus, error)); ok {
   287  		return rf(ctx, id)
   288  	}
   289  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.Header); ok {
   290  		r0 = rf(ctx, id)
   291  	} else {
   292  		if ret.Get(0) != nil {
   293  			r0 = ret.Get(0).(*flow.Header)
   294  		}
   295  	}
   296  
   297  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) flow.BlockStatus); ok {
   298  		r1 = rf(ctx, id)
   299  	} else {
   300  		r1 = ret.Get(1).(flow.BlockStatus)
   301  	}
   302  
   303  	if rf, ok := ret.Get(2).(func(context.Context, flow.Identifier) error); ok {
   304  		r2 = rf(ctx, id)
   305  	} else {
   306  		r2 = ret.Error(2)
   307  	}
   308  
   309  	return r0, r1, r2
   310  }
   311  
   312  // GetCollectionByID provides a mock function with given fields: ctx, id
   313  func (_m *API) GetCollectionByID(ctx context.Context, id flow.Identifier) (*flow.LightCollection, error) {
   314  	ret := _m.Called(ctx, id)
   315  
   316  	var r0 *flow.LightCollection
   317  	var r1 error
   318  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.LightCollection, error)); ok {
   319  		return rf(ctx, id)
   320  	}
   321  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.LightCollection); ok {
   322  		r0 = rf(ctx, id)
   323  	} else {
   324  		if ret.Get(0) != nil {
   325  			r0 = ret.Get(0).(*flow.LightCollection)
   326  		}
   327  	}
   328  
   329  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
   330  		r1 = rf(ctx, id)
   331  	} else {
   332  		r1 = ret.Error(1)
   333  	}
   334  
   335  	return r0, r1
   336  }
   337  
   338  // GetEventsForBlockIDs provides a mock function with given fields: ctx, eventType, blockIDs, requiredEventEncodingVersion
   339  func (_m *API) GetEventsForBlockIDs(ctx context.Context, eventType string, blockIDs []flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion) ([]flow.BlockEvents, error) {
   340  	ret := _m.Called(ctx, eventType, blockIDs, requiredEventEncodingVersion)
   341  
   342  	var r0 []flow.BlockEvents
   343  	var r1 error
   344  	if rf, ok := ret.Get(0).(func(context.Context, string, []flow.Identifier, entities.EventEncodingVersion) ([]flow.BlockEvents, error)); ok {
   345  		return rf(ctx, eventType, blockIDs, requiredEventEncodingVersion)
   346  	}
   347  	if rf, ok := ret.Get(0).(func(context.Context, string, []flow.Identifier, entities.EventEncodingVersion) []flow.BlockEvents); ok {
   348  		r0 = rf(ctx, eventType, blockIDs, requiredEventEncodingVersion)
   349  	} else {
   350  		if ret.Get(0) != nil {
   351  			r0 = ret.Get(0).([]flow.BlockEvents)
   352  		}
   353  	}
   354  
   355  	if rf, ok := ret.Get(1).(func(context.Context, string, []flow.Identifier, entities.EventEncodingVersion) error); ok {
   356  		r1 = rf(ctx, eventType, blockIDs, requiredEventEncodingVersion)
   357  	} else {
   358  		r1 = ret.Error(1)
   359  	}
   360  
   361  	return r0, r1
   362  }
   363  
   364  // GetEventsForHeightRange provides a mock function with given fields: ctx, eventType, startHeight, endHeight, requiredEventEncodingVersion
   365  func (_m *API) GetEventsForHeightRange(ctx context.Context, eventType string, startHeight uint64, endHeight uint64, requiredEventEncodingVersion entities.EventEncodingVersion) ([]flow.BlockEvents, error) {
   366  	ret := _m.Called(ctx, eventType, startHeight, endHeight, requiredEventEncodingVersion)
   367  
   368  	var r0 []flow.BlockEvents
   369  	var r1 error
   370  	if rf, ok := ret.Get(0).(func(context.Context, string, uint64, uint64, entities.EventEncodingVersion) ([]flow.BlockEvents, error)); ok {
   371  		return rf(ctx, eventType, startHeight, endHeight, requiredEventEncodingVersion)
   372  	}
   373  	if rf, ok := ret.Get(0).(func(context.Context, string, uint64, uint64, entities.EventEncodingVersion) []flow.BlockEvents); ok {
   374  		r0 = rf(ctx, eventType, startHeight, endHeight, requiredEventEncodingVersion)
   375  	} else {
   376  		if ret.Get(0) != nil {
   377  			r0 = ret.Get(0).([]flow.BlockEvents)
   378  		}
   379  	}
   380  
   381  	if rf, ok := ret.Get(1).(func(context.Context, string, uint64, uint64, entities.EventEncodingVersion) error); ok {
   382  		r1 = rf(ctx, eventType, startHeight, endHeight, requiredEventEncodingVersion)
   383  	} else {
   384  		r1 = ret.Error(1)
   385  	}
   386  
   387  	return r0, r1
   388  }
   389  
   390  // GetExecutionResultByID provides a mock function with given fields: ctx, id
   391  func (_m *API) GetExecutionResultByID(ctx context.Context, id flow.Identifier) (*flow.ExecutionResult, error) {
   392  	ret := _m.Called(ctx, id)
   393  
   394  	var r0 *flow.ExecutionResult
   395  	var r1 error
   396  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.ExecutionResult, error)); ok {
   397  		return rf(ctx, id)
   398  	}
   399  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.ExecutionResult); ok {
   400  		r0 = rf(ctx, id)
   401  	} else {
   402  		if ret.Get(0) != nil {
   403  			r0 = ret.Get(0).(*flow.ExecutionResult)
   404  		}
   405  	}
   406  
   407  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
   408  		r1 = rf(ctx, id)
   409  	} else {
   410  		r1 = ret.Error(1)
   411  	}
   412  
   413  	return r0, r1
   414  }
   415  
   416  // GetExecutionResultForBlockID provides a mock function with given fields: ctx, blockID
   417  func (_m *API) GetExecutionResultForBlockID(ctx context.Context, blockID flow.Identifier) (*flow.ExecutionResult, error) {
   418  	ret := _m.Called(ctx, blockID)
   419  
   420  	var r0 *flow.ExecutionResult
   421  	var r1 error
   422  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.ExecutionResult, error)); ok {
   423  		return rf(ctx, blockID)
   424  	}
   425  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.ExecutionResult); ok {
   426  		r0 = rf(ctx, blockID)
   427  	} else {
   428  		if ret.Get(0) != nil {
   429  			r0 = ret.Get(0).(*flow.ExecutionResult)
   430  		}
   431  	}
   432  
   433  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
   434  		r1 = rf(ctx, blockID)
   435  	} else {
   436  		r1 = ret.Error(1)
   437  	}
   438  
   439  	return r0, r1
   440  }
   441  
   442  // GetLatestBlock provides a mock function with given fields: ctx, isSealed
   443  func (_m *API) GetLatestBlock(ctx context.Context, isSealed bool) (*flow.Block, flow.BlockStatus, error) {
   444  	ret := _m.Called(ctx, isSealed)
   445  
   446  	var r0 *flow.Block
   447  	var r1 flow.BlockStatus
   448  	var r2 error
   449  	if rf, ok := ret.Get(0).(func(context.Context, bool) (*flow.Block, flow.BlockStatus, error)); ok {
   450  		return rf(ctx, isSealed)
   451  	}
   452  	if rf, ok := ret.Get(0).(func(context.Context, bool) *flow.Block); ok {
   453  		r0 = rf(ctx, isSealed)
   454  	} else {
   455  		if ret.Get(0) != nil {
   456  			r0 = ret.Get(0).(*flow.Block)
   457  		}
   458  	}
   459  
   460  	if rf, ok := ret.Get(1).(func(context.Context, bool) flow.BlockStatus); ok {
   461  		r1 = rf(ctx, isSealed)
   462  	} else {
   463  		r1 = ret.Get(1).(flow.BlockStatus)
   464  	}
   465  
   466  	if rf, ok := ret.Get(2).(func(context.Context, bool) error); ok {
   467  		r2 = rf(ctx, isSealed)
   468  	} else {
   469  		r2 = ret.Error(2)
   470  	}
   471  
   472  	return r0, r1, r2
   473  }
   474  
   475  // GetLatestBlockHeader provides a mock function with given fields: ctx, isSealed
   476  func (_m *API) GetLatestBlockHeader(ctx context.Context, isSealed bool) (*flow.Header, flow.BlockStatus, error) {
   477  	ret := _m.Called(ctx, isSealed)
   478  
   479  	var r0 *flow.Header
   480  	var r1 flow.BlockStatus
   481  	var r2 error
   482  	if rf, ok := ret.Get(0).(func(context.Context, bool) (*flow.Header, flow.BlockStatus, error)); ok {
   483  		return rf(ctx, isSealed)
   484  	}
   485  	if rf, ok := ret.Get(0).(func(context.Context, bool) *flow.Header); ok {
   486  		r0 = rf(ctx, isSealed)
   487  	} else {
   488  		if ret.Get(0) != nil {
   489  			r0 = ret.Get(0).(*flow.Header)
   490  		}
   491  	}
   492  
   493  	if rf, ok := ret.Get(1).(func(context.Context, bool) flow.BlockStatus); ok {
   494  		r1 = rf(ctx, isSealed)
   495  	} else {
   496  		r1 = ret.Get(1).(flow.BlockStatus)
   497  	}
   498  
   499  	if rf, ok := ret.Get(2).(func(context.Context, bool) error); ok {
   500  		r2 = rf(ctx, isSealed)
   501  	} else {
   502  		r2 = ret.Error(2)
   503  	}
   504  
   505  	return r0, r1, r2
   506  }
   507  
   508  // GetLatestProtocolStateSnapshot provides a mock function with given fields: ctx
   509  func (_m *API) GetLatestProtocolStateSnapshot(ctx context.Context) ([]byte, error) {
   510  	ret := _m.Called(ctx)
   511  
   512  	var r0 []byte
   513  	var r1 error
   514  	if rf, ok := ret.Get(0).(func(context.Context) ([]byte, error)); ok {
   515  		return rf(ctx)
   516  	}
   517  	if rf, ok := ret.Get(0).(func(context.Context) []byte); ok {
   518  		r0 = rf(ctx)
   519  	} else {
   520  		if ret.Get(0) != nil {
   521  			r0 = ret.Get(0).([]byte)
   522  		}
   523  	}
   524  
   525  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
   526  		r1 = rf(ctx)
   527  	} else {
   528  		r1 = ret.Error(1)
   529  	}
   530  
   531  	return r0, r1
   532  }
   533  
   534  // GetNetworkParameters provides a mock function with given fields: ctx
   535  func (_m *API) GetNetworkParameters(ctx context.Context) access.NetworkParameters {
   536  	ret := _m.Called(ctx)
   537  
   538  	var r0 access.NetworkParameters
   539  	if rf, ok := ret.Get(0).(func(context.Context) access.NetworkParameters); ok {
   540  		r0 = rf(ctx)
   541  	} else {
   542  		r0 = ret.Get(0).(access.NetworkParameters)
   543  	}
   544  
   545  	return r0
   546  }
   547  
   548  // GetNodeVersionInfo provides a mock function with given fields: ctx
   549  func (_m *API) GetNodeVersionInfo(ctx context.Context) (*access.NodeVersionInfo, error) {
   550  	ret := _m.Called(ctx)
   551  
   552  	var r0 *access.NodeVersionInfo
   553  	var r1 error
   554  	if rf, ok := ret.Get(0).(func(context.Context) (*access.NodeVersionInfo, error)); ok {
   555  		return rf(ctx)
   556  	}
   557  	if rf, ok := ret.Get(0).(func(context.Context) *access.NodeVersionInfo); ok {
   558  		r0 = rf(ctx)
   559  	} else {
   560  		if ret.Get(0) != nil {
   561  			r0 = ret.Get(0).(*access.NodeVersionInfo)
   562  		}
   563  	}
   564  
   565  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
   566  		r1 = rf(ctx)
   567  	} else {
   568  		r1 = ret.Error(1)
   569  	}
   570  
   571  	return r0, r1
   572  }
   573  
   574  // GetProtocolStateSnapshotByBlockID provides a mock function with given fields: ctx, blockID
   575  func (_m *API) GetProtocolStateSnapshotByBlockID(ctx context.Context, blockID flow.Identifier) ([]byte, error) {
   576  	ret := _m.Called(ctx, blockID)
   577  
   578  	var r0 []byte
   579  	var r1 error
   580  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) ([]byte, error)); ok {
   581  		return rf(ctx, blockID)
   582  	}
   583  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) []byte); ok {
   584  		r0 = rf(ctx, blockID)
   585  	} else {
   586  		if ret.Get(0) != nil {
   587  			r0 = ret.Get(0).([]byte)
   588  		}
   589  	}
   590  
   591  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
   592  		r1 = rf(ctx, blockID)
   593  	} else {
   594  		r1 = ret.Error(1)
   595  	}
   596  
   597  	return r0, r1
   598  }
   599  
   600  // GetProtocolStateSnapshotByHeight provides a mock function with given fields: ctx, blockHeight
   601  func (_m *API) GetProtocolStateSnapshotByHeight(ctx context.Context, blockHeight uint64) ([]byte, error) {
   602  	ret := _m.Called(ctx, blockHeight)
   603  
   604  	var r0 []byte
   605  	var r1 error
   606  	if rf, ok := ret.Get(0).(func(context.Context, uint64) ([]byte, error)); ok {
   607  		return rf(ctx, blockHeight)
   608  	}
   609  	if rf, ok := ret.Get(0).(func(context.Context, uint64) []byte); ok {
   610  		r0 = rf(ctx, blockHeight)
   611  	} else {
   612  		if ret.Get(0) != nil {
   613  			r0 = ret.Get(0).([]byte)
   614  		}
   615  	}
   616  
   617  	if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok {
   618  		r1 = rf(ctx, blockHeight)
   619  	} else {
   620  		r1 = ret.Error(1)
   621  	}
   622  
   623  	return r0, r1
   624  }
   625  
   626  // GetSystemTransaction provides a mock function with given fields: ctx, blockID
   627  func (_m *API) GetSystemTransaction(ctx context.Context, blockID flow.Identifier) (*flow.TransactionBody, error) {
   628  	ret := _m.Called(ctx, blockID)
   629  
   630  	var r0 *flow.TransactionBody
   631  	var r1 error
   632  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.TransactionBody, error)); ok {
   633  		return rf(ctx, blockID)
   634  	}
   635  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.TransactionBody); ok {
   636  		r0 = rf(ctx, blockID)
   637  	} else {
   638  		if ret.Get(0) != nil {
   639  			r0 = ret.Get(0).(*flow.TransactionBody)
   640  		}
   641  	}
   642  
   643  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
   644  		r1 = rf(ctx, blockID)
   645  	} else {
   646  		r1 = ret.Error(1)
   647  	}
   648  
   649  	return r0, r1
   650  }
   651  
   652  // GetSystemTransactionResult provides a mock function with given fields: ctx, blockID, requiredEventEncodingVersion
   653  func (_m *API) GetSystemTransactionResult(ctx context.Context, blockID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion) (*access.TransactionResult, error) {
   654  	ret := _m.Called(ctx, blockID, requiredEventEncodingVersion)
   655  
   656  	var r0 *access.TransactionResult
   657  	var r1 error
   658  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, entities.EventEncodingVersion) (*access.TransactionResult, error)); ok {
   659  		return rf(ctx, blockID, requiredEventEncodingVersion)
   660  	}
   661  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, entities.EventEncodingVersion) *access.TransactionResult); ok {
   662  		r0 = rf(ctx, blockID, requiredEventEncodingVersion)
   663  	} else {
   664  		if ret.Get(0) != nil {
   665  			r0 = ret.Get(0).(*access.TransactionResult)
   666  		}
   667  	}
   668  
   669  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, entities.EventEncodingVersion) error); ok {
   670  		r1 = rf(ctx, blockID, requiredEventEncodingVersion)
   671  	} else {
   672  		r1 = ret.Error(1)
   673  	}
   674  
   675  	return r0, r1
   676  }
   677  
   678  // GetTransaction provides a mock function with given fields: ctx, id
   679  func (_m *API) GetTransaction(ctx context.Context, id flow.Identifier) (*flow.TransactionBody, error) {
   680  	ret := _m.Called(ctx, id)
   681  
   682  	var r0 *flow.TransactionBody
   683  	var r1 error
   684  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.TransactionBody, error)); ok {
   685  		return rf(ctx, id)
   686  	}
   687  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.TransactionBody); ok {
   688  		r0 = rf(ctx, id)
   689  	} else {
   690  		if ret.Get(0) != nil {
   691  			r0 = ret.Get(0).(*flow.TransactionBody)
   692  		}
   693  	}
   694  
   695  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
   696  		r1 = rf(ctx, id)
   697  	} else {
   698  		r1 = ret.Error(1)
   699  	}
   700  
   701  	return r0, r1
   702  }
   703  
   704  // GetTransactionResult provides a mock function with given fields: ctx, id, blockID, collectionID, requiredEventEncodingVersion
   705  func (_m *API) GetTransactionResult(ctx context.Context, id flow.Identifier, blockID flow.Identifier, collectionID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion) (*access.TransactionResult, error) {
   706  	ret := _m.Called(ctx, id, blockID, collectionID, requiredEventEncodingVersion)
   707  
   708  	var r0 *access.TransactionResult
   709  	var r1 error
   710  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.Identifier, flow.Identifier, entities.EventEncodingVersion) (*access.TransactionResult, error)); ok {
   711  		return rf(ctx, id, blockID, collectionID, requiredEventEncodingVersion)
   712  	}
   713  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.Identifier, flow.Identifier, entities.EventEncodingVersion) *access.TransactionResult); ok {
   714  		r0 = rf(ctx, id, blockID, collectionID, requiredEventEncodingVersion)
   715  	} else {
   716  		if ret.Get(0) != nil {
   717  			r0 = ret.Get(0).(*access.TransactionResult)
   718  		}
   719  	}
   720  
   721  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, flow.Identifier, flow.Identifier, entities.EventEncodingVersion) error); ok {
   722  		r1 = rf(ctx, id, blockID, collectionID, requiredEventEncodingVersion)
   723  	} else {
   724  		r1 = ret.Error(1)
   725  	}
   726  
   727  	return r0, r1
   728  }
   729  
   730  // GetTransactionResultByIndex provides a mock function with given fields: ctx, blockID, index, requiredEventEncodingVersion
   731  func (_m *API) GetTransactionResultByIndex(ctx context.Context, blockID flow.Identifier, index uint32, requiredEventEncodingVersion entities.EventEncodingVersion) (*access.TransactionResult, error) {
   732  	ret := _m.Called(ctx, blockID, index, requiredEventEncodingVersion)
   733  
   734  	var r0 *access.TransactionResult
   735  	var r1 error
   736  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, uint32, entities.EventEncodingVersion) (*access.TransactionResult, error)); ok {
   737  		return rf(ctx, blockID, index, requiredEventEncodingVersion)
   738  	}
   739  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, uint32, entities.EventEncodingVersion) *access.TransactionResult); ok {
   740  		r0 = rf(ctx, blockID, index, requiredEventEncodingVersion)
   741  	} else {
   742  		if ret.Get(0) != nil {
   743  			r0 = ret.Get(0).(*access.TransactionResult)
   744  		}
   745  	}
   746  
   747  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, uint32, entities.EventEncodingVersion) error); ok {
   748  		r1 = rf(ctx, blockID, index, requiredEventEncodingVersion)
   749  	} else {
   750  		r1 = ret.Error(1)
   751  	}
   752  
   753  	return r0, r1
   754  }
   755  
   756  // GetTransactionResultsByBlockID provides a mock function with given fields: ctx, blockID, requiredEventEncodingVersion
   757  func (_m *API) GetTransactionResultsByBlockID(ctx context.Context, blockID flow.Identifier, requiredEventEncodingVersion entities.EventEncodingVersion) ([]*access.TransactionResult, error) {
   758  	ret := _m.Called(ctx, blockID, requiredEventEncodingVersion)
   759  
   760  	var r0 []*access.TransactionResult
   761  	var r1 error
   762  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, entities.EventEncodingVersion) ([]*access.TransactionResult, error)); ok {
   763  		return rf(ctx, blockID, requiredEventEncodingVersion)
   764  	}
   765  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, entities.EventEncodingVersion) []*access.TransactionResult); ok {
   766  		r0 = rf(ctx, blockID, requiredEventEncodingVersion)
   767  	} else {
   768  		if ret.Get(0) != nil {
   769  			r0 = ret.Get(0).([]*access.TransactionResult)
   770  		}
   771  	}
   772  
   773  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, entities.EventEncodingVersion) error); ok {
   774  		r1 = rf(ctx, blockID, requiredEventEncodingVersion)
   775  	} else {
   776  		r1 = ret.Error(1)
   777  	}
   778  
   779  	return r0, r1
   780  }
   781  
   782  // GetTransactionsByBlockID provides a mock function with given fields: ctx, blockID
   783  func (_m *API) GetTransactionsByBlockID(ctx context.Context, blockID flow.Identifier) ([]*flow.TransactionBody, error) {
   784  	ret := _m.Called(ctx, blockID)
   785  
   786  	var r0 []*flow.TransactionBody
   787  	var r1 error
   788  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) ([]*flow.TransactionBody, error)); ok {
   789  		return rf(ctx, blockID)
   790  	}
   791  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) []*flow.TransactionBody); ok {
   792  		r0 = rf(ctx, blockID)
   793  	} else {
   794  		if ret.Get(0) != nil {
   795  			r0 = ret.Get(0).([]*flow.TransactionBody)
   796  		}
   797  	}
   798  
   799  	if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
   800  		r1 = rf(ctx, blockID)
   801  	} else {
   802  		r1 = ret.Error(1)
   803  	}
   804  
   805  	return r0, r1
   806  }
   807  
   808  // Ping provides a mock function with given fields: ctx
   809  func (_m *API) Ping(ctx context.Context) error {
   810  	ret := _m.Called(ctx)
   811  
   812  	var r0 error
   813  	if rf, ok := ret.Get(0).(func(context.Context) error); ok {
   814  		r0 = rf(ctx)
   815  	} else {
   816  		r0 = ret.Error(0)
   817  	}
   818  
   819  	return r0
   820  }
   821  
   822  // SendTransaction provides a mock function with given fields: ctx, tx
   823  func (_m *API) SendTransaction(ctx context.Context, tx *flow.TransactionBody) error {
   824  	ret := _m.Called(ctx, tx)
   825  
   826  	var r0 error
   827  	if rf, ok := ret.Get(0).(func(context.Context, *flow.TransactionBody) error); ok {
   828  		r0 = rf(ctx, tx)
   829  	} else {
   830  		r0 = ret.Error(0)
   831  	}
   832  
   833  	return r0
   834  }
   835  
   836  // SubscribeBlockDigestsFromLatest provides a mock function with given fields: ctx, blockStatus
   837  func (_m *API) SubscribeBlockDigestsFromLatest(ctx context.Context, blockStatus flow.BlockStatus) subscription.Subscription {
   838  	ret := _m.Called(ctx, blockStatus)
   839  
   840  	var r0 subscription.Subscription
   841  	if rf, ok := ret.Get(0).(func(context.Context, flow.BlockStatus) subscription.Subscription); ok {
   842  		r0 = rf(ctx, blockStatus)
   843  	} else {
   844  		if ret.Get(0) != nil {
   845  			r0 = ret.Get(0).(subscription.Subscription)
   846  		}
   847  	}
   848  
   849  	return r0
   850  }
   851  
   852  // SubscribeBlockDigestsFromStartBlockID provides a mock function with given fields: ctx, startBlockID, blockStatus
   853  func (_m *API) SubscribeBlockDigestsFromStartBlockID(ctx context.Context, startBlockID flow.Identifier, blockStatus flow.BlockStatus) subscription.Subscription {
   854  	ret := _m.Called(ctx, startBlockID, blockStatus)
   855  
   856  	var r0 subscription.Subscription
   857  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.BlockStatus) subscription.Subscription); ok {
   858  		r0 = rf(ctx, startBlockID, blockStatus)
   859  	} else {
   860  		if ret.Get(0) != nil {
   861  			r0 = ret.Get(0).(subscription.Subscription)
   862  		}
   863  	}
   864  
   865  	return r0
   866  }
   867  
   868  // SubscribeBlockDigestsFromStartHeight provides a mock function with given fields: ctx, startHeight, blockStatus
   869  func (_m *API) SubscribeBlockDigestsFromStartHeight(ctx context.Context, startHeight uint64, blockStatus flow.BlockStatus) subscription.Subscription {
   870  	ret := _m.Called(ctx, startHeight, blockStatus)
   871  
   872  	var r0 subscription.Subscription
   873  	if rf, ok := ret.Get(0).(func(context.Context, uint64, flow.BlockStatus) subscription.Subscription); ok {
   874  		r0 = rf(ctx, startHeight, blockStatus)
   875  	} else {
   876  		if ret.Get(0) != nil {
   877  			r0 = ret.Get(0).(subscription.Subscription)
   878  		}
   879  	}
   880  
   881  	return r0
   882  }
   883  
   884  // SubscribeBlockHeadersFromLatest provides a mock function with given fields: ctx, blockStatus
   885  func (_m *API) SubscribeBlockHeadersFromLatest(ctx context.Context, blockStatus flow.BlockStatus) subscription.Subscription {
   886  	ret := _m.Called(ctx, blockStatus)
   887  
   888  	var r0 subscription.Subscription
   889  	if rf, ok := ret.Get(0).(func(context.Context, flow.BlockStatus) subscription.Subscription); ok {
   890  		r0 = rf(ctx, blockStatus)
   891  	} else {
   892  		if ret.Get(0) != nil {
   893  			r0 = ret.Get(0).(subscription.Subscription)
   894  		}
   895  	}
   896  
   897  	return r0
   898  }
   899  
   900  // SubscribeBlockHeadersFromStartBlockID provides a mock function with given fields: ctx, startBlockID, blockStatus
   901  func (_m *API) SubscribeBlockHeadersFromStartBlockID(ctx context.Context, startBlockID flow.Identifier, blockStatus flow.BlockStatus) subscription.Subscription {
   902  	ret := _m.Called(ctx, startBlockID, blockStatus)
   903  
   904  	var r0 subscription.Subscription
   905  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.BlockStatus) subscription.Subscription); ok {
   906  		r0 = rf(ctx, startBlockID, blockStatus)
   907  	} else {
   908  		if ret.Get(0) != nil {
   909  			r0 = ret.Get(0).(subscription.Subscription)
   910  		}
   911  	}
   912  
   913  	return r0
   914  }
   915  
   916  // SubscribeBlockHeadersFromStartHeight provides a mock function with given fields: ctx, startHeight, blockStatus
   917  func (_m *API) SubscribeBlockHeadersFromStartHeight(ctx context.Context, startHeight uint64, blockStatus flow.BlockStatus) subscription.Subscription {
   918  	ret := _m.Called(ctx, startHeight, blockStatus)
   919  
   920  	var r0 subscription.Subscription
   921  	if rf, ok := ret.Get(0).(func(context.Context, uint64, flow.BlockStatus) subscription.Subscription); ok {
   922  		r0 = rf(ctx, startHeight, blockStatus)
   923  	} else {
   924  		if ret.Get(0) != nil {
   925  			r0 = ret.Get(0).(subscription.Subscription)
   926  		}
   927  	}
   928  
   929  	return r0
   930  }
   931  
   932  // SubscribeBlocksFromLatest provides a mock function with given fields: ctx, blockStatus
   933  func (_m *API) SubscribeBlocksFromLatest(ctx context.Context, blockStatus flow.BlockStatus) subscription.Subscription {
   934  	ret := _m.Called(ctx, blockStatus)
   935  
   936  	var r0 subscription.Subscription
   937  	if rf, ok := ret.Get(0).(func(context.Context, flow.BlockStatus) subscription.Subscription); ok {
   938  		r0 = rf(ctx, blockStatus)
   939  	} else {
   940  		if ret.Get(0) != nil {
   941  			r0 = ret.Get(0).(subscription.Subscription)
   942  		}
   943  	}
   944  
   945  	return r0
   946  }
   947  
   948  // SubscribeBlocksFromStartBlockID provides a mock function with given fields: ctx, startBlockID, blockStatus
   949  func (_m *API) SubscribeBlocksFromStartBlockID(ctx context.Context, startBlockID flow.Identifier, blockStatus flow.BlockStatus) subscription.Subscription {
   950  	ret := _m.Called(ctx, startBlockID, blockStatus)
   951  
   952  	var r0 subscription.Subscription
   953  	if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, flow.BlockStatus) subscription.Subscription); ok {
   954  		r0 = rf(ctx, startBlockID, blockStatus)
   955  	} else {
   956  		if ret.Get(0) != nil {
   957  			r0 = ret.Get(0).(subscription.Subscription)
   958  		}
   959  	}
   960  
   961  	return r0
   962  }
   963  
   964  // SubscribeBlocksFromStartHeight provides a mock function with given fields: ctx, startHeight, blockStatus
   965  func (_m *API) SubscribeBlocksFromStartHeight(ctx context.Context, startHeight uint64, blockStatus flow.BlockStatus) subscription.Subscription {
   966  	ret := _m.Called(ctx, startHeight, blockStatus)
   967  
   968  	var r0 subscription.Subscription
   969  	if rf, ok := ret.Get(0).(func(context.Context, uint64, flow.BlockStatus) subscription.Subscription); ok {
   970  		r0 = rf(ctx, startHeight, blockStatus)
   971  	} else {
   972  		if ret.Get(0) != nil {
   973  			r0 = ret.Get(0).(subscription.Subscription)
   974  		}
   975  	}
   976  
   977  	return r0
   978  }
   979  
   980  // SubscribeTransactionStatuses provides a mock function with given fields: ctx, tx, requiredEventEncodingVersion
   981  func (_m *API) SubscribeTransactionStatuses(ctx context.Context, tx *flow.TransactionBody, requiredEventEncodingVersion entities.EventEncodingVersion) subscription.Subscription {
   982  	ret := _m.Called(ctx, tx, requiredEventEncodingVersion)
   983  
   984  	var r0 subscription.Subscription
   985  	if rf, ok := ret.Get(0).(func(context.Context, *flow.TransactionBody, entities.EventEncodingVersion) subscription.Subscription); ok {
   986  		r0 = rf(ctx, tx, requiredEventEncodingVersion)
   987  	} else {
   988  		if ret.Get(0) != nil {
   989  			r0 = ret.Get(0).(subscription.Subscription)
   990  		}
   991  	}
   992  
   993  	return r0
   994  }
   995  
   996  type mockConstructorTestingTNewAPI interface {
   997  	mock.TestingT
   998  	Cleanup(func())
   999  }
  1000  
  1001  // NewAPI creates a new instance of API. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
  1002  func NewAPI(t mockConstructorTestingTNewAPI) *API {
  1003  	mock := &API{}
  1004  	mock.Mock.Test(t)
  1005  
  1006  	t.Cleanup(func() { mock.AssertExpectations(t) })
  1007  
  1008  	return mock
  1009  }