diff --git a/adapters/sdk.go b/adapters/sdk.go index 0066e756..a029be43 100644 --- a/adapters/sdk.go +++ b/adapters/sdk.go @@ -24,7 +24,7 @@ import ( "github.com/onflow/cadence" jsoncdc "github.com/onflow/cadence/encoding/json" - "github.com/onflow/cadence/runtime/stdlib" + "github.com/onflow/cadence/stdlib" sdk "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go-sdk/templates" "github.com/onflow/flow-go/access" diff --git a/emulator/blockchain.go b/emulator/blockchain.go index 40afb8bf..2218c92c 100644 --- a/emulator/blockchain.go +++ b/emulator/blockchain.go @@ -41,9 +41,9 @@ import ( "github.com/logrusorgru/aurora" "github.com/onflow/cadence" + "github.com/onflow/cadence/common" + "github.com/onflow/cadence/interpreter" "github.com/onflow/cadence/runtime" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/cadence/runtime/interpreter" "github.com/onflow/crypto" "github.com/onflow/crypto/hash" "github.com/onflow/flow-core-contracts/lib/go/templates" diff --git a/emulator/blockchain_test.go b/emulator/blockchain_test.go index 43373920..05a9edf0 100644 --- a/emulator/blockchain_test.go +++ b/emulator/blockchain_test.go @@ -23,7 +23,7 @@ import ( "fmt" "testing" - "github.com/onflow/cadence/runtime/stdlib" + "github.com/onflow/cadence/stdlib" "github.com/rs/zerolog" "github.com/onflow/flow-emulator/adapters" diff --git a/emulator/computation_report.go b/emulator/computation_report.go index 16774c6f..a3077ff2 100644 --- a/emulator/computation_report.go +++ b/emulator/computation_report.go @@ -19,7 +19,7 @@ package emulator import ( - "github.com/onflow/cadence/runtime/common" + "github.com/onflow/cadence/common" "github.com/onflow/flow-go/fvm/environment" "github.com/onflow/flow-go/fvm/meter" diff --git a/emulator/computation_report_test.go b/emulator/computation_report_test.go index bc03a2e2..b578ac5e 100644 --- a/emulator/computation_report_test.go +++ b/emulator/computation_report_test.go @@ -20,10 +20,11 @@ package emulator_test import ( "context" - "github.com/onflow/cadence/runtime/common" + "testing" + + "github.com/onflow/cadence/common" "github.com/onflow/flow-go/fvm/environment" "github.com/onflow/flow-go/fvm/meter" - "testing" "github.com/onflow/cadence" flowsdk "github.com/onflow/flow-go-sdk" diff --git a/emulator/coverage_report_test.go b/emulator/coverage_report_test.go index 0d00fd02..7cbfee34 100644 --- a/emulator/coverage_report_test.go +++ b/emulator/coverage_report_test.go @@ -23,8 +23,8 @@ import ( "testing" "github.com/onflow/cadence" + "github.com/onflow/cadence/common" "github.com/onflow/cadence/runtime" - "github.com/onflow/cadence/runtime/common" flowsdk "github.com/onflow/flow-go-sdk" flowgo "github.com/onflow/flow-go/model/flow" "github.com/rs/zerolog" diff --git a/emulator/coverage_reported_runtime.go b/emulator/coverage_reported_runtime.go index fb6819da..98c12035 100644 --- a/emulator/coverage_reported_runtime.go +++ b/emulator/coverage_reported_runtime.go @@ -20,10 +20,10 @@ package emulator import ( "github.com/onflow/cadence" + "github.com/onflow/cadence/common" + "github.com/onflow/cadence/interpreter" "github.com/onflow/cadence/runtime" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/cadence/runtime/interpreter" - "github.com/onflow/cadence/runtime/sema" + "github.com/onflow/cadence/sema" ) type CoverageReportedRuntime struct { diff --git a/emulator/emulator.go b/emulator/emulator.go index f01fe60a..0b3db73d 100644 --- a/emulator/emulator.go +++ b/emulator/emulator.go @@ -21,9 +21,9 @@ package emulator import ( "fmt" + "github.com/onflow/cadence/common" + "github.com/onflow/cadence/interpreter" "github.com/onflow/cadence/runtime" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/cadence/runtime/interpreter" flowgosdk "github.com/onflow/flow-go-sdk" sdkcrypto "github.com/onflow/flow-go-sdk/crypto" "github.com/onflow/flow-go/access" diff --git a/emulator/events_test.go b/emulator/events_test.go index e7037bda..4f626ff3 100644 --- a/emulator/events_test.go +++ b/emulator/events_test.go @@ -28,7 +28,7 @@ import ( "github.com/onflow/flow-emulator/adapters" "github.com/onflow/flow-emulator/emulator" - "github.com/onflow/cadence/runtime/common" + "github.com/onflow/cadence/common" "github.com/onflow/flow-go-sdk/templates" flowgo "github.com/onflow/flow-go/model/flow" "github.com/stretchr/testify/assert" diff --git a/emulator/mocks/emulator.go b/emulator/mocks/emulator.go index 7d8891f6..da986bf9 100644 --- a/emulator/mocks/emulator.go +++ b/emulator/mocks/emulator.go @@ -12,9 +12,9 @@ package mocks import ( reflect "reflect" + common "github.com/onflow/cadence/common" + interpreter "github.com/onflow/cadence/interpreter" runtime "github.com/onflow/cadence/runtime" - common "github.com/onflow/cadence/runtime/common" - interpreter "github.com/onflow/cadence/runtime/interpreter" emulator "github.com/onflow/flow-emulator/emulator" types "github.com/onflow/flow-emulator/types" access "github.com/onflow/flow-go/access" @@ -26,6 +26,7 @@ import ( type MockEmulator struct { ctrl *gomock.Controller recorder *MockEmulatorMockRecorder + isgomock struct{} } // MockEmulatorMockRecorder is the mock recorder for MockEmulator. @@ -46,17 +47,17 @@ func (m *MockEmulator) EXPECT() *MockEmulatorMockRecorder { } // AddTransaction mocks base method. -func (m *MockEmulator) AddTransaction(arg0 flow.TransactionBody) error { +func (m *MockEmulator) AddTransaction(tx flow.TransactionBody) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddTransaction", arg0) + ret := m.ctrl.Call(m, "AddTransaction", tx) ret0, _ := ret[0].(error) return ret0 } // AddTransaction indicates an expected call of AddTransaction. -func (mr *MockEmulatorMockRecorder) AddTransaction(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) AddTransaction(tx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTransaction", reflect.TypeOf((*MockEmulator)(nil).AddTransaction), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTransaction", reflect.TypeOf((*MockEmulator)(nil).AddTransaction), tx) } // CommitBlock mocks base method. @@ -103,17 +104,17 @@ func (mr *MockEmulatorMockRecorder) CoverageReport() *gomock.Call { } // CreateSnapshot mocks base method. -func (m *MockEmulator) CreateSnapshot(arg0 string) error { +func (m *MockEmulator) CreateSnapshot(name string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateSnapshot", arg0) + ret := m.ctrl.Call(m, "CreateSnapshot", name) ret0, _ := ret[0].(error) return ret0 } // CreateSnapshot indicates an expected call of CreateSnapshot. -func (mr *MockEmulatorMockRecorder) CreateSnapshot(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) CreateSnapshot(name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSnapshot", reflect.TypeOf((*MockEmulator)(nil).CreateSnapshot), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSnapshot", reflect.TypeOf((*MockEmulator)(nil).CreateSnapshot), name) } // DisableAutoMine mocks base method. @@ -199,78 +200,78 @@ func (mr *MockEmulatorMockRecorder) ExecuteNextTransaction() *gomock.Call { } // ExecuteScript mocks base method. -func (m *MockEmulator) ExecuteScript(arg0 []byte, arg1 [][]byte) (*types.ScriptResult, error) { +func (m *MockEmulator) ExecuteScript(script []byte, arguments [][]byte) (*types.ScriptResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExecuteScript", arg0, arg1) + ret := m.ctrl.Call(m, "ExecuteScript", script, arguments) ret0, _ := ret[0].(*types.ScriptResult) ret1, _ := ret[1].(error) return ret0, ret1 } // ExecuteScript indicates an expected call of ExecuteScript. -func (mr *MockEmulatorMockRecorder) ExecuteScript(arg0, arg1 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) ExecuteScript(script, arguments any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScript", reflect.TypeOf((*MockEmulator)(nil).ExecuteScript), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScript", reflect.TypeOf((*MockEmulator)(nil).ExecuteScript), script, arguments) } // ExecuteScriptAtBlockHeight mocks base method. -func (m *MockEmulator) ExecuteScriptAtBlockHeight(arg0 []byte, arg1 [][]byte, arg2 uint64) (*types.ScriptResult, error) { +func (m *MockEmulator) ExecuteScriptAtBlockHeight(script []byte, arguments [][]byte, blockHeight uint64) (*types.ScriptResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExecuteScriptAtBlockHeight", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ExecuteScriptAtBlockHeight", script, arguments, blockHeight) ret0, _ := ret[0].(*types.ScriptResult) ret1, _ := ret[1].(error) return ret0, ret1 } // ExecuteScriptAtBlockHeight indicates an expected call of ExecuteScriptAtBlockHeight. -func (mr *MockEmulatorMockRecorder) ExecuteScriptAtBlockHeight(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) ExecuteScriptAtBlockHeight(script, arguments, blockHeight any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScriptAtBlockHeight", reflect.TypeOf((*MockEmulator)(nil).ExecuteScriptAtBlockHeight), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScriptAtBlockHeight", reflect.TypeOf((*MockEmulator)(nil).ExecuteScriptAtBlockHeight), script, arguments, blockHeight) } // ExecuteScriptAtBlockID mocks base method. -func (m *MockEmulator) ExecuteScriptAtBlockID(arg0 []byte, arg1 [][]byte, arg2 flow.Identifier) (*types.ScriptResult, error) { +func (m *MockEmulator) ExecuteScriptAtBlockID(script []byte, arguments [][]byte, id flow.Identifier) (*types.ScriptResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ExecuteScriptAtBlockID", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ExecuteScriptAtBlockID", script, arguments, id) ret0, _ := ret[0].(*types.ScriptResult) ret1, _ := ret[1].(error) return ret0, ret1 } // ExecuteScriptAtBlockID indicates an expected call of ExecuteScriptAtBlockID. -func (mr *MockEmulatorMockRecorder) ExecuteScriptAtBlockID(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) ExecuteScriptAtBlockID(script, arguments, id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScriptAtBlockID", reflect.TypeOf((*MockEmulator)(nil).ExecuteScriptAtBlockID), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScriptAtBlockID", reflect.TypeOf((*MockEmulator)(nil).ExecuteScriptAtBlockID), script, arguments, id) } // GetAccount mocks base method. -func (m *MockEmulator) GetAccount(arg0 flow.Address) (*flow.Account, error) { +func (m *MockEmulator) GetAccount(address flow.Address) (*flow.Account, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccount", arg0) + ret := m.ctrl.Call(m, "GetAccount", address) ret0, _ := ret[0].(*flow.Account) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAccount indicates an expected call of GetAccount. -func (mr *MockEmulatorMockRecorder) GetAccount(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetAccount(address any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockEmulator)(nil).GetAccount), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockEmulator)(nil).GetAccount), address) } // GetAccountAtBlockHeight mocks base method. -func (m *MockEmulator) GetAccountAtBlockHeight(arg0 flow.Address, arg1 uint64) (*flow.Account, error) { +func (m *MockEmulator) GetAccountAtBlockHeight(address flow.Address, blockHeight uint64) (*flow.Account, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccountAtBlockHeight", arg0, arg1) + ret := m.ctrl.Call(m, "GetAccountAtBlockHeight", address, blockHeight) ret0, _ := ret[0].(*flow.Account) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAccountAtBlockHeight indicates an expected call of GetAccountAtBlockHeight. -func (mr *MockEmulatorMockRecorder) GetAccountAtBlockHeight(arg0, arg1 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetAccountAtBlockHeight(address, blockHeight any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountAtBlockHeight", reflect.TypeOf((*MockEmulator)(nil).GetAccountAtBlockHeight), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountAtBlockHeight", reflect.TypeOf((*MockEmulator)(nil).GetAccountAtBlockHeight), address, blockHeight) } // GetAccountByIndex mocks base method. @@ -289,123 +290,123 @@ func (mr *MockEmulatorMockRecorder) GetAccountByIndex(arg0 any) *gomock.Call { } // GetAccountUnsafe mocks base method. -func (m *MockEmulator) GetAccountUnsafe(arg0 flow.Address) (*flow.Account, error) { +func (m *MockEmulator) GetAccountUnsafe(address flow.Address) (*flow.Account, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccountUnsafe", arg0) + ret := m.ctrl.Call(m, "GetAccountUnsafe", address) ret0, _ := ret[0].(*flow.Account) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAccountUnsafe indicates an expected call of GetAccountUnsafe. -func (mr *MockEmulatorMockRecorder) GetAccountUnsafe(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetAccountUnsafe(address any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountUnsafe", reflect.TypeOf((*MockEmulator)(nil).GetAccountUnsafe), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountUnsafe", reflect.TypeOf((*MockEmulator)(nil).GetAccountUnsafe), address) } // GetBlockByHeight mocks base method. -func (m *MockEmulator) GetBlockByHeight(arg0 uint64) (*flow.Block, error) { +func (m *MockEmulator) GetBlockByHeight(height uint64) (*flow.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBlockByHeight", arg0) + ret := m.ctrl.Call(m, "GetBlockByHeight", height) ret0, _ := ret[0].(*flow.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetBlockByHeight indicates an expected call of GetBlockByHeight. -func (mr *MockEmulatorMockRecorder) GetBlockByHeight(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetBlockByHeight(height any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockByHeight", reflect.TypeOf((*MockEmulator)(nil).GetBlockByHeight), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockByHeight", reflect.TypeOf((*MockEmulator)(nil).GetBlockByHeight), height) } // GetBlockByID mocks base method. -func (m *MockEmulator) GetBlockByID(arg0 flow.Identifier) (*flow.Block, error) { +func (m *MockEmulator) GetBlockByID(id flow.Identifier) (*flow.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBlockByID", arg0) + ret := m.ctrl.Call(m, "GetBlockByID", id) ret0, _ := ret[0].(*flow.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetBlockByID indicates an expected call of GetBlockByID. -func (mr *MockEmulatorMockRecorder) GetBlockByID(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetBlockByID(id any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockByID", reflect.TypeOf((*MockEmulator)(nil).GetBlockByID), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockByID", reflect.TypeOf((*MockEmulator)(nil).GetBlockByID), id) } // GetCollectionByID mocks base method. -func (m *MockEmulator) GetCollectionByID(arg0 flow.Identifier) (*flow.LightCollection, error) { +func (m *MockEmulator) GetCollectionByID(colID flow.Identifier) (*flow.LightCollection, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCollectionByID", arg0) + ret := m.ctrl.Call(m, "GetCollectionByID", colID) ret0, _ := ret[0].(*flow.LightCollection) ret1, _ := ret[1].(error) return ret0, ret1 } // GetCollectionByID indicates an expected call of GetCollectionByID. -func (mr *MockEmulatorMockRecorder) GetCollectionByID(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetCollectionByID(colID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCollectionByID", reflect.TypeOf((*MockEmulator)(nil).GetCollectionByID), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCollectionByID", reflect.TypeOf((*MockEmulator)(nil).GetCollectionByID), colID) } // GetEventsByHeight mocks base method. -func (m *MockEmulator) GetEventsByHeight(arg0 uint64, arg1 string) ([]flow.Event, error) { +func (m *MockEmulator) GetEventsByHeight(blockHeight uint64, eventType string) ([]flow.Event, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetEventsByHeight", arg0, arg1) + ret := m.ctrl.Call(m, "GetEventsByHeight", blockHeight, eventType) ret0, _ := ret[0].([]flow.Event) ret1, _ := ret[1].(error) return ret0, ret1 } // GetEventsByHeight indicates an expected call of GetEventsByHeight. -func (mr *MockEmulatorMockRecorder) GetEventsByHeight(arg0, arg1 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetEventsByHeight(blockHeight, eventType any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsByHeight", reflect.TypeOf((*MockEmulator)(nil).GetEventsByHeight), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsByHeight", reflect.TypeOf((*MockEmulator)(nil).GetEventsByHeight), blockHeight, eventType) } // GetEventsForBlockIDs mocks base method. -func (m *MockEmulator) GetEventsForBlockIDs(arg0 string, arg1 []flow.Identifier) ([]flow.BlockEvents, error) { +func (m *MockEmulator) GetEventsForBlockIDs(eventType string, blockIDs []flow.Identifier) ([]flow.BlockEvents, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetEventsForBlockIDs", arg0, arg1) + ret := m.ctrl.Call(m, "GetEventsForBlockIDs", eventType, blockIDs) ret0, _ := ret[0].([]flow.BlockEvents) ret1, _ := ret[1].(error) return ret0, ret1 } // GetEventsForBlockIDs indicates an expected call of GetEventsForBlockIDs. -func (mr *MockEmulatorMockRecorder) GetEventsForBlockIDs(arg0, arg1 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetEventsForBlockIDs(eventType, blockIDs any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsForBlockIDs", reflect.TypeOf((*MockEmulator)(nil).GetEventsForBlockIDs), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsForBlockIDs", reflect.TypeOf((*MockEmulator)(nil).GetEventsForBlockIDs), eventType, blockIDs) } // GetEventsForHeightRange mocks base method. -func (m *MockEmulator) GetEventsForHeightRange(arg0 string, arg1, arg2 uint64) ([]flow.BlockEvents, error) { +func (m *MockEmulator) GetEventsForHeightRange(eventType string, startHeight, endHeight uint64) ([]flow.BlockEvents, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetEventsForHeightRange", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetEventsForHeightRange", eventType, startHeight, endHeight) ret0, _ := ret[0].([]flow.BlockEvents) ret1, _ := ret[1].(error) return ret0, ret1 } // GetEventsForHeightRange indicates an expected call of GetEventsForHeightRange. -func (mr *MockEmulatorMockRecorder) GetEventsForHeightRange(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetEventsForHeightRange(eventType, startHeight, endHeight any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsForHeightRange", reflect.TypeOf((*MockEmulator)(nil).GetEventsForHeightRange), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsForHeightRange", reflect.TypeOf((*MockEmulator)(nil).GetEventsForHeightRange), eventType, startHeight, endHeight) } // GetFullCollectionByID mocks base method. -func (m *MockEmulator) GetFullCollectionByID(arg0 flow.Identifier) (*flow.Collection, error) { +func (m *MockEmulator) GetFullCollectionByID(colID flow.Identifier) (*flow.Collection, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetFullCollectionByID", arg0) + ret := m.ctrl.Call(m, "GetFullCollectionByID", colID) ret0, _ := ret[0].(*flow.Collection) ret1, _ := ret[1].(error) return ret0, ret1 } // GetFullCollectionByID indicates an expected call of GetFullCollectionByID. -func (mr *MockEmulatorMockRecorder) GetFullCollectionByID(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetFullCollectionByID(colID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFullCollectionByID", reflect.TypeOf((*MockEmulator)(nil).GetFullCollectionByID), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFullCollectionByID", reflect.TypeOf((*MockEmulator)(nil).GetFullCollectionByID), colID) } // GetLatestBlock mocks base method. @@ -453,91 +454,91 @@ func (mr *MockEmulatorMockRecorder) GetNetworkParameters() *gomock.Call { } // GetSourceFile mocks base method. -func (m *MockEmulator) GetSourceFile(arg0 common.Location) string { +func (m *MockEmulator) GetSourceFile(location common.Location) string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSourceFile", arg0) + ret := m.ctrl.Call(m, "GetSourceFile", location) ret0, _ := ret[0].(string) return ret0 } // GetSourceFile indicates an expected call of GetSourceFile. -func (mr *MockEmulatorMockRecorder) GetSourceFile(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetSourceFile(location any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSourceFile", reflect.TypeOf((*MockEmulator)(nil).GetSourceFile), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSourceFile", reflect.TypeOf((*MockEmulator)(nil).GetSourceFile), location) } // GetTransaction mocks base method. -func (m *MockEmulator) GetTransaction(arg0 flow.Identifier) (*flow.TransactionBody, error) { +func (m *MockEmulator) GetTransaction(txID flow.Identifier) (*flow.TransactionBody, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTransaction", arg0) + ret := m.ctrl.Call(m, "GetTransaction", txID) ret0, _ := ret[0].(*flow.TransactionBody) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTransaction indicates an expected call of GetTransaction. -func (mr *MockEmulatorMockRecorder) GetTransaction(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetTransaction(txID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransaction", reflect.TypeOf((*MockEmulator)(nil).GetTransaction), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransaction", reflect.TypeOf((*MockEmulator)(nil).GetTransaction), txID) } // GetTransactionResult mocks base method. -func (m *MockEmulator) GetTransactionResult(arg0 flow.Identifier) (*access.TransactionResult, error) { +func (m *MockEmulator) GetTransactionResult(txID flow.Identifier) (*access.TransactionResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTransactionResult", arg0) + ret := m.ctrl.Call(m, "GetTransactionResult", txID) ret0, _ := ret[0].(*access.TransactionResult) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTransactionResult indicates an expected call of GetTransactionResult. -func (mr *MockEmulatorMockRecorder) GetTransactionResult(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetTransactionResult(txID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionResult", reflect.TypeOf((*MockEmulator)(nil).GetTransactionResult), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionResult", reflect.TypeOf((*MockEmulator)(nil).GetTransactionResult), txID) } // GetTransactionResultsByBlockID mocks base method. -func (m *MockEmulator) GetTransactionResultsByBlockID(arg0 flow.Identifier) ([]*access.TransactionResult, error) { +func (m *MockEmulator) GetTransactionResultsByBlockID(blockID flow.Identifier) ([]*access.TransactionResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTransactionResultsByBlockID", arg0) + ret := m.ctrl.Call(m, "GetTransactionResultsByBlockID", blockID) ret0, _ := ret[0].([]*access.TransactionResult) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTransactionResultsByBlockID indicates an expected call of GetTransactionResultsByBlockID. -func (mr *MockEmulatorMockRecorder) GetTransactionResultsByBlockID(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetTransactionResultsByBlockID(blockID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionResultsByBlockID", reflect.TypeOf((*MockEmulator)(nil).GetTransactionResultsByBlockID), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionResultsByBlockID", reflect.TypeOf((*MockEmulator)(nil).GetTransactionResultsByBlockID), blockID) } // GetTransactionsByBlockID mocks base method. -func (m *MockEmulator) GetTransactionsByBlockID(arg0 flow.Identifier) ([]*flow.TransactionBody, error) { +func (m *MockEmulator) GetTransactionsByBlockID(blockID flow.Identifier) ([]*flow.TransactionBody, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetTransactionsByBlockID", arg0) + ret := m.ctrl.Call(m, "GetTransactionsByBlockID", blockID) ret0, _ := ret[0].([]*flow.TransactionBody) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTransactionsByBlockID indicates an expected call of GetTransactionsByBlockID. -func (mr *MockEmulatorMockRecorder) GetTransactionsByBlockID(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) GetTransactionsByBlockID(blockID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionsByBlockID", reflect.TypeOf((*MockEmulator)(nil).GetTransactionsByBlockID), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionsByBlockID", reflect.TypeOf((*MockEmulator)(nil).GetTransactionsByBlockID), blockID) } // LoadSnapshot mocks base method. -func (m *MockEmulator) LoadSnapshot(arg0 string) error { +func (m *MockEmulator) LoadSnapshot(name string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LoadSnapshot", arg0) + ret := m.ctrl.Call(m, "LoadSnapshot", name) ret0, _ := ret[0].(error) return ret0 } // LoadSnapshot indicates an expected call of LoadSnapshot. -func (mr *MockEmulatorMockRecorder) LoadSnapshot(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) LoadSnapshot(name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadSnapshot", reflect.TypeOf((*MockEmulator)(nil).LoadSnapshot), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadSnapshot", reflect.TypeOf((*MockEmulator)(nil).LoadSnapshot), name) } // Ping mocks base method. @@ -567,31 +568,31 @@ func (mr *MockEmulatorMockRecorder) ResetCoverageReport() *gomock.Call { } // RollbackToBlockHeight mocks base method. -func (m *MockEmulator) RollbackToBlockHeight(arg0 uint64) error { +func (m *MockEmulator) RollbackToBlockHeight(height uint64) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RollbackToBlockHeight", arg0) + ret := m.ctrl.Call(m, "RollbackToBlockHeight", height) ret0, _ := ret[0].(error) return ret0 } // RollbackToBlockHeight indicates an expected call of RollbackToBlockHeight. -func (mr *MockEmulatorMockRecorder) RollbackToBlockHeight(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) RollbackToBlockHeight(height any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackToBlockHeight", reflect.TypeOf((*MockEmulator)(nil).RollbackToBlockHeight), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackToBlockHeight", reflect.TypeOf((*MockEmulator)(nil).RollbackToBlockHeight), height) } // SendTransaction mocks base method. -func (m *MockEmulator) SendTransaction(arg0 *flow.TransactionBody) error { +func (m *MockEmulator) SendTransaction(tx *flow.TransactionBody) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendTransaction", arg0) + ret := m.ctrl.Call(m, "SendTransaction", tx) ret0, _ := ret[0].(error) return ret0 } // SendTransaction indicates an expected call of SendTransaction. -func (mr *MockEmulatorMockRecorder) SendTransaction(arg0 any) *gomock.Call { +func (mr *MockEmulatorMockRecorder) SendTransaction(tx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTransaction", reflect.TypeOf((*MockEmulator)(nil).SendTransaction), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTransaction", reflect.TypeOf((*MockEmulator)(nil).SendTransaction), tx) } // ServiceKey mocks base method. diff --git a/emulator/pragma.go b/emulator/pragma.go index 71c1d5a9..3abd2789 100644 --- a/emulator/pragma.go +++ b/emulator/pragma.go @@ -19,8 +19,8 @@ package emulator import ( - "github.com/onflow/cadence/runtime/ast" - "github.com/onflow/cadence/runtime/parser" + "github.com/onflow/cadence/ast" + "github.com/onflow/cadence/parser" ) var ( diff --git a/emulator/pragma_test.go b/emulator/pragma_test.go index 6de02746..eb34e12a 100644 --- a/emulator/pragma_test.go +++ b/emulator/pragma_test.go @@ -21,16 +21,18 @@ package emulator_test import ( "context" "encoding/hex" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/flow-emulator/adapters" - "github.com/onflow/flow-emulator/emulator" + "testing" + + "github.com/onflow/cadence/common" flowsdk "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go-sdk/templates" flowgo "github.com/onflow/flow-go/model/flow" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "testing" + + "github.com/onflow/flow-emulator/adapters" + "github.com/onflow/flow-emulator/emulator" ) func TestSourceFilePragmaForScript(t *testing.T) { diff --git a/emulator/transaction_test.go b/emulator/transaction_test.go index 8320b63a..b33a0b39 100644 --- a/emulator/transaction_test.go +++ b/emulator/transaction_test.go @@ -30,8 +30,8 @@ import ( "testing" "github.com/onflow/cadence" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/cadence/runtime/interpreter" + "github.com/onflow/cadence/common" + "github.com/onflow/cadence/interpreter" "github.com/onflow/flow-go-sdk" flowsdk "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go-sdk/crypto" diff --git a/go.mod b/go.mod index 05436f4d..67076c06 100644 --- a/go.mod +++ b/go.mod @@ -14,11 +14,11 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/improbable-eng/grpc-web v0.15.0 github.com/logrusorgru/aurora v2.0.3+incompatible - github.com/onflow/cadence v1.0.0 + github.com/onflow/cadence v1.1.0 github.com/onflow/crypto v0.25.2 github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 - github.com/onflow/flow-go v0.38.0-preview.0.0.20241002124048-21cfe5aea5a8 - github.com/onflow/flow-go-sdk v1.0.0 + github.com/onflow/flow-go v0.38.0-preview.0.0.20241018193026-4b778232480b + github.com/onflow/flow-go-sdk v1.1.0 github.com/onflow/flow-nft/lib/go/contracts v1.2.1 github.com/onflow/flow/protobuf/go/flow v0.4.7 github.com/onflow/nft-storefront/lib/go/contracts v1.0.0 @@ -153,7 +153,7 @@ require ( github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/onflow/atree v0.8.0-rc.6 // indirect + github.com/onflow/atree v0.8.0 // indirect github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 // indirect github.com/onflow/flow-ft/lib/go/contracts v1.0.0 // indirect github.com/onflow/flow-ft/lib/go/templates v1.0.0 // indirect diff --git a/go.sum b/go.sum index ca021e0e..94b55ae2 100644 --- a/go.sum +++ b/go.sum @@ -2043,11 +2043,11 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= -github.com/onflow/atree v0.8.0-rc.6 h1:GWgaylK24b5ta2Hq+TvyOF7X5tZLiLzMMn7lEt59fsA= -github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo= +github.com/onflow/atree v0.8.0 h1:qg5c6J1gVDNObughpEeWm8oxqhPGdEyGrda121GM4u0= +github.com/onflow/atree v0.8.0/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0 h1:bvT75F2LZJvDCBmmajAv7QLISK6Qp30FAKcSwqNNH+o= -github.com/onflow/cadence v1.0.0/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= +github.com/onflow/cadence v1.1.0 h1:wPg86IX1kRv6DWjdETxKa4tv6A3iAwJVzzKAwaGdtDA= +github.com/onflow/cadence v1.1.0/go.mod h1:fJxxOAp1wnWDfOHT8GOc1ypsU0RR5E3z51AhG8Yf5jg= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.2 h1:GjHunqVt+vPcdqhxxhAXiMIF3YiLX7gTuTR5O+VG2ns= github.com/onflow/crypto v0.25.2/go.mod h1:fY7eLqUdMKV8EGOw301unP8h7PvLVy8/6gVR++/g0BY= @@ -2059,11 +2059,11 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/ github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= -github.com/onflow/flow-go v0.38.0-preview.0.0.20241002124048-21cfe5aea5a8 h1:gQcr59aPL9YjsUkgYwcc8ec8h2bw3ttX03553S/aW34= -github.com/onflow/flow-go v0.38.0-preview.0.0.20241002124048-21cfe5aea5a8/go.mod h1:kdaRKWlvm1vC8Lhf2uI4XvDxS+AvfWvrWZr2CFOz8y8= +github.com/onflow/flow-go v0.38.0-preview.0.0.20241018193026-4b778232480b h1:8QsUq9VWL/NCcoG6yJs9NyvQc9DnfqwVCZ568YzR7Bc= +github.com/onflow/flow-go v0.38.0-preview.0.0.20241018193026-4b778232480b/go.mod h1:rT170aspjdZVZaOTx/0dWxPJdEEoOFSjpDEy5C6hmO0= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0 h1:Ha4fQm1MMKsyaqMkQLCN3rA/yaQKG6DGwiIfx06j40c= -github.com/onflow/flow-go-sdk v1.0.0/go.mod h1:iZkW2IWieVUZKK06mQCxpjJzPDgS0VtGpTaP/rKu6J4= +github.com/onflow/flow-go-sdk v1.1.0 h1:DT8P3B3oAicOOXugdev4s1IEKHsiLS9T7MovFcTzB2s= +github.com/onflow/flow-go-sdk v1.1.0/go.mod h1:21g1pqP9Wy8RBXdenNsjzADwbtWNOViUCnfNZwr3trM= github.com/onflow/flow-nft/lib/go/contracts v1.2.1 h1:woAAS5z651sDpi7ihAHll8NvRS9uFXIXkL6xR+bKFZY= github.com/onflow/flow-nft/lib/go/contracts v1.2.1/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= github.com/onflow/flow-nft/lib/go/templates v1.2.0 h1:JSQyh9rg0RC+D1930BiRXN8lrtMs+ubVMK6aQPon6Yc= diff --git a/internal/mocks/access.go b/internal/mocks/access.go index d569f0cf..9ef655e8 100644 --- a/internal/mocks/access.go +++ b/internal/mocks/access.go @@ -22,6 +22,7 @@ import ( type MockAccessAPIClient struct { ctrl *gomock.Controller recorder *MockAccessAPIClientMockRecorder + isgomock struct{} } // MockAccessAPIClientMockRecorder is the mock recorder for MockAccessAPIClient. @@ -42,10 +43,10 @@ func (m *MockAccessAPIClient) EXPECT() *MockAccessAPIClientMockRecorder { } // ExecuteScriptAtBlockHeight mocks base method. -func (m *MockAccessAPIClient) ExecuteScriptAtBlockHeight(arg0 context.Context, arg1 *access.ExecuteScriptAtBlockHeightRequest, arg2 ...grpc.CallOption) (*access.ExecuteScriptResponse, error) { +func (m *MockAccessAPIClient) ExecuteScriptAtBlockHeight(ctx context.Context, in *access.ExecuteScriptAtBlockHeightRequest, opts ...grpc.CallOption) (*access.ExecuteScriptResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "ExecuteScriptAtBlockHeight", varargs...) @@ -55,17 +56,17 @@ func (m *MockAccessAPIClient) ExecuteScriptAtBlockHeight(arg0 context.Context, a } // ExecuteScriptAtBlockHeight indicates an expected call of ExecuteScriptAtBlockHeight. -func (mr *MockAccessAPIClientMockRecorder) ExecuteScriptAtBlockHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) ExecuteScriptAtBlockHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScriptAtBlockHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).ExecuteScriptAtBlockHeight), varargs...) } // ExecuteScriptAtBlockID mocks base method. -func (m *MockAccessAPIClient) ExecuteScriptAtBlockID(arg0 context.Context, arg1 *access.ExecuteScriptAtBlockIDRequest, arg2 ...grpc.CallOption) (*access.ExecuteScriptResponse, error) { +func (m *MockAccessAPIClient) ExecuteScriptAtBlockID(ctx context.Context, in *access.ExecuteScriptAtBlockIDRequest, opts ...grpc.CallOption) (*access.ExecuteScriptResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "ExecuteScriptAtBlockID", varargs...) @@ -75,17 +76,17 @@ func (m *MockAccessAPIClient) ExecuteScriptAtBlockID(arg0 context.Context, arg1 } // ExecuteScriptAtBlockID indicates an expected call of ExecuteScriptAtBlockID. -func (mr *MockAccessAPIClientMockRecorder) ExecuteScriptAtBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) ExecuteScriptAtBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScriptAtBlockID", reflect.TypeOf((*MockAccessAPIClient)(nil).ExecuteScriptAtBlockID), varargs...) } // ExecuteScriptAtLatestBlock mocks base method. -func (m *MockAccessAPIClient) ExecuteScriptAtLatestBlock(arg0 context.Context, arg1 *access.ExecuteScriptAtLatestBlockRequest, arg2 ...grpc.CallOption) (*access.ExecuteScriptResponse, error) { +func (m *MockAccessAPIClient) ExecuteScriptAtLatestBlock(ctx context.Context, in *access.ExecuteScriptAtLatestBlockRequest, opts ...grpc.CallOption) (*access.ExecuteScriptResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "ExecuteScriptAtLatestBlock", varargs...) @@ -95,17 +96,17 @@ func (m *MockAccessAPIClient) ExecuteScriptAtLatestBlock(arg0 context.Context, a } // ExecuteScriptAtLatestBlock indicates an expected call of ExecuteScriptAtLatestBlock. -func (mr *MockAccessAPIClientMockRecorder) ExecuteScriptAtLatestBlock(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) ExecuteScriptAtLatestBlock(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteScriptAtLatestBlock", reflect.TypeOf((*MockAccessAPIClient)(nil).ExecuteScriptAtLatestBlock), varargs...) } // GetAccount mocks base method. -func (m *MockAccessAPIClient) GetAccount(arg0 context.Context, arg1 *access.GetAccountRequest, arg2 ...grpc.CallOption) (*access.GetAccountResponse, error) { +func (m *MockAccessAPIClient) GetAccount(ctx context.Context, in *access.GetAccountRequest, opts ...grpc.CallOption) (*access.GetAccountResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccount", varargs...) @@ -115,17 +116,17 @@ func (m *MockAccessAPIClient) GetAccount(arg0 context.Context, arg1 *access.GetA } // GetAccount indicates an expected call of GetAccount. -func (mr *MockAccessAPIClientMockRecorder) GetAccount(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccount(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccount), varargs...) } // GetAccountAtBlockHeight mocks base method. -func (m *MockAccessAPIClient) GetAccountAtBlockHeight(arg0 context.Context, arg1 *access.GetAccountAtBlockHeightRequest, arg2 ...grpc.CallOption) (*access.AccountResponse, error) { +func (m *MockAccessAPIClient) GetAccountAtBlockHeight(ctx context.Context, in *access.GetAccountAtBlockHeightRequest, opts ...grpc.CallOption) (*access.AccountResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccountAtBlockHeight", varargs...) @@ -135,17 +136,17 @@ func (m *MockAccessAPIClient) GetAccountAtBlockHeight(arg0 context.Context, arg1 } // GetAccountAtBlockHeight indicates an expected call of GetAccountAtBlockHeight. -func (mr *MockAccessAPIClientMockRecorder) GetAccountAtBlockHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccountAtBlockHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountAtBlockHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccountAtBlockHeight), varargs...) } // GetAccountAtLatestBlock mocks base method. -func (m *MockAccessAPIClient) GetAccountAtLatestBlock(arg0 context.Context, arg1 *access.GetAccountAtLatestBlockRequest, arg2 ...grpc.CallOption) (*access.AccountResponse, error) { +func (m *MockAccessAPIClient) GetAccountAtLatestBlock(ctx context.Context, in *access.GetAccountAtLatestBlockRequest, opts ...grpc.CallOption) (*access.AccountResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccountAtLatestBlock", varargs...) @@ -155,17 +156,17 @@ func (m *MockAccessAPIClient) GetAccountAtLatestBlock(arg0 context.Context, arg1 } // GetAccountAtLatestBlock indicates an expected call of GetAccountAtLatestBlock. -func (mr *MockAccessAPIClientMockRecorder) GetAccountAtLatestBlock(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccountAtLatestBlock(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountAtLatestBlock", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccountAtLatestBlock), varargs...) } // GetAccountBalanceAtBlockHeight mocks base method. -func (m *MockAccessAPIClient) GetAccountBalanceAtBlockHeight(arg0 context.Context, arg1 *access.GetAccountBalanceAtBlockHeightRequest, arg2 ...grpc.CallOption) (*access.AccountBalanceResponse, error) { +func (m *MockAccessAPIClient) GetAccountBalanceAtBlockHeight(ctx context.Context, in *access.GetAccountBalanceAtBlockHeightRequest, opts ...grpc.CallOption) (*access.AccountBalanceResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccountBalanceAtBlockHeight", varargs...) @@ -175,17 +176,17 @@ func (m *MockAccessAPIClient) GetAccountBalanceAtBlockHeight(arg0 context.Contex } // GetAccountBalanceAtBlockHeight indicates an expected call of GetAccountBalanceAtBlockHeight. -func (mr *MockAccessAPIClientMockRecorder) GetAccountBalanceAtBlockHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccountBalanceAtBlockHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountBalanceAtBlockHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccountBalanceAtBlockHeight), varargs...) } // GetAccountBalanceAtLatestBlock mocks base method. -func (m *MockAccessAPIClient) GetAccountBalanceAtLatestBlock(arg0 context.Context, arg1 *access.GetAccountBalanceAtLatestBlockRequest, arg2 ...grpc.CallOption) (*access.AccountBalanceResponse, error) { +func (m *MockAccessAPIClient) GetAccountBalanceAtLatestBlock(ctx context.Context, in *access.GetAccountBalanceAtLatestBlockRequest, opts ...grpc.CallOption) (*access.AccountBalanceResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccountBalanceAtLatestBlock", varargs...) @@ -195,17 +196,17 @@ func (m *MockAccessAPIClient) GetAccountBalanceAtLatestBlock(arg0 context.Contex } // GetAccountBalanceAtLatestBlock indicates an expected call of GetAccountBalanceAtLatestBlock. -func (mr *MockAccessAPIClientMockRecorder) GetAccountBalanceAtLatestBlock(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccountBalanceAtLatestBlock(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountBalanceAtLatestBlock", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccountBalanceAtLatestBlock), varargs...) } // GetAccountKeyAtBlockHeight mocks base method. -func (m *MockAccessAPIClient) GetAccountKeyAtBlockHeight(arg0 context.Context, arg1 *access.GetAccountKeyAtBlockHeightRequest, arg2 ...grpc.CallOption) (*access.AccountKeyResponse, error) { +func (m *MockAccessAPIClient) GetAccountKeyAtBlockHeight(ctx context.Context, in *access.GetAccountKeyAtBlockHeightRequest, opts ...grpc.CallOption) (*access.AccountKeyResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccountKeyAtBlockHeight", varargs...) @@ -215,17 +216,17 @@ func (m *MockAccessAPIClient) GetAccountKeyAtBlockHeight(arg0 context.Context, a } // GetAccountKeyAtBlockHeight indicates an expected call of GetAccountKeyAtBlockHeight. -func (mr *MockAccessAPIClientMockRecorder) GetAccountKeyAtBlockHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccountKeyAtBlockHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountKeyAtBlockHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccountKeyAtBlockHeight), varargs...) } // GetAccountKeyAtLatestBlock mocks base method. -func (m *MockAccessAPIClient) GetAccountKeyAtLatestBlock(arg0 context.Context, arg1 *access.GetAccountKeyAtLatestBlockRequest, arg2 ...grpc.CallOption) (*access.AccountKeyResponse, error) { +func (m *MockAccessAPIClient) GetAccountKeyAtLatestBlock(ctx context.Context, in *access.GetAccountKeyAtLatestBlockRequest, opts ...grpc.CallOption) (*access.AccountKeyResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccountKeyAtLatestBlock", varargs...) @@ -235,17 +236,17 @@ func (m *MockAccessAPIClient) GetAccountKeyAtLatestBlock(arg0 context.Context, a } // GetAccountKeyAtLatestBlock indicates an expected call of GetAccountKeyAtLatestBlock. -func (mr *MockAccessAPIClientMockRecorder) GetAccountKeyAtLatestBlock(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccountKeyAtLatestBlock(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountKeyAtLatestBlock", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccountKeyAtLatestBlock), varargs...) } // GetAccountKeysAtBlockHeight mocks base method. -func (m *MockAccessAPIClient) GetAccountKeysAtBlockHeight(arg0 context.Context, arg1 *access.GetAccountKeysAtBlockHeightRequest, arg2 ...grpc.CallOption) (*access.AccountKeysResponse, error) { +func (m *MockAccessAPIClient) GetAccountKeysAtBlockHeight(ctx context.Context, in *access.GetAccountKeysAtBlockHeightRequest, opts ...grpc.CallOption) (*access.AccountKeysResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccountKeysAtBlockHeight", varargs...) @@ -255,17 +256,17 @@ func (m *MockAccessAPIClient) GetAccountKeysAtBlockHeight(arg0 context.Context, } // GetAccountKeysAtBlockHeight indicates an expected call of GetAccountKeysAtBlockHeight. -func (mr *MockAccessAPIClientMockRecorder) GetAccountKeysAtBlockHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccountKeysAtBlockHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountKeysAtBlockHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccountKeysAtBlockHeight), varargs...) } // GetAccountKeysAtLatestBlock mocks base method. -func (m *MockAccessAPIClient) GetAccountKeysAtLatestBlock(arg0 context.Context, arg1 *access.GetAccountKeysAtLatestBlockRequest, arg2 ...grpc.CallOption) (*access.AccountKeysResponse, error) { +func (m *MockAccessAPIClient) GetAccountKeysAtLatestBlock(ctx context.Context, in *access.GetAccountKeysAtLatestBlockRequest, opts ...grpc.CallOption) (*access.AccountKeysResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetAccountKeysAtLatestBlock", varargs...) @@ -275,17 +276,17 @@ func (m *MockAccessAPIClient) GetAccountKeysAtLatestBlock(arg0 context.Context, } // GetAccountKeysAtLatestBlock indicates an expected call of GetAccountKeysAtLatestBlock. -func (mr *MockAccessAPIClientMockRecorder) GetAccountKeysAtLatestBlock(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetAccountKeysAtLatestBlock(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountKeysAtLatestBlock", reflect.TypeOf((*MockAccessAPIClient)(nil).GetAccountKeysAtLatestBlock), varargs...) } // GetBlockByHeight mocks base method. -func (m *MockAccessAPIClient) GetBlockByHeight(arg0 context.Context, arg1 *access.GetBlockByHeightRequest, arg2 ...grpc.CallOption) (*access.BlockResponse, error) { +func (m *MockAccessAPIClient) GetBlockByHeight(ctx context.Context, in *access.GetBlockByHeightRequest, opts ...grpc.CallOption) (*access.BlockResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetBlockByHeight", varargs...) @@ -295,17 +296,17 @@ func (m *MockAccessAPIClient) GetBlockByHeight(arg0 context.Context, arg1 *acces } // GetBlockByHeight indicates an expected call of GetBlockByHeight. -func (mr *MockAccessAPIClientMockRecorder) GetBlockByHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetBlockByHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockByHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).GetBlockByHeight), varargs...) } // GetBlockByID mocks base method. -func (m *MockAccessAPIClient) GetBlockByID(arg0 context.Context, arg1 *access.GetBlockByIDRequest, arg2 ...grpc.CallOption) (*access.BlockResponse, error) { +func (m *MockAccessAPIClient) GetBlockByID(ctx context.Context, in *access.GetBlockByIDRequest, opts ...grpc.CallOption) (*access.BlockResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetBlockByID", varargs...) @@ -315,17 +316,17 @@ func (m *MockAccessAPIClient) GetBlockByID(arg0 context.Context, arg1 *access.Ge } // GetBlockByID indicates an expected call of GetBlockByID. -func (mr *MockAccessAPIClientMockRecorder) GetBlockByID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetBlockByID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockByID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetBlockByID), varargs...) } // GetBlockHeaderByHeight mocks base method. -func (m *MockAccessAPIClient) GetBlockHeaderByHeight(arg0 context.Context, arg1 *access.GetBlockHeaderByHeightRequest, arg2 ...grpc.CallOption) (*access.BlockHeaderResponse, error) { +func (m *MockAccessAPIClient) GetBlockHeaderByHeight(ctx context.Context, in *access.GetBlockHeaderByHeightRequest, opts ...grpc.CallOption) (*access.BlockHeaderResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetBlockHeaderByHeight", varargs...) @@ -335,17 +336,17 @@ func (m *MockAccessAPIClient) GetBlockHeaderByHeight(arg0 context.Context, arg1 } // GetBlockHeaderByHeight indicates an expected call of GetBlockHeaderByHeight. -func (mr *MockAccessAPIClientMockRecorder) GetBlockHeaderByHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetBlockHeaderByHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockHeaderByHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).GetBlockHeaderByHeight), varargs...) } // GetBlockHeaderByID mocks base method. -func (m *MockAccessAPIClient) GetBlockHeaderByID(arg0 context.Context, arg1 *access.GetBlockHeaderByIDRequest, arg2 ...grpc.CallOption) (*access.BlockHeaderResponse, error) { +func (m *MockAccessAPIClient) GetBlockHeaderByID(ctx context.Context, in *access.GetBlockHeaderByIDRequest, opts ...grpc.CallOption) (*access.BlockHeaderResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetBlockHeaderByID", varargs...) @@ -355,17 +356,17 @@ func (m *MockAccessAPIClient) GetBlockHeaderByID(arg0 context.Context, arg1 *acc } // GetBlockHeaderByID indicates an expected call of GetBlockHeaderByID. -func (mr *MockAccessAPIClientMockRecorder) GetBlockHeaderByID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetBlockHeaderByID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockHeaderByID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetBlockHeaderByID), varargs...) } // GetCollectionByID mocks base method. -func (m *MockAccessAPIClient) GetCollectionByID(arg0 context.Context, arg1 *access.GetCollectionByIDRequest, arg2 ...grpc.CallOption) (*access.CollectionResponse, error) { +func (m *MockAccessAPIClient) GetCollectionByID(ctx context.Context, in *access.GetCollectionByIDRequest, opts ...grpc.CallOption) (*access.CollectionResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetCollectionByID", varargs...) @@ -375,17 +376,17 @@ func (m *MockAccessAPIClient) GetCollectionByID(arg0 context.Context, arg1 *acce } // GetCollectionByID indicates an expected call of GetCollectionByID. -func (mr *MockAccessAPIClientMockRecorder) GetCollectionByID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetCollectionByID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCollectionByID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetCollectionByID), varargs...) } // GetEventsForBlockIDs mocks base method. -func (m *MockAccessAPIClient) GetEventsForBlockIDs(arg0 context.Context, arg1 *access.GetEventsForBlockIDsRequest, arg2 ...grpc.CallOption) (*access.EventsResponse, error) { +func (m *MockAccessAPIClient) GetEventsForBlockIDs(ctx context.Context, in *access.GetEventsForBlockIDsRequest, opts ...grpc.CallOption) (*access.EventsResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetEventsForBlockIDs", varargs...) @@ -395,17 +396,17 @@ func (m *MockAccessAPIClient) GetEventsForBlockIDs(arg0 context.Context, arg1 *a } // GetEventsForBlockIDs indicates an expected call of GetEventsForBlockIDs. -func (mr *MockAccessAPIClientMockRecorder) GetEventsForBlockIDs(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetEventsForBlockIDs(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsForBlockIDs", reflect.TypeOf((*MockAccessAPIClient)(nil).GetEventsForBlockIDs), varargs...) } // GetEventsForHeightRange mocks base method. -func (m *MockAccessAPIClient) GetEventsForHeightRange(arg0 context.Context, arg1 *access.GetEventsForHeightRangeRequest, arg2 ...grpc.CallOption) (*access.EventsResponse, error) { +func (m *MockAccessAPIClient) GetEventsForHeightRange(ctx context.Context, in *access.GetEventsForHeightRangeRequest, opts ...grpc.CallOption) (*access.EventsResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetEventsForHeightRange", varargs...) @@ -415,17 +416,17 @@ func (m *MockAccessAPIClient) GetEventsForHeightRange(arg0 context.Context, arg1 } // GetEventsForHeightRange indicates an expected call of GetEventsForHeightRange. -func (mr *MockAccessAPIClientMockRecorder) GetEventsForHeightRange(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetEventsForHeightRange(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEventsForHeightRange", reflect.TypeOf((*MockAccessAPIClient)(nil).GetEventsForHeightRange), varargs...) } // GetExecutionResultByID mocks base method. -func (m *MockAccessAPIClient) GetExecutionResultByID(arg0 context.Context, arg1 *access.GetExecutionResultByIDRequest, arg2 ...grpc.CallOption) (*access.ExecutionResultByIDResponse, error) { +func (m *MockAccessAPIClient) GetExecutionResultByID(ctx context.Context, in *access.GetExecutionResultByIDRequest, opts ...grpc.CallOption) (*access.ExecutionResultByIDResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetExecutionResultByID", varargs...) @@ -435,17 +436,17 @@ func (m *MockAccessAPIClient) GetExecutionResultByID(arg0 context.Context, arg1 } // GetExecutionResultByID indicates an expected call of GetExecutionResultByID. -func (mr *MockAccessAPIClientMockRecorder) GetExecutionResultByID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetExecutionResultByID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionResultByID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetExecutionResultByID), varargs...) } // GetExecutionResultForBlockID mocks base method. -func (m *MockAccessAPIClient) GetExecutionResultForBlockID(arg0 context.Context, arg1 *access.GetExecutionResultForBlockIDRequest, arg2 ...grpc.CallOption) (*access.ExecutionResultForBlockIDResponse, error) { +func (m *MockAccessAPIClient) GetExecutionResultForBlockID(ctx context.Context, in *access.GetExecutionResultForBlockIDRequest, opts ...grpc.CallOption) (*access.ExecutionResultForBlockIDResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetExecutionResultForBlockID", varargs...) @@ -455,17 +456,17 @@ func (m *MockAccessAPIClient) GetExecutionResultForBlockID(arg0 context.Context, } // GetExecutionResultForBlockID indicates an expected call of GetExecutionResultForBlockID. -func (mr *MockAccessAPIClientMockRecorder) GetExecutionResultForBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetExecutionResultForBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionResultForBlockID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetExecutionResultForBlockID), varargs...) } // GetFullCollectionByID mocks base method. -func (m *MockAccessAPIClient) GetFullCollectionByID(arg0 context.Context, arg1 *access.GetFullCollectionByIDRequest, arg2 ...grpc.CallOption) (*access.FullCollectionResponse, error) { +func (m *MockAccessAPIClient) GetFullCollectionByID(ctx context.Context, in *access.GetFullCollectionByIDRequest, opts ...grpc.CallOption) (*access.FullCollectionResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetFullCollectionByID", varargs...) @@ -475,17 +476,17 @@ func (m *MockAccessAPIClient) GetFullCollectionByID(arg0 context.Context, arg1 * } // GetFullCollectionByID indicates an expected call of GetFullCollectionByID. -func (mr *MockAccessAPIClientMockRecorder) GetFullCollectionByID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetFullCollectionByID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFullCollectionByID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetFullCollectionByID), varargs...) } // GetLatestBlock mocks base method. -func (m *MockAccessAPIClient) GetLatestBlock(arg0 context.Context, arg1 *access.GetLatestBlockRequest, arg2 ...grpc.CallOption) (*access.BlockResponse, error) { +func (m *MockAccessAPIClient) GetLatestBlock(ctx context.Context, in *access.GetLatestBlockRequest, opts ...grpc.CallOption) (*access.BlockResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetLatestBlock", varargs...) @@ -495,17 +496,17 @@ func (m *MockAccessAPIClient) GetLatestBlock(arg0 context.Context, arg1 *access. } // GetLatestBlock indicates an expected call of GetLatestBlock. -func (mr *MockAccessAPIClientMockRecorder) GetLatestBlock(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetLatestBlock(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestBlock", reflect.TypeOf((*MockAccessAPIClient)(nil).GetLatestBlock), varargs...) } // GetLatestBlockHeader mocks base method. -func (m *MockAccessAPIClient) GetLatestBlockHeader(arg0 context.Context, arg1 *access.GetLatestBlockHeaderRequest, arg2 ...grpc.CallOption) (*access.BlockHeaderResponse, error) { +func (m *MockAccessAPIClient) GetLatestBlockHeader(ctx context.Context, in *access.GetLatestBlockHeaderRequest, opts ...grpc.CallOption) (*access.BlockHeaderResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetLatestBlockHeader", varargs...) @@ -515,17 +516,17 @@ func (m *MockAccessAPIClient) GetLatestBlockHeader(arg0 context.Context, arg1 *a } // GetLatestBlockHeader indicates an expected call of GetLatestBlockHeader. -func (mr *MockAccessAPIClientMockRecorder) GetLatestBlockHeader(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetLatestBlockHeader(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestBlockHeader", reflect.TypeOf((*MockAccessAPIClient)(nil).GetLatestBlockHeader), varargs...) } // GetLatestProtocolStateSnapshot mocks base method. -func (m *MockAccessAPIClient) GetLatestProtocolStateSnapshot(arg0 context.Context, arg1 *access.GetLatestProtocolStateSnapshotRequest, arg2 ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error) { +func (m *MockAccessAPIClient) GetLatestProtocolStateSnapshot(ctx context.Context, in *access.GetLatestProtocolStateSnapshotRequest, opts ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetLatestProtocolStateSnapshot", varargs...) @@ -535,17 +536,17 @@ func (m *MockAccessAPIClient) GetLatestProtocolStateSnapshot(arg0 context.Contex } // GetLatestProtocolStateSnapshot indicates an expected call of GetLatestProtocolStateSnapshot. -func (mr *MockAccessAPIClientMockRecorder) GetLatestProtocolStateSnapshot(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetLatestProtocolStateSnapshot(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestProtocolStateSnapshot", reflect.TypeOf((*MockAccessAPIClient)(nil).GetLatestProtocolStateSnapshot), varargs...) } // GetNetworkParameters mocks base method. -func (m *MockAccessAPIClient) GetNetworkParameters(arg0 context.Context, arg1 *access.GetNetworkParametersRequest, arg2 ...grpc.CallOption) (*access.GetNetworkParametersResponse, error) { +func (m *MockAccessAPIClient) GetNetworkParameters(ctx context.Context, in *access.GetNetworkParametersRequest, opts ...grpc.CallOption) (*access.GetNetworkParametersResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetNetworkParameters", varargs...) @@ -555,17 +556,17 @@ func (m *MockAccessAPIClient) GetNetworkParameters(arg0 context.Context, arg1 *a } // GetNetworkParameters indicates an expected call of GetNetworkParameters. -func (mr *MockAccessAPIClientMockRecorder) GetNetworkParameters(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetNetworkParameters(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkParameters", reflect.TypeOf((*MockAccessAPIClient)(nil).GetNetworkParameters), varargs...) } // GetNodeVersionInfo mocks base method. -func (m *MockAccessAPIClient) GetNodeVersionInfo(arg0 context.Context, arg1 *access.GetNodeVersionInfoRequest, arg2 ...grpc.CallOption) (*access.GetNodeVersionInfoResponse, error) { +func (m *MockAccessAPIClient) GetNodeVersionInfo(ctx context.Context, in *access.GetNodeVersionInfoRequest, opts ...grpc.CallOption) (*access.GetNodeVersionInfoResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetNodeVersionInfo", varargs...) @@ -575,17 +576,17 @@ func (m *MockAccessAPIClient) GetNodeVersionInfo(arg0 context.Context, arg1 *acc } // GetNodeVersionInfo indicates an expected call of GetNodeVersionInfo. -func (mr *MockAccessAPIClientMockRecorder) GetNodeVersionInfo(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetNodeVersionInfo(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodeVersionInfo", reflect.TypeOf((*MockAccessAPIClient)(nil).GetNodeVersionInfo), varargs...) } // GetProtocolStateSnapshotByBlockID mocks base method. -func (m *MockAccessAPIClient) GetProtocolStateSnapshotByBlockID(arg0 context.Context, arg1 *access.GetProtocolStateSnapshotByBlockIDRequest, arg2 ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error) { +func (m *MockAccessAPIClient) GetProtocolStateSnapshotByBlockID(ctx context.Context, in *access.GetProtocolStateSnapshotByBlockIDRequest, opts ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetProtocolStateSnapshotByBlockID", varargs...) @@ -595,17 +596,17 @@ func (m *MockAccessAPIClient) GetProtocolStateSnapshotByBlockID(arg0 context.Con } // GetProtocolStateSnapshotByBlockID indicates an expected call of GetProtocolStateSnapshotByBlockID. -func (mr *MockAccessAPIClientMockRecorder) GetProtocolStateSnapshotByBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetProtocolStateSnapshotByBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProtocolStateSnapshotByBlockID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetProtocolStateSnapshotByBlockID), varargs...) } // GetProtocolStateSnapshotByHeight mocks base method. -func (m *MockAccessAPIClient) GetProtocolStateSnapshotByHeight(arg0 context.Context, arg1 *access.GetProtocolStateSnapshotByHeightRequest, arg2 ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error) { +func (m *MockAccessAPIClient) GetProtocolStateSnapshotByHeight(ctx context.Context, in *access.GetProtocolStateSnapshotByHeightRequest, opts ...grpc.CallOption) (*access.ProtocolStateSnapshotResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetProtocolStateSnapshotByHeight", varargs...) @@ -615,17 +616,17 @@ func (m *MockAccessAPIClient) GetProtocolStateSnapshotByHeight(arg0 context.Cont } // GetProtocolStateSnapshotByHeight indicates an expected call of GetProtocolStateSnapshotByHeight. -func (mr *MockAccessAPIClientMockRecorder) GetProtocolStateSnapshotByHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetProtocolStateSnapshotByHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProtocolStateSnapshotByHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).GetProtocolStateSnapshotByHeight), varargs...) } // GetSystemTransaction mocks base method. -func (m *MockAccessAPIClient) GetSystemTransaction(arg0 context.Context, arg1 *access.GetSystemTransactionRequest, arg2 ...grpc.CallOption) (*access.TransactionResponse, error) { +func (m *MockAccessAPIClient) GetSystemTransaction(ctx context.Context, in *access.GetSystemTransactionRequest, opts ...grpc.CallOption) (*access.TransactionResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetSystemTransaction", varargs...) @@ -635,17 +636,17 @@ func (m *MockAccessAPIClient) GetSystemTransaction(arg0 context.Context, arg1 *a } // GetSystemTransaction indicates an expected call of GetSystemTransaction. -func (mr *MockAccessAPIClientMockRecorder) GetSystemTransaction(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetSystemTransaction(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSystemTransaction", reflect.TypeOf((*MockAccessAPIClient)(nil).GetSystemTransaction), varargs...) } // GetSystemTransactionResult mocks base method. -func (m *MockAccessAPIClient) GetSystemTransactionResult(arg0 context.Context, arg1 *access.GetSystemTransactionResultRequest, arg2 ...grpc.CallOption) (*access.TransactionResultResponse, error) { +func (m *MockAccessAPIClient) GetSystemTransactionResult(ctx context.Context, in *access.GetSystemTransactionResultRequest, opts ...grpc.CallOption) (*access.TransactionResultResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetSystemTransactionResult", varargs...) @@ -655,17 +656,17 @@ func (m *MockAccessAPIClient) GetSystemTransactionResult(arg0 context.Context, a } // GetSystemTransactionResult indicates an expected call of GetSystemTransactionResult. -func (mr *MockAccessAPIClientMockRecorder) GetSystemTransactionResult(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetSystemTransactionResult(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSystemTransactionResult", reflect.TypeOf((*MockAccessAPIClient)(nil).GetSystemTransactionResult), varargs...) } // GetTransaction mocks base method. -func (m *MockAccessAPIClient) GetTransaction(arg0 context.Context, arg1 *access.GetTransactionRequest, arg2 ...grpc.CallOption) (*access.TransactionResponse, error) { +func (m *MockAccessAPIClient) GetTransaction(ctx context.Context, in *access.GetTransactionRequest, opts ...grpc.CallOption) (*access.TransactionResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetTransaction", varargs...) @@ -675,17 +676,17 @@ func (m *MockAccessAPIClient) GetTransaction(arg0 context.Context, arg1 *access. } // GetTransaction indicates an expected call of GetTransaction. -func (mr *MockAccessAPIClientMockRecorder) GetTransaction(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetTransaction(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransaction", reflect.TypeOf((*MockAccessAPIClient)(nil).GetTransaction), varargs...) } // GetTransactionResult mocks base method. -func (m *MockAccessAPIClient) GetTransactionResult(arg0 context.Context, arg1 *access.GetTransactionRequest, arg2 ...grpc.CallOption) (*access.TransactionResultResponse, error) { +func (m *MockAccessAPIClient) GetTransactionResult(ctx context.Context, in *access.GetTransactionRequest, opts ...grpc.CallOption) (*access.TransactionResultResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetTransactionResult", varargs...) @@ -695,17 +696,17 @@ func (m *MockAccessAPIClient) GetTransactionResult(arg0 context.Context, arg1 *a } // GetTransactionResult indicates an expected call of GetTransactionResult. -func (mr *MockAccessAPIClientMockRecorder) GetTransactionResult(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetTransactionResult(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionResult", reflect.TypeOf((*MockAccessAPIClient)(nil).GetTransactionResult), varargs...) } // GetTransactionResultByIndex mocks base method. -func (m *MockAccessAPIClient) GetTransactionResultByIndex(arg0 context.Context, arg1 *access.GetTransactionByIndexRequest, arg2 ...grpc.CallOption) (*access.TransactionResultResponse, error) { +func (m *MockAccessAPIClient) GetTransactionResultByIndex(ctx context.Context, in *access.GetTransactionByIndexRequest, opts ...grpc.CallOption) (*access.TransactionResultResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetTransactionResultByIndex", varargs...) @@ -715,17 +716,17 @@ func (m *MockAccessAPIClient) GetTransactionResultByIndex(arg0 context.Context, } // GetTransactionResultByIndex indicates an expected call of GetTransactionResultByIndex. -func (mr *MockAccessAPIClientMockRecorder) GetTransactionResultByIndex(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetTransactionResultByIndex(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionResultByIndex", reflect.TypeOf((*MockAccessAPIClient)(nil).GetTransactionResultByIndex), varargs...) } // GetTransactionResultsByBlockID mocks base method. -func (m *MockAccessAPIClient) GetTransactionResultsByBlockID(arg0 context.Context, arg1 *access.GetTransactionsByBlockIDRequest, arg2 ...grpc.CallOption) (*access.TransactionResultsResponse, error) { +func (m *MockAccessAPIClient) GetTransactionResultsByBlockID(ctx context.Context, in *access.GetTransactionsByBlockIDRequest, opts ...grpc.CallOption) (*access.TransactionResultsResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetTransactionResultsByBlockID", varargs...) @@ -735,17 +736,17 @@ func (m *MockAccessAPIClient) GetTransactionResultsByBlockID(arg0 context.Contex } // GetTransactionResultsByBlockID indicates an expected call of GetTransactionResultsByBlockID. -func (mr *MockAccessAPIClientMockRecorder) GetTransactionResultsByBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetTransactionResultsByBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionResultsByBlockID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetTransactionResultsByBlockID), varargs...) } // GetTransactionsByBlockID mocks base method. -func (m *MockAccessAPIClient) GetTransactionsByBlockID(arg0 context.Context, arg1 *access.GetTransactionsByBlockIDRequest, arg2 ...grpc.CallOption) (*access.TransactionsResponse, error) { +func (m *MockAccessAPIClient) GetTransactionsByBlockID(ctx context.Context, in *access.GetTransactionsByBlockIDRequest, opts ...grpc.CallOption) (*access.TransactionsResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetTransactionsByBlockID", varargs...) @@ -755,17 +756,17 @@ func (m *MockAccessAPIClient) GetTransactionsByBlockID(arg0 context.Context, arg } // GetTransactionsByBlockID indicates an expected call of GetTransactionsByBlockID. -func (mr *MockAccessAPIClientMockRecorder) GetTransactionsByBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) GetTransactionsByBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionsByBlockID", reflect.TypeOf((*MockAccessAPIClient)(nil).GetTransactionsByBlockID), varargs...) } // Ping mocks base method. -func (m *MockAccessAPIClient) Ping(arg0 context.Context, arg1 *access.PingRequest, arg2 ...grpc.CallOption) (*access.PingResponse, error) { +func (m *MockAccessAPIClient) Ping(ctx context.Context, in *access.PingRequest, opts ...grpc.CallOption) (*access.PingResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Ping", varargs...) @@ -775,17 +776,17 @@ func (m *MockAccessAPIClient) Ping(arg0 context.Context, arg1 *access.PingReques } // Ping indicates an expected call of Ping. -func (mr *MockAccessAPIClientMockRecorder) Ping(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) Ping(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ping", reflect.TypeOf((*MockAccessAPIClient)(nil).Ping), varargs...) } // SendAndSubscribeTransactionStatuses mocks base method. -func (m *MockAccessAPIClient) SendAndSubscribeTransactionStatuses(arg0 context.Context, arg1 *access.SendAndSubscribeTransactionStatusesRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SendAndSubscribeTransactionStatusesClient, error) { +func (m *MockAccessAPIClient) SendAndSubscribeTransactionStatuses(ctx context.Context, in *access.SendAndSubscribeTransactionStatusesRequest, opts ...grpc.CallOption) (access.AccessAPI_SendAndSubscribeTransactionStatusesClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SendAndSubscribeTransactionStatuses", varargs...) @@ -795,17 +796,17 @@ func (m *MockAccessAPIClient) SendAndSubscribeTransactionStatuses(arg0 context.C } // SendAndSubscribeTransactionStatuses indicates an expected call of SendAndSubscribeTransactionStatuses. -func (mr *MockAccessAPIClientMockRecorder) SendAndSubscribeTransactionStatuses(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SendAndSubscribeTransactionStatuses(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendAndSubscribeTransactionStatuses", reflect.TypeOf((*MockAccessAPIClient)(nil).SendAndSubscribeTransactionStatuses), varargs...) } // SendTransaction mocks base method. -func (m *MockAccessAPIClient) SendTransaction(arg0 context.Context, arg1 *access.SendTransactionRequest, arg2 ...grpc.CallOption) (*access.SendTransactionResponse, error) { +func (m *MockAccessAPIClient) SendTransaction(ctx context.Context, in *access.SendTransactionRequest, opts ...grpc.CallOption) (*access.SendTransactionResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SendTransaction", varargs...) @@ -815,17 +816,17 @@ func (m *MockAccessAPIClient) SendTransaction(arg0 context.Context, arg1 *access } // SendTransaction indicates an expected call of SendTransaction. -func (mr *MockAccessAPIClientMockRecorder) SendTransaction(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SendTransaction(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTransaction", reflect.TypeOf((*MockAccessAPIClient)(nil).SendTransaction), varargs...) } // SubscribeBlockDigestsFromLatest mocks base method. -func (m *MockAccessAPIClient) SubscribeBlockDigestsFromLatest(arg0 context.Context, arg1 *access.SubscribeBlockDigestsFromLatestRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromLatestClient, error) { +func (m *MockAccessAPIClient) SubscribeBlockDigestsFromLatest(ctx context.Context, in *access.SubscribeBlockDigestsFromLatestRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromLatestClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlockDigestsFromLatest", varargs...) @@ -835,17 +836,17 @@ func (m *MockAccessAPIClient) SubscribeBlockDigestsFromLatest(arg0 context.Conte } // SubscribeBlockDigestsFromLatest indicates an expected call of SubscribeBlockDigestsFromLatest. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockDigestsFromLatest(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockDigestsFromLatest(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlockDigestsFromLatest", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlockDigestsFromLatest), varargs...) } // SubscribeBlockDigestsFromStartBlockID mocks base method. -func (m *MockAccessAPIClient) SubscribeBlockDigestsFromStartBlockID(arg0 context.Context, arg1 *access.SubscribeBlockDigestsFromStartBlockIDRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromStartBlockIDClient, error) { +func (m *MockAccessAPIClient) SubscribeBlockDigestsFromStartBlockID(ctx context.Context, in *access.SubscribeBlockDigestsFromStartBlockIDRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromStartBlockIDClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlockDigestsFromStartBlockID", varargs...) @@ -855,17 +856,17 @@ func (m *MockAccessAPIClient) SubscribeBlockDigestsFromStartBlockID(arg0 context } // SubscribeBlockDigestsFromStartBlockID indicates an expected call of SubscribeBlockDigestsFromStartBlockID. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockDigestsFromStartBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockDigestsFromStartBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlockDigestsFromStartBlockID", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlockDigestsFromStartBlockID), varargs...) } // SubscribeBlockDigestsFromStartHeight mocks base method. -func (m *MockAccessAPIClient) SubscribeBlockDigestsFromStartHeight(arg0 context.Context, arg1 *access.SubscribeBlockDigestsFromStartHeightRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromStartHeightClient, error) { +func (m *MockAccessAPIClient) SubscribeBlockDigestsFromStartHeight(ctx context.Context, in *access.SubscribeBlockDigestsFromStartHeightRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlockDigestsFromStartHeightClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlockDigestsFromStartHeight", varargs...) @@ -875,17 +876,17 @@ func (m *MockAccessAPIClient) SubscribeBlockDigestsFromStartHeight(arg0 context. } // SubscribeBlockDigestsFromStartHeight indicates an expected call of SubscribeBlockDigestsFromStartHeight. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockDigestsFromStartHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockDigestsFromStartHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlockDigestsFromStartHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlockDigestsFromStartHeight), varargs...) } // SubscribeBlockHeadersFromLatest mocks base method. -func (m *MockAccessAPIClient) SubscribeBlockHeadersFromLatest(arg0 context.Context, arg1 *access.SubscribeBlockHeadersFromLatestRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromLatestClient, error) { +func (m *MockAccessAPIClient) SubscribeBlockHeadersFromLatest(ctx context.Context, in *access.SubscribeBlockHeadersFromLatestRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromLatestClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlockHeadersFromLatest", varargs...) @@ -895,17 +896,17 @@ func (m *MockAccessAPIClient) SubscribeBlockHeadersFromLatest(arg0 context.Conte } // SubscribeBlockHeadersFromLatest indicates an expected call of SubscribeBlockHeadersFromLatest. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockHeadersFromLatest(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockHeadersFromLatest(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlockHeadersFromLatest", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlockHeadersFromLatest), varargs...) } // SubscribeBlockHeadersFromStartBlockID mocks base method. -func (m *MockAccessAPIClient) SubscribeBlockHeadersFromStartBlockID(arg0 context.Context, arg1 *access.SubscribeBlockHeadersFromStartBlockIDRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromStartBlockIDClient, error) { +func (m *MockAccessAPIClient) SubscribeBlockHeadersFromStartBlockID(ctx context.Context, in *access.SubscribeBlockHeadersFromStartBlockIDRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromStartBlockIDClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlockHeadersFromStartBlockID", varargs...) @@ -915,17 +916,17 @@ func (m *MockAccessAPIClient) SubscribeBlockHeadersFromStartBlockID(arg0 context } // SubscribeBlockHeadersFromStartBlockID indicates an expected call of SubscribeBlockHeadersFromStartBlockID. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockHeadersFromStartBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockHeadersFromStartBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlockHeadersFromStartBlockID", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlockHeadersFromStartBlockID), varargs...) } // SubscribeBlockHeadersFromStartHeight mocks base method. -func (m *MockAccessAPIClient) SubscribeBlockHeadersFromStartHeight(arg0 context.Context, arg1 *access.SubscribeBlockHeadersFromStartHeightRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromStartHeightClient, error) { +func (m *MockAccessAPIClient) SubscribeBlockHeadersFromStartHeight(ctx context.Context, in *access.SubscribeBlockHeadersFromStartHeightRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlockHeadersFromStartHeightClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlockHeadersFromStartHeight", varargs...) @@ -935,17 +936,17 @@ func (m *MockAccessAPIClient) SubscribeBlockHeadersFromStartHeight(arg0 context. } // SubscribeBlockHeadersFromStartHeight indicates an expected call of SubscribeBlockHeadersFromStartHeight. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockHeadersFromStartHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlockHeadersFromStartHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlockHeadersFromStartHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlockHeadersFromStartHeight), varargs...) } // SubscribeBlocksFromLatest mocks base method. -func (m *MockAccessAPIClient) SubscribeBlocksFromLatest(arg0 context.Context, arg1 *access.SubscribeBlocksFromLatestRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromLatestClient, error) { +func (m *MockAccessAPIClient) SubscribeBlocksFromLatest(ctx context.Context, in *access.SubscribeBlocksFromLatestRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromLatestClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlocksFromLatest", varargs...) @@ -955,17 +956,17 @@ func (m *MockAccessAPIClient) SubscribeBlocksFromLatest(arg0 context.Context, ar } // SubscribeBlocksFromLatest indicates an expected call of SubscribeBlocksFromLatest. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlocksFromLatest(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlocksFromLatest(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlocksFromLatest", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlocksFromLatest), varargs...) } // SubscribeBlocksFromStartBlockID mocks base method. -func (m *MockAccessAPIClient) SubscribeBlocksFromStartBlockID(arg0 context.Context, arg1 *access.SubscribeBlocksFromStartBlockIDRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromStartBlockIDClient, error) { +func (m *MockAccessAPIClient) SubscribeBlocksFromStartBlockID(ctx context.Context, in *access.SubscribeBlocksFromStartBlockIDRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromStartBlockIDClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlocksFromStartBlockID", varargs...) @@ -975,17 +976,17 @@ func (m *MockAccessAPIClient) SubscribeBlocksFromStartBlockID(arg0 context.Conte } // SubscribeBlocksFromStartBlockID indicates an expected call of SubscribeBlocksFromStartBlockID. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlocksFromStartBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlocksFromStartBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlocksFromStartBlockID", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlocksFromStartBlockID), varargs...) } // SubscribeBlocksFromStartHeight mocks base method. -func (m *MockAccessAPIClient) SubscribeBlocksFromStartHeight(arg0 context.Context, arg1 *access.SubscribeBlocksFromStartHeightRequest, arg2 ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromStartHeightClient, error) { +func (m *MockAccessAPIClient) SubscribeBlocksFromStartHeight(ctx context.Context, in *access.SubscribeBlocksFromStartHeightRequest, opts ...grpc.CallOption) (access.AccessAPI_SubscribeBlocksFromStartHeightClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeBlocksFromStartHeight", varargs...) @@ -995,8 +996,8 @@ func (m *MockAccessAPIClient) SubscribeBlocksFromStartHeight(arg0 context.Contex } // SubscribeBlocksFromStartHeight indicates an expected call of SubscribeBlocksFromStartHeight. -func (mr *MockAccessAPIClientMockRecorder) SubscribeBlocksFromStartHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockAccessAPIClientMockRecorder) SubscribeBlocksFromStartHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBlocksFromStartHeight", reflect.TypeOf((*MockAccessAPIClient)(nil).SubscribeBlocksFromStartHeight), varargs...) } diff --git a/internal/mocks/executiondata.go b/internal/mocks/executiondata.go index 3a3184d3..ff561e85 100644 --- a/internal/mocks/executiondata.go +++ b/internal/mocks/executiondata.go @@ -22,6 +22,7 @@ import ( type MockExecutionDataAPIClient struct { ctrl *gomock.Controller recorder *MockExecutionDataAPIClientMockRecorder + isgomock struct{} } // MockExecutionDataAPIClientMockRecorder is the mock recorder for MockExecutionDataAPIClient. @@ -42,10 +43,10 @@ func (m *MockExecutionDataAPIClient) EXPECT() *MockExecutionDataAPIClientMockRec } // GetExecutionDataByBlockID mocks base method. -func (m *MockExecutionDataAPIClient) GetExecutionDataByBlockID(arg0 context.Context, arg1 *executiondata.GetExecutionDataByBlockIDRequest, arg2 ...grpc.CallOption) (*executiondata.GetExecutionDataByBlockIDResponse, error) { +func (m *MockExecutionDataAPIClient) GetExecutionDataByBlockID(ctx context.Context, in *executiondata.GetExecutionDataByBlockIDRequest, opts ...grpc.CallOption) (*executiondata.GetExecutionDataByBlockIDResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetExecutionDataByBlockID", varargs...) @@ -55,17 +56,17 @@ func (m *MockExecutionDataAPIClient) GetExecutionDataByBlockID(arg0 context.Cont } // GetExecutionDataByBlockID indicates an expected call of GetExecutionDataByBlockID. -func (mr *MockExecutionDataAPIClientMockRecorder) GetExecutionDataByBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) GetExecutionDataByBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExecutionDataByBlockID", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).GetExecutionDataByBlockID), varargs...) } // GetRegisterValues mocks base method. -func (m *MockExecutionDataAPIClient) GetRegisterValues(arg0 context.Context, arg1 *executiondata.GetRegisterValuesRequest, arg2 ...grpc.CallOption) (*executiondata.GetRegisterValuesResponse, error) { +func (m *MockExecutionDataAPIClient) GetRegisterValues(ctx context.Context, in *executiondata.GetRegisterValuesRequest, opts ...grpc.CallOption) (*executiondata.GetRegisterValuesResponse, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetRegisterValues", varargs...) @@ -75,17 +76,17 @@ func (m *MockExecutionDataAPIClient) GetRegisterValues(arg0 context.Context, arg } // GetRegisterValues indicates an expected call of GetRegisterValues. -func (mr *MockExecutionDataAPIClientMockRecorder) GetRegisterValues(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) GetRegisterValues(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRegisterValues", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).GetRegisterValues), varargs...) } // SubscribeAccountStatusesFromLatestBlock mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromLatestBlock(arg0 context.Context, arg1 *executiondata.SubscribeAccountStatusesFromLatestBlockRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeAccountStatusesFromLatestBlockClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromLatestBlock(ctx context.Context, in *executiondata.SubscribeAccountStatusesFromLatestBlockRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeAccountStatusesFromLatestBlockClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeAccountStatusesFromLatestBlock", varargs...) @@ -95,17 +96,17 @@ func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromLatestBlock(arg } // SubscribeAccountStatusesFromLatestBlock indicates an expected call of SubscribeAccountStatusesFromLatestBlock. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeAccountStatusesFromLatestBlock(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeAccountStatusesFromLatestBlock(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeAccountStatusesFromLatestBlock", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeAccountStatusesFromLatestBlock), varargs...) } // SubscribeAccountStatusesFromStartBlockID mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromStartBlockID(arg0 context.Context, arg1 *executiondata.SubscribeAccountStatusesFromStartBlockIDRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeAccountStatusesFromStartBlockIDClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromStartBlockID(ctx context.Context, in *executiondata.SubscribeAccountStatusesFromStartBlockIDRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeAccountStatusesFromStartBlockIDClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeAccountStatusesFromStartBlockID", varargs...) @@ -115,17 +116,17 @@ func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromStartBlockID(ar } // SubscribeAccountStatusesFromStartBlockID indicates an expected call of SubscribeAccountStatusesFromStartBlockID. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeAccountStatusesFromStartBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeAccountStatusesFromStartBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeAccountStatusesFromStartBlockID", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeAccountStatusesFromStartBlockID), varargs...) } // SubscribeAccountStatusesFromStartHeight mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromStartHeight(arg0 context.Context, arg1 *executiondata.SubscribeAccountStatusesFromStartHeightRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeAccountStatusesFromStartHeightClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromStartHeight(ctx context.Context, in *executiondata.SubscribeAccountStatusesFromStartHeightRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeAccountStatusesFromStartHeightClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeAccountStatusesFromStartHeight", varargs...) @@ -135,17 +136,17 @@ func (m *MockExecutionDataAPIClient) SubscribeAccountStatusesFromStartHeight(arg } // SubscribeAccountStatusesFromStartHeight indicates an expected call of SubscribeAccountStatusesFromStartHeight. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeAccountStatusesFromStartHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeAccountStatusesFromStartHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeAccountStatusesFromStartHeight", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeAccountStatusesFromStartHeight), varargs...) } // SubscribeEvents mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeEvents(arg0 context.Context, arg1 *executiondata.SubscribeEventsRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeEventsClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeEvents(ctx context.Context, in *executiondata.SubscribeEventsRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeEventsClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeEvents", varargs...) @@ -155,17 +156,17 @@ func (m *MockExecutionDataAPIClient) SubscribeEvents(arg0 context.Context, arg1 } // SubscribeEvents indicates an expected call of SubscribeEvents. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeEvents(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeEvents(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeEvents", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeEvents), varargs...) } // SubscribeEventsFromLatest mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeEventsFromLatest(arg0 context.Context, arg1 *executiondata.SubscribeEventsFromLatestRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeEventsFromLatestClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeEventsFromLatest(ctx context.Context, in *executiondata.SubscribeEventsFromLatestRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeEventsFromLatestClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeEventsFromLatest", varargs...) @@ -175,17 +176,17 @@ func (m *MockExecutionDataAPIClient) SubscribeEventsFromLatest(arg0 context.Cont } // SubscribeEventsFromLatest indicates an expected call of SubscribeEventsFromLatest. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeEventsFromLatest(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeEventsFromLatest(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeEventsFromLatest", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeEventsFromLatest), varargs...) } // SubscribeEventsFromStartBlockID mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeEventsFromStartBlockID(arg0 context.Context, arg1 *executiondata.SubscribeEventsFromStartBlockIDRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeEventsFromStartBlockIDClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeEventsFromStartBlockID(ctx context.Context, in *executiondata.SubscribeEventsFromStartBlockIDRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeEventsFromStartBlockIDClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeEventsFromStartBlockID", varargs...) @@ -195,17 +196,17 @@ func (m *MockExecutionDataAPIClient) SubscribeEventsFromStartBlockID(arg0 contex } // SubscribeEventsFromStartBlockID indicates an expected call of SubscribeEventsFromStartBlockID. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeEventsFromStartBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeEventsFromStartBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeEventsFromStartBlockID", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeEventsFromStartBlockID), varargs...) } // SubscribeEventsFromStartHeight mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeEventsFromStartHeight(arg0 context.Context, arg1 *executiondata.SubscribeEventsFromStartHeightRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeEventsFromStartHeightClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeEventsFromStartHeight(ctx context.Context, in *executiondata.SubscribeEventsFromStartHeightRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeEventsFromStartHeightClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeEventsFromStartHeight", varargs...) @@ -215,17 +216,17 @@ func (m *MockExecutionDataAPIClient) SubscribeEventsFromStartHeight(arg0 context } // SubscribeEventsFromStartHeight indicates an expected call of SubscribeEventsFromStartHeight. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeEventsFromStartHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeEventsFromStartHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeEventsFromStartHeight", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeEventsFromStartHeight), varargs...) } // SubscribeExecutionData mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeExecutionData(arg0 context.Context, arg1 *executiondata.SubscribeExecutionDataRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeExecutionDataClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeExecutionData(ctx context.Context, in *executiondata.SubscribeExecutionDataRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeExecutionDataClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeExecutionData", varargs...) @@ -235,17 +236,17 @@ func (m *MockExecutionDataAPIClient) SubscribeExecutionData(arg0 context.Context } // SubscribeExecutionData indicates an expected call of SubscribeExecutionData. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeExecutionData(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeExecutionData(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeExecutionData", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeExecutionData), varargs...) } // SubscribeExecutionDataFromLatest mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromLatest(arg0 context.Context, arg1 *executiondata.SubscribeExecutionDataFromLatestRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeExecutionDataFromLatestClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromLatest(ctx context.Context, in *executiondata.SubscribeExecutionDataFromLatestRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeExecutionDataFromLatestClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeExecutionDataFromLatest", varargs...) @@ -255,17 +256,17 @@ func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromLatest(arg0 conte } // SubscribeExecutionDataFromLatest indicates an expected call of SubscribeExecutionDataFromLatest. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeExecutionDataFromLatest(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeExecutionDataFromLatest(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeExecutionDataFromLatest", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeExecutionDataFromLatest), varargs...) } // SubscribeExecutionDataFromStartBlockHeight mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromStartBlockHeight(arg0 context.Context, arg1 *executiondata.SubscribeExecutionDataFromStartBlockHeightRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeExecutionDataFromStartBlockHeightClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromStartBlockHeight(ctx context.Context, in *executiondata.SubscribeExecutionDataFromStartBlockHeightRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeExecutionDataFromStartBlockHeightClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeExecutionDataFromStartBlockHeight", varargs...) @@ -275,17 +276,17 @@ func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromStartBlockHeight( } // SubscribeExecutionDataFromStartBlockHeight indicates an expected call of SubscribeExecutionDataFromStartBlockHeight. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeExecutionDataFromStartBlockHeight(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeExecutionDataFromStartBlockHeight(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeExecutionDataFromStartBlockHeight", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeExecutionDataFromStartBlockHeight), varargs...) } // SubscribeExecutionDataFromStartBlockID mocks base method. -func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromStartBlockID(arg0 context.Context, arg1 *executiondata.SubscribeExecutionDataFromStartBlockIDRequest, arg2 ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeExecutionDataFromStartBlockIDClient, error) { +func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromStartBlockID(ctx context.Context, in *executiondata.SubscribeExecutionDataFromStartBlockIDRequest, opts ...grpc.CallOption) (executiondata.ExecutionDataAPI_SubscribeExecutionDataFromStartBlockIDClient, error) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{ctx, in} + for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "SubscribeExecutionDataFromStartBlockID", varargs...) @@ -295,8 +296,8 @@ func (m *MockExecutionDataAPIClient) SubscribeExecutionDataFromStartBlockID(arg0 } // SubscribeExecutionDataFromStartBlockID indicates an expected call of SubscribeExecutionDataFromStartBlockID. -func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeExecutionDataFromStartBlockID(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockExecutionDataAPIClientMockRecorder) SubscribeExecutionDataFromStartBlockID(ctx, in any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{ctx, in}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeExecutionDataFromStartBlockID", reflect.TypeOf((*MockExecutionDataAPIClient)(nil).SubscribeExecutionDataFromStartBlockID), varargs...) } diff --git a/server/access/streamBackend.go b/server/access/streamBackend.go index 8dc9b988..001a3d9a 100644 --- a/server/access/streamBackend.go +++ b/server/access/streamBackend.go @@ -24,7 +24,7 @@ import ( "fmt" "time" - "github.com/onflow/cadence/runtime/common" + "github.com/onflow/cadence/common" "github.com/onflow/flow-go/engine/access/state_stream" "github.com/onflow/flow-go/engine/access/state_stream/backend" "github.com/onflow/flow-go/engine/access/subscription" diff --git a/server/debugger/debugsession.go b/server/debugger/debugsession.go index 2f6859e9..3ffef3b6 100644 --- a/server/debugger/debugsession.go +++ b/server/debugger/debugsession.go @@ -35,10 +35,10 @@ import ( "github.com/google/go-dap" "github.com/onflow/cadence" + "github.com/onflow/cadence/ast" + "github.com/onflow/cadence/common" + "github.com/onflow/cadence/interpreter" "github.com/onflow/cadence/runtime" - "github.com/onflow/cadence/runtime/ast" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/cadence/runtime/interpreter" sdk "github.com/onflow/flow-go-sdk" ) diff --git a/storage/migration/cadence1.go b/storage/migration/cadence1.go deleted file mode 100644 index ee044cb8..00000000 --- a/storage/migration/cadence1.go +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Flow Emulator - * - * Copyright Flow Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package migration - -import ( - "runtime" - - "github.com/onflow/flow-go/cmd/util/ledger/migrations" - "github.com/onflow/flow-go/cmd/util/ledger/reporters" - "github.com/onflow/flow-go/cmd/util/ledger/util" - "github.com/onflow/flow-go/cmd/util/ledger/util/registers" - "github.com/onflow/flow-go/model/flow" - "github.com/rs/zerolog" - - "github.com/onflow/flow-emulator/storage/sqlite" -) - -func MigrateCadence1( - store *sqlite.Store, - outputDir string, - evmContractChange migrations.EVMContractChange, - burnerContractChange migrations.BurnerContractChange, - stagedContracts []migrations.StagedContract, - rwf reporters.ReportWriterFactory, - logger zerolog.Logger, - -) error { - payloads, payloadInfo, _, err := util.PayloadsAndAccountsFromEmulatorSnapshot(store.DB()) - if err != nil { - return err - } - - nWorker := runtime.NumCPU() - - cadence1Migrations := migrations.NewCadence1Migrations( - logger, - outputDir, - rwf, - migrations.Options{ - NWorker: nWorker, - DiffMigrations: false, - LogVerboseDiff: false, - VerboseErrorOutput: true, // turn on verbose error output for emulator - CheckStorageHealthBeforeMigration: false, - ChainID: flow.Emulator, - EVMContractChange: evmContractChange, - BurnerContractChange: burnerContractChange, - StagedContracts: stagedContracts, - Prune: false, - MaxAccountSize: 0, - }, - ) - - byAccountRegisters, err := registers.NewByAccountFromPayloads(payloads) - if err != nil { - return err - } - - for _, migration := range cadence1Migrations { - logger.Info().Str("migration", migration.Name).Msg("running migration") - err = migration.Migrate(byAccountRegisters) - if err != nil { - return err - } - } - - newPayloads := byAccountRegisters.DestructIntoPayloads(nWorker) - - return WritePayloadsToSnapshot(store, newPayloads, payloadInfo) -} diff --git a/storage/migration/cadence1_test.go b/storage/migration/cadence1_test.go deleted file mode 100644 index deab6d02..00000000 --- a/storage/migration/cadence1_test.go +++ /dev/null @@ -1,582 +0,0 @@ -/* - * Flow Emulator - * - * Copyright Flow Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package migration - -import ( - "context" - _ "embed" - "fmt" - "io" - "os" - "testing" - - "github.com/onflow/flow-go/cmd/util/ledger/util/registers" - "github.com/rs/zerolog" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/cadence/runtime/interpreter" - "github.com/onflow/cadence/runtime/sema" - - flowsdk "github.com/onflow/flow-go-sdk" - - "github.com/onflow/flow-go/cmd/util/ledger/migrations" - "github.com/onflow/flow-go/cmd/util/ledger/util" - flowgo "github.com/onflow/flow-go/model/flow" - - "github.com/onflow/flow-emulator/adapters" - "github.com/onflow/flow-emulator/emulator" - "github.com/onflow/flow-emulator/storage/sqlite" -) - -var flowTokenAddress = func() common.Address { - address, _ := common.HexToAddress("0ae53cb6e3f42a79") - return address -}() - -var testAccountAddress = func() common.Address { - address, _ := common.HexToAddress("01cf0e2f2f715450") - return address -}() - -//go:embed test-data/test_contract_upgraded.cdc -var testContractUpdated string - -//go:embed test-data/test_contract_old.cdc -var testContractOld string - -const emulatorStateFile = "test-data/emulator_state_cadence_v0.42.6" - -func createEmulatorStateTempCopy(t *testing.T) string { - tempEmulatorState, err := os.CreateTemp("test-data", "temp_emulator_state") - require.NoError(t, err) - defer func() { - err = tempEmulatorState.Close() - require.NoError(t, err) - }() - - tempEmulatorStatePath := tempEmulatorState.Name() - - content, err := os.ReadFile(emulatorStateFile) - require.NoError(t, err) - - _, err = tempEmulatorState.Write(content) - require.NoError(t, err) - return tempEmulatorStatePath -} - -func migrateEmulatorState(t *testing.T, store *sqlite.Store) { - - logWriter := &writer{} - logger := zerolog.New(logWriter).Level(zerolog.ErrorLevel) - - rwf := &NOOPReportWriterFactory{} - stagedContracts := stagedContracts() - - err := MigrateCadence1( - store, - t.TempDir(), - migrations.EVMContractChangeDeployMinimalAndUpdateFull, - migrations.BurnerContractChangeDeploy, - stagedContracts, - rwf, - logger, - ) - require.NoError(t, err) - require.Empty(t, logWriter.logs) -} - -func TestCadence1Migration(t *testing.T) { - - // Work on a temp copy of the state, - // since the migration will be updating the state. - tempEmulatorStatePath := createEmulatorStateTempCopy(t) - defer func() { - err := os.Remove(tempEmulatorStatePath) - require.NoError(t, err) - }() - - store, err := sqlite.New(tempEmulatorStatePath) - require.NoError(t, err) - defer func() { - err := store.Close() - require.NoError(t, err) - }() - - // Check payloads before migration - checkPayloadsBeforeMigration(t, store) - - // Migrate - migrateEmulatorState(t, store) - - // Re-load the store from the file. - migratedStore, err := sqlite.New(tempEmulatorStatePath) - require.NoError(t, err) - defer func() { - err = migratedStore.Close() - require.NoError(t, err) - }() - - // Reload the payloads from the emulator state (store) - // and check whether the registers have migrated properly. - checkMigratedPayloads(t, migratedStore) -} - -func checkPayloadsBeforeMigration(t *testing.T, store *sqlite.Store) { - payloads, _, _, err := util.PayloadsAndAccountsFromEmulatorSnapshot(store.DB()) - require.NoError(t, err) - - for _, payload := range payloads { - key, err := payload.Key() - require.NoError(t, err) - - // Check if the old contract uses old syntax, - // that are not supported in Cadence 1.0. - if string(key.KeyParts[1].Value) == "code.Test" { - assert.Equal(t, testContractOld, string(payload.Value())) - return - } - } -} - -func checkMigratedPayloads(t *testing.T, store *sqlite.Store) { - - payloads, _, _, err := util.PayloadsAndAccountsFromEmulatorSnapshot(store.DB()) - require.NoError(t, err) - - byAccountRegisters, err := registers.NewByAccountFromPayloads(payloads) - require.NoError(t, err) - - migratorRuntime, err := migrations.NewInterpreterMigrationRuntime( - - byAccountRegisters, - flowgo.Emulator, - migrations.InterpreterMigrationRuntimeConfig{}, - ) - require.NoError(t, err) - - storageMap := migratorRuntime.Storage.GetStorageMap(testAccountAddress, common.PathDomainStorage.Identifier(), false) - require.NotNil(t, storageMap) - - require.Equal(t, 12, int(storageMap.Count())) - - iterator := storageMap.Iterator(migratorRuntime.Interpreter) - - fullyEntitledAccountReferenceType := interpreter.ConvertSemaToStaticType(nil, sema.FullyEntitledAccountReferenceType) - accountReferenceType := interpreter.ConvertSemaToStaticType(nil, sema.AccountReferenceType) - - var values []interpreter.Value - for key, value := iterator.Next(); key != nil; key, value = iterator.Next() { - values = append(values, value) - } - - testContractLocation := common.NewAddressLocation( - nil, - testAccountAddress, - "Test", - ) - - flowTokenLocation := common.NewAddressLocation( - nil, - flowTokenAddress, - "FlowToken", - ) - - fooInterfaceType := interpreter.NewInterfaceStaticTypeComputeTypeID( - nil, - testContractLocation, - "Test.Foo", - ) - - barInterfaceType := interpreter.NewInterfaceStaticTypeComputeTypeID( - nil, - testContractLocation, - "Test.Bar", - ) - - bazInterfaceType := interpreter.NewInterfaceStaticTypeComputeTypeID( - nil, - testContractLocation, - "Test.Baz", - ) - - rResourceType := interpreter.NewCompositeStaticTypeComputeTypeID( - nil, - testContractLocation, - "Test.R", - ) - - entitlementAuthorization := func() interpreter.EntitlementSetAuthorization { - return interpreter.NewEntitlementSetAuthorization( - nil, - func() (entitlements []common.TypeID) { - return []common.TypeID{ - testContractLocation.TypeID(nil, "Test.E"), - } - }, - 1, - sema.Conjunction, - ) - } - - expectedValues := []interpreter.Value{ - // Both string values should be in the normalized form. - interpreter.NewUnmeteredStringValue("Caf\u00E9"), - interpreter.NewUnmeteredStringValue("Caf\u00E9"), - - interpreter.NewUnmeteredTypeValue(fullyEntitledAccountReferenceType), - - interpreter.NewDictionaryValue( - migratorRuntime.Interpreter, - interpreter.EmptyLocationRange, - interpreter.NewDictionaryStaticType( - nil, - interpreter.PrimitiveStaticTypeString, - interpreter.PrimitiveStaticTypeInt, - ), - interpreter.NewUnmeteredStringValue("Caf\u00E9"), - interpreter.NewUnmeteredIntValueFromInt64(1), - interpreter.NewUnmeteredStringValue("H\u00E9llo"), - interpreter.NewUnmeteredIntValueFromInt64(2), - ), - - interpreter.NewDictionaryValue( - migratorRuntime.Interpreter, - interpreter.EmptyLocationRange, - interpreter.NewDictionaryStaticType( - nil, - interpreter.PrimitiveStaticTypeMetaType, - interpreter.PrimitiveStaticTypeInt, - ), - interpreter.NewUnmeteredTypeValue( - &interpreter.IntersectionStaticType{ - Types: []*interpreter.InterfaceStaticType{ - fooInterfaceType, - barInterfaceType, - }, - LegacyType: interpreter.PrimitiveStaticTypeAnyStruct, - }, - ), - interpreter.NewUnmeteredIntValueFromInt64(1), - interpreter.NewUnmeteredTypeValue( - &interpreter.IntersectionStaticType{ - Types: []*interpreter.InterfaceStaticType{ - fooInterfaceType, - barInterfaceType, - bazInterfaceType, - }, - LegacyType: interpreter.PrimitiveStaticTypeAnyStruct, - }, - ), - interpreter.NewUnmeteredIntValueFromInt64(2), - ), - - interpreter.NewCompositeValue( - migratorRuntime.Interpreter, - interpreter.EmptyLocationRange, - testContractLocation, - "Test.R", - common.CompositeKindResource, - []interpreter.CompositeField{ - { - Value: interpreter.NewUnmeteredUInt64Value(11457157452030541824), - Name: "uuid", - }, - }, - testAccountAddress, - ), - - interpreter.NewUnmeteredSomeValueNonCopying( - interpreter.NewUnmeteredCapabilityValue( - interpreter.NewUnmeteredUInt64Value(2), - interpreter.NewAddressValue(nil, testAccountAddress), - interpreter.NewReferenceStaticType(nil, entitlementAuthorization(), rResourceType), - ), - ), - - interpreter.NewUnmeteredCapabilityValue( - interpreter.NewUnmeteredUInt64Value(2), - interpreter.NewAddressValue(nil, testAccountAddress), - interpreter.NewReferenceStaticType(nil, entitlementAuthorization(), rResourceType), - ), - - interpreter.NewDictionaryValue( - migratorRuntime.Interpreter, - interpreter.EmptyLocationRange, - interpreter.NewDictionaryStaticType( - nil, - interpreter.PrimitiveStaticTypeMetaType, - interpreter.PrimitiveStaticTypeInt, - ), - interpreter.NewUnmeteredTypeValue(fullyEntitledAccountReferenceType), - interpreter.NewUnmeteredIntValueFromInt64(1), - interpreter.NewUnmeteredTypeValue(interpreter.PrimitiveStaticTypeAccount_Capabilities), - interpreter.NewUnmeteredIntValueFromInt64(2), - interpreter.NewUnmeteredTypeValue(interpreter.PrimitiveStaticTypeAccount_AccountCapabilities), - interpreter.NewUnmeteredIntValueFromInt64(3), - interpreter.NewUnmeteredTypeValue(interpreter.PrimitiveStaticTypeAccount_StorageCapabilities), - interpreter.NewUnmeteredIntValueFromInt64(4), - interpreter.NewUnmeteredTypeValue(interpreter.PrimitiveStaticTypeAccount_Contracts), - interpreter.NewUnmeteredIntValueFromInt64(5), - interpreter.NewUnmeteredTypeValue(interpreter.PrimitiveStaticTypeAccount_Keys), - interpreter.NewUnmeteredIntValueFromInt64(6), - interpreter.NewUnmeteredTypeValue(interpreter.PrimitiveStaticTypeAccount_Inbox), - interpreter.NewUnmeteredIntValueFromInt64(7), - interpreter.NewUnmeteredTypeValue(accountReferenceType), - interpreter.NewUnmeteredIntValueFromInt64(8), - interpreter.NewUnmeteredTypeValue(interpreter.AccountKeyStaticType), - interpreter.NewUnmeteredIntValueFromInt64(9), - ), - - interpreter.NewDictionaryValue( - migratorRuntime.Interpreter, - interpreter.EmptyLocationRange, - interpreter.NewDictionaryStaticType( - nil, - interpreter.PrimitiveStaticTypeMetaType, - interpreter.PrimitiveStaticTypeString, - ), - interpreter.NewUnmeteredTypeValue( - interpreter.NewReferenceStaticType( - nil, - entitlementAuthorization(), - rResourceType, - ), - ), - interpreter.NewUnmeteredStringValue("non_auth_ref"), - ), - interpreter.NewDictionaryValue( - migratorRuntime.Interpreter, - interpreter.EmptyLocationRange, - interpreter.NewDictionaryStaticType( - nil, - interpreter.PrimitiveStaticTypeMetaType, - interpreter.PrimitiveStaticTypeString, - ), - interpreter.NewUnmeteredTypeValue( - interpreter.NewReferenceStaticType( - nil, - entitlementAuthorization(), - rResourceType, - ), - ), - interpreter.NewUnmeteredStringValue("auth_ref"), - ), - - interpreter.NewCompositeValue( - migratorRuntime.Interpreter, - interpreter.EmptyLocationRange, - flowTokenLocation, - "FlowToken.Vault", - common.CompositeKindResource, - []interpreter.CompositeField{ - { - Value: interpreter.NewUnmeteredUFix64Value(0.001 * sema.Fix64Factor), - Name: "balance", - }, - { - Value: interpreter.NewUnmeteredUInt64Value(8791026472627208194), - Name: "uuid", - }, - }, - testAccountAddress, - ), - } - - require.Equal(t, len(expectedValues), len(values)) - - // Order is non-deterministic, so do a greedy compare. - for _, value := range values { - found := false - actualValue := value.(interpreter.EquatableValue) - for i, expectedValue := range expectedValues { - if actualValue.Equal(migratorRuntime.Interpreter, interpreter.EmptyLocationRange, expectedValue) { - expectedValues = append(expectedValues[:i], expectedValues[i+1:]...) - found = true - break - } - - } - if !found { - assert.Fail(t, fmt.Sprintf("extra item in actual values: %s", actualValue)) - } - } - - if len(expectedValues) != 0 { - assert.Fail(t, fmt.Sprintf("%d extra item(s) in expected values: %s", len(expectedValues), expectedValues)) - } -} - -func stagedContracts() []migrations.StagedContract { - return []migrations.StagedContract{ - { - Contract: migrations.Contract{ - Name: "Test", - Code: []byte(testContractUpdated), - }, - Address: testAccountAddress, - }, - } -} - -type writer struct { - logs []string -} - -var _ io.Writer = &writer{} - -func (w *writer) Write(p []byte) (n int, err error) { - w.logs = append(w.logs, string(p)) - return len(p), nil -} - -func TestLoadMigratedValuesInTransaction(t *testing.T) { - - t.Parallel() - - // Create a temporary snapshot file to work on. - tempEmulatorStatePath := createEmulatorStateTempCopy(t) - defer func() { - err := os.Remove(tempEmulatorStatePath) - require.NoError(t, err) - }() - - store, err := sqlite.New(tempEmulatorStatePath) - require.NoError(t, err) - defer func() { - err := store.Close() - require.NoError(t, err) - }() - - // Check payloads before migration - checkPayloadsBeforeMigration(t, store) - - // Migrate - migrateEmulatorState(t, store) - - // Re-load the store from the file. - migratedStore, err := sqlite.New(tempEmulatorStatePath) - require.NoError(t, err) - defer func() { - err = migratedStore.Close() - require.NoError(t, err) - }() - - // Execute a transaction against the migrated storage. - - blockchain, err := emulator.New( - emulator.WithStore(migratedStore), - emulator.WithTransactionValidationEnabled(false), - emulator.WithTransactionFeesEnabled(false), - emulator.WithStorageLimitEnabled(false), - ) - require.NoError(t, err) - - txCode := ` - import Test from 0x01cf0e2f2f715450 - - transaction { - - prepare(acct: auth(Storage) &Account) { - var string1 = acct.storage.load(from: /storage/string_value_1) - log(string1) - - var string2 = acct.storage.load(from: /storage/string_value_2) - log(string2) - - var typeValue = acct.storage.load(from: /storage/type_value) - log(typeValue) - - var dict1 = acct.storage.load<{String: Int}>(from: /storage/dictionary_with_string_keys) - log(dict1) - - var dict2 = acct.storage.load<{Type: Int}>(from: /storage/dictionary_with_restricted_typed_keys) - log(dict2) - - destroy acct.storage.load<@Test.R>(from: /storage/r) - - var cap1 = acct.storage.load?>(from: /storage/capability) - log(cap1) - - var cap2 = acct.storage.load>(from: /storage/untyped_capability) - log(cap2) - - var dict3 = acct.storage.load<{Type: String}>(from: /storage/dictionary_with_reference_typed_key) - log(dict3) - - var dict4 = acct.storage.load<{Type: String}>(from: /storage/dictionary_with_auth_reference_typed_key) - log(dict4) - } - - execute {} - } - ` - - tx := flowsdk.NewTransaction(). - SetScript([]byte(txCode)). - SetComputeLimit(flowgo.DefaultMaxTransactionGasLimit). - SetProposalKey(blockchain.ServiceKey().Address, blockchain.ServiceKey().Index, blockchain.ServiceKey().SequenceNumber). - SetPayer(blockchain.ServiceKey().Address). - AddAuthorizer(flowsdk.Address(testAccountAddress)) - - signer, err := blockchain.ServiceKey().Signer() - require.NoError(t, err) - - err = tx.SignEnvelope(blockchain.ServiceKey().Address, blockchain.ServiceKey().Index, signer) - require.NoError(t, err) - - // Submit tx - blockchainLogger := zerolog.Nop() - adapter := adapters.NewSDKAdapter(&blockchainLogger, blockchain) - err = adapter.SendTransaction(context.Background(), *tx) - require.NoError(t, err) - - // Execute tx - result, err := blockchain.ExecuteNextTransaction() - require.NoError(t, err) - - if !assert.True(t, result.Succeeded()) { - t.Error(result.Error) - } - - require.Equal(t, - []string{ - `"Caf\u{e9}"`, - `"Caf\u{e9}"`, - `Type()`, - `{"H\u{e9}llo": 2, "Caf\u{e9}": 1}`, - `{Type<{A.01cf0e2f2f715450.Test.Bar, A.01cf0e2f2f715450.Test.Foo}>(): 1, Type<{A.01cf0e2f2f715450.Test.Foo, A.01cf0e2f2f715450.Test.Bar, A.01cf0e2f2f715450.Test.Baz}>(): 2}`, - `Capability(address: 0x01cf0e2f2f715450, id: 2)`, - `Capability(address: 0x01cf0e2f2f715450, id: 2)`, - `{Type(): "non_auth_ref"}`, - `{Type(): "auth_ref"}`, - }, - result.Logs, - ) - - _, err = blockchain.CommitBlock() - require.NoError(t, err) - - // tx status becomes TransactionStatusSealed - tx1Result, err := adapter.GetTransactionResult(context.Background(), tx.ID()) - require.NoError(t, err) - require.Equal(t, flowsdk.TransactionStatusSealed, tx1Result.Status) -} diff --git a/storage/migration/test-data/README.md b/storage/migration/test-data/README.md deleted file mode 100644 index fbb2f402..00000000 --- a/storage/migration/test-data/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This is the same emulator state used in https://github.com/onflow/flow-go/tree/master/cmd/util/ledger/migrations/test-data/cadence_values_migration - -Follow the instruction there to generate a new state, if needed. diff --git a/storage/migration/test-data/emulator_state_cadence_v0.42.6 b/storage/migration/test-data/emulator_state_cadence_v0.42.6 deleted file mode 100644 index 55009f69..00000000 Binary files a/storage/migration/test-data/emulator_state_cadence_v0.42.6 and /dev/null differ diff --git a/storage/migration/test-data/temp_emulator_state3024780742 b/storage/migration/test-data/temp_emulator_state3024780742 deleted file mode 100644 index 55009f69..00000000 Binary files a/storage/migration/test-data/temp_emulator_state3024780742 and /dev/null differ diff --git a/storage/migration/test-data/test_contract_old.cdc b/storage/migration/test-data/test_contract_old.cdc deleted file mode 100644 index 1643a9f9..00000000 --- a/storage/migration/test-data/test_contract_old.cdc +++ /dev/null @@ -1,16 +0,0 @@ -pub contract Test { - - pub struct interface Foo {} - - pub struct interface Bar {} - - pub struct interface Baz {} - - pub resource R { - pub fun foo() {} - } - - pub fun createR(): @R { - return <- create R() - } -} diff --git a/storage/migration/test-data/test_contract_upgraded.cdc b/storage/migration/test-data/test_contract_upgraded.cdc deleted file mode 100644 index 276ce380..00000000 --- a/storage/migration/test-data/test_contract_upgraded.cdc +++ /dev/null @@ -1,18 +0,0 @@ -access(all) contract Test { - - access(all) struct interface Foo {} - - access(all) struct interface Bar {} - - access(all) struct interface Baz {} - - access(all) entitlement E - - access(all) resource R { - access(E) fun foo() {} - } - - access(all) fun createR(): @R { - return <- create R() - } -} diff --git a/storage/migration/utils.go b/storage/migration/utils.go deleted file mode 100644 index 75f2ec59..00000000 --- a/storage/migration/utils.go +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Flow Emulator - * - * Copyright Flow Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package migration - -import ( - "context" - "os" - - "github.com/rs/zerolog" - - "github.com/onflow/flow-emulator/storage" - "github.com/onflow/flow-emulator/storage/sqlite" - - "github.com/onflow/flow-go/cmd/util/ledger/reporters" - "github.com/onflow/flow-go/cmd/util/ledger/util" - "github.com/onflow/flow-go/ledger" - "github.com/onflow/flow-go/ledger/common/convert" - "github.com/onflow/flow-go/model/flow" -) - -func WritePayloadsToSnapshot( - store *sqlite.Store, - payloads []*ledger.Payload, - payloadInfoSet map[flow.RegisterID]util.PayloadMetaInfo, -) error { - - const storeName = storage.LedgerStoreName - - ctx := context.TODO() - - for _, payload := range payloads { - key, err := payload.Key() - if err != nil { - return err - } - - registerId, err := convert.LedgerKeyToRegisterID(key) - if err != nil { - return err - } - - registerIdBytes := []byte(registerId.String()) - - value := payload.Value() - - payloadInfo, ok := payloadInfoSet[registerId] - if ok { - // Insert the values back with the existing height and version. - err = store.SetBytesWithVersionAndHeight( - ctx, - storeName, - registerIdBytes, - value, - payloadInfo.Version, - payloadInfo.Height, - ) - } else { - // If this is a new payload, use the current block height, and default version. - err = store.SetBytes( - ctx, - storeName, - registerIdBytes, - value, - ) - } - - if err != nil { - return err - } - } - - return nil -} - -func NewConsoleLogger() zerolog.Logger { - writer := zerolog.ConsoleWriter{ - Out: os.Stdout, - } - - return zerolog.New(writer). - With(). - Timestamp(). - Logger(). - Level(zerolog.InfoLevel) -} - -type NOOPReportWriterFactory struct{} - -func (*NOOPReportWriterFactory) ReportWriter(_ string) reporters.ReportWriter { - return &NOOPWriter{} -} - -type NOOPWriter struct{} - -var _ reporters.ReportWriter = &NOOPWriter{} - -func (*NOOPWriter) Write(_ any) { - // NO-OP -} - -func (r *NOOPWriter) Close() {} diff --git a/storage/mocks/store.go b/storage/mocks/store.go index a3263bc8..c2090ea9 100644 --- a/storage/mocks/store.go +++ b/storage/mocks/store.go @@ -23,6 +23,7 @@ import ( type MockStore struct { ctrl *gomock.Controller recorder *MockStoreMockRecorder + isgomock struct{} } // MockStoreMockRecorder is the mock recorder for MockStore. @@ -43,137 +44,137 @@ func (m *MockStore) EXPECT() *MockStoreMockRecorder { } // BlockByHeight mocks base method. -func (m *MockStore) BlockByHeight(arg0 context.Context, arg1 uint64) (*flow.Block, error) { +func (m *MockStore) BlockByHeight(ctx context.Context, height uint64) (*flow.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BlockByHeight", arg0, arg1) + ret := m.ctrl.Call(m, "BlockByHeight", ctx, height) ret0, _ := ret[0].(*flow.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // BlockByHeight indicates an expected call of BlockByHeight. -func (mr *MockStoreMockRecorder) BlockByHeight(arg0, arg1 any) *gomock.Call { +func (mr *MockStoreMockRecorder) BlockByHeight(ctx, height any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockByHeight", reflect.TypeOf((*MockStore)(nil).BlockByHeight), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockByHeight", reflect.TypeOf((*MockStore)(nil).BlockByHeight), ctx, height) } // BlockByID mocks base method. -func (m *MockStore) BlockByID(arg0 context.Context, arg1 flow.Identifier) (*flow.Block, error) { +func (m *MockStore) BlockByID(ctx context.Context, blockID flow.Identifier) (*flow.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "BlockByID", arg0, arg1) + ret := m.ctrl.Call(m, "BlockByID", ctx, blockID) ret0, _ := ret[0].(*flow.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // BlockByID indicates an expected call of BlockByID. -func (mr *MockStoreMockRecorder) BlockByID(arg0, arg1 any) *gomock.Call { +func (mr *MockStoreMockRecorder) BlockByID(ctx, blockID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockByID", reflect.TypeOf((*MockStore)(nil).BlockByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockByID", reflect.TypeOf((*MockStore)(nil).BlockByID), ctx, blockID) } // CollectionByID mocks base method. -func (m *MockStore) CollectionByID(arg0 context.Context, arg1 flow.Identifier) (flow.LightCollection, error) { +func (m *MockStore) CollectionByID(ctx context.Context, collectionID flow.Identifier) (flow.LightCollection, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CollectionByID", arg0, arg1) + ret := m.ctrl.Call(m, "CollectionByID", ctx, collectionID) ret0, _ := ret[0].(flow.LightCollection) ret1, _ := ret[1].(error) return ret0, ret1 } // CollectionByID indicates an expected call of CollectionByID. -func (mr *MockStoreMockRecorder) CollectionByID(arg0, arg1 any) *gomock.Call { +func (mr *MockStoreMockRecorder) CollectionByID(ctx, collectionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CollectionByID", reflect.TypeOf((*MockStore)(nil).CollectionByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CollectionByID", reflect.TypeOf((*MockStore)(nil).CollectionByID), ctx, collectionID) } // CommitBlock mocks base method. -func (m *MockStore) CommitBlock(arg0 context.Context, arg1 flow.Block, arg2 []*flow.LightCollection, arg3 map[flow.Identifier]*flow.TransactionBody, arg4 map[flow.Identifier]*types.StorableTransactionResult, arg5 *snapshot.ExecutionSnapshot, arg6 []flow.Event) error { +func (m *MockStore) CommitBlock(ctx context.Context, block flow.Block, collections []*flow.LightCollection, transactions map[flow.Identifier]*flow.TransactionBody, transactionResults map[flow.Identifier]*types.StorableTransactionResult, executionSnapshot *snapshot.ExecutionSnapshot, events []flow.Event) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CommitBlock", arg0, arg1, arg2, arg3, arg4, arg5, arg6) + ret := m.ctrl.Call(m, "CommitBlock", ctx, block, collections, transactions, transactionResults, executionSnapshot, events) ret0, _ := ret[0].(error) return ret0 } // CommitBlock indicates an expected call of CommitBlock. -func (mr *MockStoreMockRecorder) CommitBlock(arg0, arg1, arg2, arg3, arg4, arg5, arg6 any) *gomock.Call { +func (mr *MockStoreMockRecorder) CommitBlock(ctx, block, collections, transactions, transactionResults, executionSnapshot, events any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitBlock", reflect.TypeOf((*MockStore)(nil).CommitBlock), arg0, arg1, arg2, arg3, arg4, arg5, arg6) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitBlock", reflect.TypeOf((*MockStore)(nil).CommitBlock), ctx, block, collections, transactions, transactionResults, executionSnapshot, events) } // EventsByHeight mocks base method. -func (m *MockStore) EventsByHeight(arg0 context.Context, arg1 uint64, arg2 string) ([]flow.Event, error) { +func (m *MockStore) EventsByHeight(ctx context.Context, blockHeight uint64, eventType string) ([]flow.Event, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EventsByHeight", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "EventsByHeight", ctx, blockHeight, eventType) ret0, _ := ret[0].([]flow.Event) ret1, _ := ret[1].(error) return ret0, ret1 } // EventsByHeight indicates an expected call of EventsByHeight. -func (mr *MockStoreMockRecorder) EventsByHeight(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockStoreMockRecorder) EventsByHeight(ctx, blockHeight, eventType any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EventsByHeight", reflect.TypeOf((*MockStore)(nil).EventsByHeight), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EventsByHeight", reflect.TypeOf((*MockStore)(nil).EventsByHeight), ctx, blockHeight, eventType) } // FullCollectionByID mocks base method. -func (m *MockStore) FullCollectionByID(arg0 context.Context, arg1 flow.Identifier) (flow.Collection, error) { +func (m *MockStore) FullCollectionByID(ctx context.Context, collectionID flow.Identifier) (flow.Collection, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "FullCollectionByID", arg0, arg1) + ret := m.ctrl.Call(m, "FullCollectionByID", ctx, collectionID) ret0, _ := ret[0].(flow.Collection) ret1, _ := ret[1].(error) return ret0, ret1 } // FullCollectionByID indicates an expected call of FullCollectionByID. -func (mr *MockStoreMockRecorder) FullCollectionByID(arg0, arg1 any) *gomock.Call { +func (mr *MockStoreMockRecorder) FullCollectionByID(ctx, collectionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FullCollectionByID", reflect.TypeOf((*MockStore)(nil).FullCollectionByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FullCollectionByID", reflect.TypeOf((*MockStore)(nil).FullCollectionByID), ctx, collectionID) } // LatestBlock mocks base method. -func (m *MockStore) LatestBlock(arg0 context.Context) (flow.Block, error) { +func (m *MockStore) LatestBlock(ctx context.Context) (flow.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LatestBlock", arg0) + ret := m.ctrl.Call(m, "LatestBlock", ctx) ret0, _ := ret[0].(flow.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // LatestBlock indicates an expected call of LatestBlock. -func (mr *MockStoreMockRecorder) LatestBlock(arg0 any) *gomock.Call { +func (mr *MockStoreMockRecorder) LatestBlock(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestBlock", reflect.TypeOf((*MockStore)(nil).LatestBlock), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestBlock", reflect.TypeOf((*MockStore)(nil).LatestBlock), ctx) } // LatestBlockHeight mocks base method. -func (m *MockStore) LatestBlockHeight(arg0 context.Context) (uint64, error) { +func (m *MockStore) LatestBlockHeight(ctx context.Context) (uint64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LatestBlockHeight", arg0) + ret := m.ctrl.Call(m, "LatestBlockHeight", ctx) ret0, _ := ret[0].(uint64) ret1, _ := ret[1].(error) return ret0, ret1 } // LatestBlockHeight indicates an expected call of LatestBlockHeight. -func (mr *MockStoreMockRecorder) LatestBlockHeight(arg0 any) *gomock.Call { +func (mr *MockStoreMockRecorder) LatestBlockHeight(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestBlockHeight", reflect.TypeOf((*MockStore)(nil).LatestBlockHeight), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestBlockHeight", reflect.TypeOf((*MockStore)(nil).LatestBlockHeight), ctx) } // LedgerByHeight mocks base method. -func (m *MockStore) LedgerByHeight(arg0 context.Context, arg1 uint64) (snapshot.StorageSnapshot, error) { +func (m *MockStore) LedgerByHeight(ctx context.Context, blockHeight uint64) (snapshot.StorageSnapshot, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LedgerByHeight", arg0, arg1) + ret := m.ctrl.Call(m, "LedgerByHeight", ctx, blockHeight) ret0, _ := ret[0].(snapshot.StorageSnapshot) ret1, _ := ret[1].(error) return ret0, ret1 } // LedgerByHeight indicates an expected call of LedgerByHeight. -func (mr *MockStoreMockRecorder) LedgerByHeight(arg0, arg1 any) *gomock.Call { +func (mr *MockStoreMockRecorder) LedgerByHeight(ctx, blockHeight any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LedgerByHeight", reflect.TypeOf((*MockStore)(nil).LedgerByHeight), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LedgerByHeight", reflect.TypeOf((*MockStore)(nil).LedgerByHeight), ctx, blockHeight) } // Start mocks base method. @@ -203,45 +204,45 @@ func (mr *MockStoreMockRecorder) Stop() *gomock.Call { } // StoreBlock mocks base method. -func (m *MockStore) StoreBlock(arg0 context.Context, arg1 *flow.Block) error { +func (m *MockStore) StoreBlock(ctx context.Context, block *flow.Block) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StoreBlock", arg0, arg1) + ret := m.ctrl.Call(m, "StoreBlock", ctx, block) ret0, _ := ret[0].(error) return ret0 } // StoreBlock indicates an expected call of StoreBlock. -func (mr *MockStoreMockRecorder) StoreBlock(arg0, arg1 any) *gomock.Call { +func (mr *MockStoreMockRecorder) StoreBlock(ctx, block any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreBlock", reflect.TypeOf((*MockStore)(nil).StoreBlock), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreBlock", reflect.TypeOf((*MockStore)(nil).StoreBlock), ctx, block) } // TransactionByID mocks base method. -func (m *MockStore) TransactionByID(arg0 context.Context, arg1 flow.Identifier) (flow.TransactionBody, error) { +func (m *MockStore) TransactionByID(ctx context.Context, transactionID flow.Identifier) (flow.TransactionBody, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TransactionByID", arg0, arg1) + ret := m.ctrl.Call(m, "TransactionByID", ctx, transactionID) ret0, _ := ret[0].(flow.TransactionBody) ret1, _ := ret[1].(error) return ret0, ret1 } // TransactionByID indicates an expected call of TransactionByID. -func (mr *MockStoreMockRecorder) TransactionByID(arg0, arg1 any) *gomock.Call { +func (mr *MockStoreMockRecorder) TransactionByID(ctx, transactionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionByID", reflect.TypeOf((*MockStore)(nil).TransactionByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionByID", reflect.TypeOf((*MockStore)(nil).TransactionByID), ctx, transactionID) } // TransactionResultByID mocks base method. -func (m *MockStore) TransactionResultByID(arg0 context.Context, arg1 flow.Identifier) (types.StorableTransactionResult, error) { +func (m *MockStore) TransactionResultByID(ctx context.Context, transactionID flow.Identifier) (types.StorableTransactionResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TransactionResultByID", arg0, arg1) + ret := m.ctrl.Call(m, "TransactionResultByID", ctx, transactionID) ret0, _ := ret[0].(types.StorableTransactionResult) ret1, _ := ret[1].(error) return ret0, ret1 } // TransactionResultByID indicates an expected call of TransactionResultByID. -func (mr *MockStoreMockRecorder) TransactionResultByID(arg0, arg1 any) *gomock.Call { +func (mr *MockStoreMockRecorder) TransactionResultByID(ctx, transactionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionResultByID", reflect.TypeOf((*MockStore)(nil).TransactionResultByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionResultByID", reflect.TypeOf((*MockStore)(nil).TransactionResultByID), ctx, transactionID) }