From c808a7c44998dfd951207bf41b532de6eabd0823 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 11:11:28 -0500 Subject: [PATCH 01/10] Reflect through submissionRejected JSON body from FFTM/EVMConnect Signed-off-by: Peter Broadhurst --- internal/blockchain/common/common.go | 2 + internal/blockchain/ethereum/ethereum.go | 32 +- internal/blockchain/ethereum/ethereum_test.go | 88 ++- internal/blockchain/fabric/fabric.go | 26 +- internal/blockchain/fabric/fabric_test.go | 18 +- internal/blockchain/tezos/tezos.go | 18 +- internal/blockchain/tezos/tezos_test.go | 14 +- internal/contracts/operations.go | 16 +- internal/contracts/operations_test.go | 126 +++- internal/operations/operation_updater.go | 6 + mocks/apiservermocks/ffi_swagger_gen.go | 6 +- mocks/apiservermocks/server.go | 6 +- mocks/assetmocks/manager.go | 98 ++- mocks/batchmocks/manager.go | 18 +- .../firefly_subscriptions.go | 6 +- mocks/blockchainmocks/callbacks.go | 6 +- mocks/blockchainmocks/plugin.go | 142 ++++- mocks/broadcastmocks/manager.go | 34 +- mocks/cachemocks/manager.go | 10 +- mocks/contractmocks/manager.go | 118 +++- mocks/coremocks/operation_callbacks.go | 2 +- mocks/databasemocks/callbacks.go | 2 +- mocks/databasemocks/plugin.go | 582 +++++++++++++++++- mocks/dataexchangemocks/callbacks.go | 6 +- mocks/dataexchangemocks/dx_event.go | 18 +- mocks/dataexchangemocks/plugin.go | 50 +- mocks/datamocks/manager.go | 54 +- mocks/definitionsmocks/handler.go | 6 +- mocks/definitionsmocks/sender.go | 42 +- mocks/eventmocks/event_manager.go | 78 ++- mocks/eventsmocks/callbacks.go | 10 +- mocks/eventsmocks/plugin.go | 30 +- mocks/identitymanagermocks/manager.go | 62 +- mocks/identitymocks/callbacks.go | 2 +- mocks/identitymocks/plugin.go | 18 +- mocks/metricsmocks/manager.go | 10 +- mocks/multipartymocks/manager.go | 42 +- mocks/namespacemocks/manager.go | 42 +- mocks/networkmapmocks/manager.go | 86 ++- mocks/operationmocks/manager.go | 38 +- mocks/orchestratormocks/orchestrator.go | 238 ++++++- mocks/privatemessagingmocks/manager.go | 42 +- mocks/shareddownloadmocks/callbacks.go | 10 +- mocks/shareddownloadmocks/manager.go | 14 +- mocks/sharedstoragemocks/callbacks.go | 2 +- mocks/sharedstoragemocks/plugin.go | 22 +- mocks/spieventsmocks/manager.go | 2 +- mocks/syncasyncmocks/bridge.go | 34 +- mocks/syncasyncmocks/sender.go | 14 +- mocks/systemeventmocks/event_interface.go | 6 +- mocks/tokenmocks/callbacks.go | 14 +- mocks/tokenmocks/plugin.go | 50 +- mocks/txcommonmocks/helper.go | 38 +- mocks/txwritermocks/writer.go | 6 +- .../websocketsmocks/web_sockets_namespaced.go | 2 +- mocks/wsmocks/ws_client.go | 22 +- pkg/blockchain/plugin.go | 4 +- 57 files changed, 2360 insertions(+), 130 deletions(-) diff --git a/internal/blockchain/common/common.go b/internal/blockchain/common/common.go index 88232cc8f..d15e0b8c4 100644 --- a/internal/blockchain/common/common.go +++ b/internal/blockchain/common/common.go @@ -101,6 +101,8 @@ type BlockchainReceiptNotification struct { type BlockchainRESTError struct { Error string `json:"error,omitempty"` + // See https://github.com/hyperledger/firefly-transaction-manager/blob/main/pkg/ffcapi/submission_error.go + SubmissionRejected bool `json:"submissionRejected,omitempty"` } type conflictError struct { diff --git a/internal/blockchain/ethereum/ethereum.go b/internal/blockchain/ethereum/ethereum.go index 2f6ac6654..df4190642 100644 --- a/internal/blockchain/ethereum/ethereum.go +++ b/internal/blockchain/ethereum/ethereum.go @@ -607,14 +607,14 @@ func (e *Ethereum) applyOptions(ctx context.Context, body, options map[string]in return body, nil } -func (e *Ethereum) invokeContractMethod(ctx context.Context, address, signingKey string, abi *abi.Entry, requestID string, input []interface{}, errors []*abi.Entry, options map[string]interface{}) error { +func (e *Ethereum) invokeContractMethod(ctx context.Context, address, signingKey string, abi *abi.Entry, requestID string, input []interface{}, errors []*abi.Entry, options map[string]interface{}) (bool, error) { if e.metrics.IsMetricsEnabled() { e.metrics.BlockchainTransaction(address, abi.Name) } messageType := "SendTransaction" body, err := e.buildEthconnectRequestBody(ctx, messageType, address, signingKey, abi, requestID, input, errors, options) if err != nil { - return err + return true, err } var resErr common.BlockchainRESTError res, err := e.client.R(). @@ -623,9 +623,9 @@ func (e *Ethereum) invokeContractMethod(ctx context.Context, address, signingKey SetError(&resErr). Post("/") if err != nil || !res.IsSuccess() { - return common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgEthConnectorRESTErr) + return resErr.SubmissionRejected, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgEthConnectorRESTErr) } - return nil + return false, nil } func (e *Ethereum) queryContractMethod(ctx context.Context, address, signingKey string, abi *abi.Entry, input []interface{}, errors []*abi.Entry, options map[string]interface{}) (*resty.Response, error) { @@ -697,7 +697,8 @@ func (e *Ethereum) SubmitBatchPin(ctx context.Context, nsOpID, networkNamespace, method, input := e.buildBatchPinInput(ctx, version, networkNamespace, batch) var emptyErrors []*abi.Entry - return e.invokeContractMethod(ctx, ethLocation.Address, signingKey, method, nsOpID, input, emptyErrors, nil) + _, err = e.invokeContractMethod(ctx, ethLocation.Address, signingKey, method, nsOpID, input, emptyErrors, nil) + return err } func (e *Ethereum) SubmitNetworkAction(ctx context.Context, nsOpID string, signingKey string, action core.NetworkActionType, location *fftypes.JSONAny) error { @@ -731,10 +732,11 @@ func (e *Ethereum) SubmitNetworkAction(ctx context.Context, nsOpID string, signi } } var emptyErrors []*abi.Entry - return e.invokeContractMethod(ctx, ethLocation.Address, signingKey, method, nsOpID, input, emptyErrors, nil) + _, err = e.invokeContractMethod(ctx, ethLocation.Address, signingKey, method, nsOpID, input, emptyErrors, nil) + return err } -func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) error { +func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (bool, error) { if e.metrics.IsMetricsEnabled() { e.metrics.BlockchainContractDeployment() } @@ -754,7 +756,7 @@ func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string } body, err := e.applyOptions(ctx, body, options) if err != nil { - return err + return true, err } var resErr common.BlockchainRESTError @@ -767,11 +769,11 @@ func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string if strings.Contains(string(res.Body()), "FFEC100130") { // This error is returned by ethconnect because it does not support deploying contracts with this syntax // Return a more helpful and clear error message - return i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) + return true, i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) } - return common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgEthConnectorRESTErr) + return resErr.SubmissionRejected, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgEthConnectorRESTErr) } - return nil + return false, nil } // Check if a method supports passing extra data via conformance to ERC5750. @@ -796,14 +798,14 @@ func (e *Ethereum) ValidateInvokeRequest(ctx context.Context, parsedMethod inter return err } -func (e *Ethereum) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) error { +func (e *Ethereum) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error) { ethereumLocation, err := e.parseContractLocation(ctx, location) if err != nil { - return err + return true, err } methodInfo, orderedInput, err := e.prepareRequest(ctx, parsedMethod, input) if err != nil { - return err + return true, err } if batch != nil { err := e.checkDataSupport(ctx, methodInfo.methodABI) @@ -815,7 +817,7 @@ func (e *Ethereum) InvokeContract(ctx context.Context, nsOpID string, signingKey } } if err != nil { - return err + return true, err } } return e.invokeContractMethod(ctx, ethereumLocation.Address, signingKey, methodInfo.methodABI, nsOpID, orderedInput, methodInfo.errorsABI, options) diff --git a/internal/blockchain/ethereum/ethereum_test.go b/internal/blockchain/ethereum/ethereum_test.go index 93e7fed1d..76b7214d1 100644 --- a/internal/blockchain/ethereum/ethereum_test.go +++ b/internal/blockchain/ethereum/ethereum_test.go @@ -2535,7 +2535,7 @@ func TestDeployContractOK(t *testing.T) { assert.Equal(t, body["customOption"].(string), "customValue") return httpmock.NewJsonResponderOrPanic(200, "")(req) }) - err = e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) + _, err = e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) assert.NoError(t, err) } @@ -2557,10 +2557,36 @@ func TestDeployContractFFEC100130(t *testing.T) { assert.NoError(t, err) httpmock.RegisterResponder("POST", `http://localhost:12345/`, func(req *http.Request) (*http.Response, error) { - return httpmock.NewJsonResponderOrPanic(500, `{"error":"FFEC100130: failure"}`)(req) + return httpmock.NewJsonResponderOrPanic(500, fftypes.JSONAnyPtr(`{"error":"FFEC100130: failure"}`))(req) }) - err = e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) + submissionRejected, err := e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) assert.Regexp(t, "FF10429", err) + assert.True(t, submissionRejected) +} + +func TestDeployContractRevert(t *testing.T) { + e, cancel := newTestEthereum() + defer cancel() + httpmock.ActivateNonDefault(e.client.GetClient()) + defer httpmock.DeactivateAndReset() + signingKey := ethHexFormatB32(fftypes.NewRandB32()) + input := []interface{}{ + float64(1), + "1000000000000000000000000", + } + options := map[string]interface{}{ + "customOption": "customValue", + } + definitionBytes, err := json.Marshal([]interface{}{}) + contractBytes, err := json.Marshal("0x123456") + assert.NoError(t, err) + httpmock.RegisterResponder("POST", `http://localhost:12345/`, + func(req *http.Request) (*http.Response, error) { + return httpmock.NewJsonResponderOrPanic(500, fftypes.JSONAnyPtr(`{"error":"FF23021: EVM reverted", "submissionRejected": true}`))(req) + }) + submissionRejected, err := e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) + assert.Regexp(t, "FF10111.*FF23021", err) + assert.True(t, submissionRejected) } func TestDeployContractInvalidOption(t *testing.T) { @@ -2591,8 +2617,9 @@ func TestDeployContractInvalidOption(t *testing.T) { assert.Equal(t, body["customOption"].(string), "customValue") return httpmock.NewJsonResponderOrPanic(400, "pop")(req) }) - err = e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) + submissionRejected, err := e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) assert.Regexp(t, "FF10398", err) + assert.True(t, submissionRejected) } func TestDeployContractError(t *testing.T) { @@ -2623,8 +2650,9 @@ func TestDeployContractError(t *testing.T) { assert.Equal(t, body["customOption"].(string), "customValue") return httpmock.NewJsonResponderOrPanic(400, "pop")(req) }) - err = e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) + submissionRejected, err := e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) assert.Regexp(t, "FF10111", err) + assert.False(t, submissionRejected) } func TestInvokeContractOK(t *testing.T) { @@ -2662,7 +2690,7 @@ func TestInvokeContractOK(t *testing.T) { }) parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.NoError(t, err) } @@ -2703,7 +2731,7 @@ func TestInvokeContractWithBatchOK(t *testing.T) { parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, nil, nil, batch) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, nil, nil, batch) assert.NoError(t, err) } @@ -2721,8 +2749,9 @@ func TestInvokeContractWithBatchUnsupported(t *testing.T) { batch := &blockchain.BatchPin{} parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, nil, nil, batch) + submissionRejected, err := e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, nil, nil, batch) assert.Regexp(t, "FF10443", err) + assert.True(t, submissionRejected) } func TestInvokeContractInvalidOption(t *testing.T) { @@ -2758,8 +2787,9 @@ func TestInvokeContractInvalidOption(t *testing.T) { }) parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + submissionRejected, err := e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF10398", err) + assert.True(t, submissionRejected) } func TestInvokeContractInvalidInput(t *testing.T) { @@ -2796,7 +2826,7 @@ func TestInvokeContractInvalidInput(t *testing.T) { }) parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "unsupported type", err) } @@ -2816,8 +2846,9 @@ func TestInvokeContractAddressNotSet(t *testing.T) { assert.NoError(t, err) parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + submissionRejected, err := e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "'address' not set", err) + assert.True(t, submissionRejected) } func TestInvokeContractEthconnectError(t *testing.T) { @@ -2844,8 +2875,38 @@ func TestInvokeContractEthconnectError(t *testing.T) { }) parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + submissionRejected, err := e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + assert.Regexp(t, "FF10111", err) + assert.False(t, submissionRejected) +} + +func TestInvokeContractEVMConnectRejectErr(t *testing.T) { + e, cancel := newTestEthereum() + defer cancel() + httpmock.ActivateNonDefault(e.client.GetClient()) + defer httpmock.DeactivateAndReset() + signingKey := ethHexFormatB32(fftypes.NewRandB32()) + location := &Location{ + Address: "0x12345", + } + method := testFFIMethod() + errors := testFFIErrors() + params := map[string]interface{}{ + "x": float64(1), + "y": float64(2), + } + options := map[string]interface{}{} + locationBytes, err := json.Marshal(location) + assert.NoError(t, err) + httpmock.RegisterResponder("POST", `http://localhost:12345/`, + func(req *http.Request) (*http.Response, error) { + return httpmock.NewJsonResponderOrPanic(400, fftypes.JSONAnyPtr(`{"error":"FF23021: EVM reverted", "submissionRejected": true}`))(req) + }) + parsedMethod, err := e.ParseInterface(context.Background(), method, errors) + assert.NoError(t, err) + submissionRejected, err := e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF10111", err) + assert.True(t, submissionRejected) } func TestInvokeContractPrepareFail(t *testing.T) { @@ -2864,8 +2925,9 @@ func TestInvokeContractPrepareFail(t *testing.T) { options := map[string]interface{}{} locationBytes, err := json.Marshal(location) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), "wrong", params, options, nil) + submissionRejected, err := e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), "wrong", params, options, nil) assert.Regexp(t, "FF10457", err) + assert.True(t, submissionRejected) } func TestParseInterfaceFailFFIMethod(t *testing.T) { diff --git a/internal/blockchain/fabric/fabric.go b/internal/blockchain/fabric/fabric.go index 75624c0f5..d9dee31b2 100644 --- a/internal/blockchain/fabric/fabric.go +++ b/internal/blockchain/fabric/fabric.go @@ -598,10 +598,10 @@ func (f *Fabric) ResolveSigningKey(ctx context.Context, signingKeyInput string, return signingKeyInput, nil } -func (f *Fabric) invokeContractMethod(ctx context.Context, channel, chaincode, methodName, signingKey, requestID string, prefixItems []*PrefixItem, input map[string]interface{}, options map[string]interface{}) error { +func (f *Fabric) invokeContractMethod(ctx context.Context, channel, chaincode, methodName, signingKey, requestID string, prefixItems []*PrefixItem, input map[string]interface{}, options map[string]interface{}) (bool, error) { body, err := f.buildFabconnectRequestBody(ctx, channel, chaincode, methodName, signingKey, requestID, prefixItems, input, options) if err != nil { - return err + return true, err } var resErr common.BlockchainRESTError res, err := f.client.R(). @@ -611,9 +611,9 @@ func (f *Fabric) invokeContractMethod(ctx context.Context, channel, chaincode, m SetError(&resErr). Post("/transactions") if err != nil || !res.IsSuccess() { - return common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgFabconnectRESTErr) + return resErr.SubmissionRejected, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgFabconnectRESTErr) } - return nil + return false, nil } func (f *Fabric) queryContractMethod(ctx context.Context, channel, chaincode, methodName, signingKey, requestID string, prefixItems []*PrefixItem, input map[string]interface{}, options map[string]interface{}) (*resty.Response, error) { @@ -696,7 +696,8 @@ func (f *Fabric) SubmitBatchPin(ctx context.Context, nsOpID, networkNamespace, s prefixItems, pinInput := f.buildBatchPinInput(ctx, version, networkNamespace, batch) input, _ := jsonEncodeInput(pinInput) - return f.invokeContractMethod(ctx, fabricOnChainLocation.Channel, fabricOnChainLocation.Chaincode, batchPinMethodName, signingKey, nsOpID, prefixItems, input, nil) + _, err = f.invokeContractMethod(ctx, fabricOnChainLocation.Channel, fabricOnChainLocation.Chaincode, batchPinMethodName, signingKey, nsOpID, prefixItems, input, nil) + return err } func (f *Fabric) SubmitNetworkAction(ctx context.Context, nsOpID string, signingKey string, action core.NetworkActionType, location *fftypes.JSONAny) error { @@ -734,7 +735,8 @@ func (f *Fabric) SubmitNetworkAction(ctx context.Context, nsOpID string, signing } input, _ := jsonEncodeInput(pinInput) - return f.invokeContractMethod(ctx, fabricOnChainLocation.Channel, fabricOnChainLocation.Chaincode, methodName, signingKey, nsOpID, prefixItems, input, nil) + _, err = f.invokeContractMethod(ctx, fabricOnChainLocation.Channel, fabricOnChainLocation.Chaincode, methodName, signingKey, nsOpID, prefixItems, input, nil) + return err } func (f *Fabric) buildFabconnectRequestBody(ctx context.Context, channel, chaincode, methodName, signingKey, requestID string, prefixItems []*PrefixItem, input map[string]interface{}, options map[string]interface{}) (map[string]interface{}, error) { @@ -768,8 +770,8 @@ func (f *Fabric) buildFabconnectRequestBody(ctx context.Context, channel, chainc return body, nil } -func (f *Fabric) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) error { - return i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) +func (f *Fabric) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (bool, error) { + return true, i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) } func (f *Fabric) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error { @@ -778,16 +780,16 @@ func (f *Fabric) ValidateInvokeRequest(ctx context.Context, parsedMethod interfa return err } -func (f *Fabric) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) error { +func (f *Fabric) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error) { method, _, err := f.recoverFFI(ctx, parsedMethod) if err != nil { - return err + return true, err } fabricOnChainLocation, err := parseContractLocation(ctx, location) if err != nil { - return err + return true, err } // Build the payload schema for the method parameters @@ -795,7 +797,7 @@ func (f *Fabric) InvokeContract(ctx context.Context, nsOpID string, signingKey s for i, param := range method.Params { var paramSchema ffiParamSchema if err := json.Unmarshal(param.Schema.Bytes(), ¶mSchema); err != nil { - return i18n.WrapError(ctx, err, i18n.MsgJSONObjectParseFailed, fmt.Sprintf("%s.schema", param.Name)) + return true, i18n.WrapError(ctx, err, i18n.MsgJSONObjectParseFailed, fmt.Sprintf("%s.schema", param.Name)) } prefixItems[i] = &PrefixItem{ diff --git a/internal/blockchain/fabric/fabric_test.go b/internal/blockchain/fabric/fabric_test.go index 822d8e8b3..b661a2995 100644 --- a/internal/blockchain/fabric/fabric_test.go +++ b/internal/blockchain/fabric/fabric_test.go @@ -2402,7 +2402,7 @@ func TestInvokeContractOK(t *testing.T) { var errors []*fftypes.FFIError parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.NoError(t, err) } @@ -2442,7 +2442,7 @@ func TestInvokeContractWithBatchOK(t *testing.T) { parsedMethod, err := e.ParseInterface(context.Background(), method, nil) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, nil, nil, batch) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, nil, nil, batch) assert.NoError(t, err) } @@ -2474,7 +2474,7 @@ func TestDeployContractOK(t *testing.T) { assert.Equal(t, body["customOption"].(string), "customValue") return httpmock.NewJsonResponderOrPanic(400, "pop")(req) }) - err = e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) + _, err = e.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) assert.Regexp(t, "FF10429", err) } @@ -2509,7 +2509,7 @@ func TestInvokeContractBadSchema(t *testing.T) { var errors []*fftypes.FFIError parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF00127", err) } @@ -2534,7 +2534,7 @@ func TestInvokeContractInvalidOption(t *testing.T) { var errors []*fftypes.FFIError parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF10398", err) } @@ -2554,7 +2554,7 @@ func TestInvokeContractChaincodeNotSet(t *testing.T) { var errors []*fftypes.FFIError parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF10310", err) } @@ -2583,7 +2583,7 @@ func TestInvokeContractFabconnectError(t *testing.T) { var errors []*fftypes.FFIError parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF10284", err) } @@ -2795,7 +2795,7 @@ func TestInvokeJSONEncodeParamsError(t *testing.T) { var errors []*fftypes.FFIError parsedMethod, err := e.ParseInterface(context.Background(), method, errors) assert.NoError(t, err) - err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = e.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF00127", err) } @@ -3326,7 +3326,7 @@ func TestInvokeContractBadFFI(t *testing.T) { e, cancel := newTestFabric() defer cancel() - err := e.InvokeContract(context.Background(), "", "", nil, nil, nil, nil, nil) + _, err := e.InvokeContract(context.Background(), "", "", nil, nil, nil, nil, nil) assert.Regexp(t, "FF10457", err) } diff --git a/internal/blockchain/tezos/tezos.go b/internal/blockchain/tezos/tezos.go index 3e663f309..e791b5c54 100644 --- a/internal/blockchain/tezos/tezos.go +++ b/internal/blockchain/tezos/tezos.go @@ -300,8 +300,8 @@ func (t *Tezos) SubmitNetworkAction(ctx context.Context, nsOpID string, signingK return nil } -func (t *Tezos) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) error { - return i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) +func (t *Tezos) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (bool, error) { + return true, i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) } func (t *Tezos) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error { @@ -310,15 +310,15 @@ func (t *Tezos) ValidateInvokeRequest(ctx context.Context, parsedMethod interfac return err } -func (t *Tezos) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) error { +func (t *Tezos) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error) { tezosLocation, err := t.parseContractLocation(ctx, location) if err != nil { - return err + return true, err } methodName, michelsonInput, err := t.prepareRequest(ctx, parsedMethod, input) if err != nil { - return err + return true, err } // TODO: add batch pin support @@ -516,14 +516,14 @@ func (t *Tezos) recoverFFI(ctx context.Context, parsedMethod interface{}) (*ffty return methodInfo.method, methodInfo.errors, nil } -func (t *Tezos) invokeContractMethod(ctx context.Context, address, methodName, signingKey, requestID string, michelsonInput micheline.Parameters, options map[string]interface{}) error { +func (t *Tezos) invokeContractMethod(ctx context.Context, address, methodName, signingKey, requestID string, michelsonInput micheline.Parameters, options map[string]interface{}) (bool, error) { if t.metrics.IsMetricsEnabled() { t.metrics.BlockchainTransaction(address, methodName) } messageType := "SendTransaction" body, err := t.buildTezosconnectRequestBody(ctx, messageType, address, methodName, signingKey, requestID, michelsonInput, options) if err != nil { - return err + return true, err } var resErr common.BlockchainRESTError @@ -533,9 +533,9 @@ func (t *Tezos) invokeContractMethod(ctx context.Context, address, methodName, s SetError(&resErr). Post("/") if err != nil || !res.IsSuccess() { - return common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgTezosconnectRESTErr) + return resErr.SubmissionRejected, common.WrapRESTError(ctx, &resErr, res, err, coremsgs.MsgTezosconnectRESTErr) } - return nil + return false, nil } func (t *Tezos) queryContractMethod(ctx context.Context, address, methodName, signingKey string, michelsonInput micheline.Parameters, options map[string]interface{}) (*resty.Response, error) { diff --git a/internal/blockchain/tezos/tezos_test.go b/internal/blockchain/tezos/tezos_test.go index e122c30cb..4f0ec8f96 100644 --- a/internal/blockchain/tezos/tezos_test.go +++ b/internal/blockchain/tezos/tezos_test.go @@ -984,7 +984,7 @@ func TestDeployContractOK(t *testing.T) { contractBytes, err := json.Marshal("KT123") assert.NoError(t, err) - err = tz.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) + _, err = tz.DeployContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(definitionBytes), fftypes.JSONAnyPtrBytes(contractBytes), input, options) assert.Regexp(t, "FF10429", err) } @@ -1030,7 +1030,7 @@ func TestInvokeContractOK(t *testing.T) { parsedMethod, err := tz.ParseInterface(context.Background(), method, nil) assert.NoError(t, err) - err = tz.InvokeContract(context.Background(), "opID", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = tz.InvokeContract(context.Background(), "opID", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.NoError(t, err) } @@ -1076,7 +1076,7 @@ func TestInvokeContractInvalidOption(t *testing.T) { parsedMethod, err := tz.ParseInterface(context.Background(), method, nil) assert.NoError(t, err) - err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF10398", err) } @@ -1109,7 +1109,7 @@ func TestInvokeContractBadSchema(t *testing.T) { parsedMethod, err := tz.ParseInterface(context.Background(), method, nil) assert.NoError(t, err) - err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF00127", err) } @@ -1137,7 +1137,7 @@ func TestInvokeContractAddressNotSet(t *testing.T) { parsedMethod, err := tz.ParseInterface(context.Background(), method, nil) assert.NoError(t, err) - err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "'address' not set", err) } @@ -1172,7 +1172,7 @@ func TestInvokeContractTezosconnectError(t *testing.T) { parsedMethod, err := tz.ParseInterface(context.Background(), method, nil) assert.NoError(t, err) - err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) + _, err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), parsedMethod, params, options, nil) assert.Regexp(t, "FF10283", err) } @@ -1192,7 +1192,7 @@ func TestInvokeContractPrepareFail(t *testing.T) { locationBytes, err := json.Marshal(location) assert.NoError(t, err) - err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), "wrong", params, options, nil) + _, err = tz.InvokeContract(context.Background(), "", signingKey, fftypes.JSONAnyPtrBytes(locationBytes), "wrong", params, options, nil) assert.Regexp(t, "FF10457", err) } diff --git a/internal/contracts/operations.go b/internal/contracts/operations.go index a47398772..a57f9aa0e 100644 --- a/internal/contracts/operations.go +++ b/internal/contracts/operations.go @@ -131,12 +131,20 @@ func (cm *contractManager) RunOperation(ctx context.Context, op *core.PreparedOp if err != nil { return nil, core.OpPhaseInitializing, err } - err = cm.blockchain.InvokeContract(ctx, op.NamespacedIDString(), req.Key, req.Location, bcParsedMethod, req.Input, req.Options, batchPin) - return nil, operations.ErrTernary(err, core.OpPhaseInitializing, core.OpPhasePending), err + errPhase := core.OpPhaseInitializing + submissionRejected, err := cm.blockchain.InvokeContract(ctx, op.NamespacedIDString(), req.Key, req.Location, bcParsedMethod, req.Input, req.Options, batchPin) + if submissionRejected { + errPhase = core.OpPhaseComplete // immediately transition to failed + } + return nil, operations.ErrTernary(err, errPhase, core.OpPhasePending), err case blockchainContractDeployData: req := data.Request - err = cm.blockchain.DeployContract(ctx, op.NamespacedIDString(), req.Key, req.Definition, req.Contract, req.Input, req.Options) - return nil, operations.ErrTernary(err, core.OpPhaseInitializing, core.OpPhasePending), err + submissionRejected, err := cm.blockchain.DeployContract(ctx, op.NamespacedIDString(), req.Key, req.Definition, req.Contract, req.Input, req.Options) + errPhase := core.OpPhaseInitializing + if submissionRejected { + errPhase = core.OpPhaseComplete // immediately transition to failed + } + return nil, operations.ErrTernary(err, errPhase, core.OpPhasePending), err default: return nil, core.OpPhaseInitializing, i18n.NewError(ctx, coremsgs.MsgOperationDataIncorrect, op.Data) } diff --git a/internal/contracts/operations_test.go b/internal/contracts/operations_test.go index abc8e70e7..bd425dabc 100644 --- a/internal/contracts/operations_test.go +++ b/internal/contracts/operations_test.go @@ -87,7 +87,7 @@ func TestPrepareAndRunBlockchainInvoke(t *testing.T) { }), req.Errors).Return(opaqueData, nil) mbi.On("InvokeContract", context.Background(), "ns1:"+op.ID.String(), "0x123", mock.MatchedBy(func(loc *fftypes.JSONAny) bool { return loc.String() == req.Location.String() - }), opaqueData, req.Input, req.Options, (*blockchain.BatchPin)(nil)).Return(nil) + }), opaqueData, req.Input, req.Options, (*blockchain.BatchPin)(nil)).Return(false, nil) po, err := cm.PrepareOperation(context.Background(), op) assert.NoError(t, err) @@ -101,6 +101,92 @@ func TestPrepareAndRunBlockchainInvoke(t *testing.T) { mbi.AssertExpectations(t) } +func TestPrepareAndRunBlockchainInvokeRejected(t *testing.T) { + cm := newTestContractManager() + + op := &core.Operation{ + Type: core.OpTypeBlockchainInvoke, + ID: fftypes.NewUUID(), + Namespace: "ns1", + } + req := &core.ContractCallRequest{ + Key: "0x123", + Location: fftypes.JSONAnyPtr(`{"address":"0x1111"}`), + Method: &fftypes.FFIMethod{ + Name: "set", + }, + Input: map[string]interface{}{ + "value": "1", + }, + } + err := addBlockchainReqInputs(op, req) + assert.NoError(t, err) + + mbi := cm.blockchain.(*blockchainmocks.Plugin) + opaqueData := "anything" + mbi.On("ParseInterface", context.Background(), mock.MatchedBy(func(method *fftypes.FFIMethod) bool { + return method.Name == req.Method.Name + }), req.Errors).Return(opaqueData, nil) + mbi.On("InvokeContract", context.Background(), "ns1:"+op.ID.String(), "0x123", mock.MatchedBy(func(loc *fftypes.JSONAny) bool { + return loc.String() == req.Location.String() + }), opaqueData, req.Input, req.Options, (*blockchain.BatchPin)(nil)). + Return(true, fmt.Errorf("rejected")) + + po, err := cm.PrepareOperation(context.Background(), op) + assert.NoError(t, err) + assert.Equal(t, req, po.Data.(txcommon.BlockchainInvokeData).Request) + + _, phase, err := cm.RunOperation(context.Background(), po) + + assert.Equal(t, core.OpPhaseComplete, phase) + assert.Regexp(t, "rejected", err) + + mbi.AssertExpectations(t) +} + +func TestPrepareAndRunBlockchainInvokeRetryable(t *testing.T) { + cm := newTestContractManager() + + op := &core.Operation{ + Type: core.OpTypeBlockchainInvoke, + ID: fftypes.NewUUID(), + Namespace: "ns1", + } + req := &core.ContractCallRequest{ + Key: "0x123", + Location: fftypes.JSONAnyPtr(`{"address":"0x1111"}`), + Method: &fftypes.FFIMethod{ + Name: "set", + }, + Input: map[string]interface{}{ + "value": "1", + }, + } + err := addBlockchainReqInputs(op, req) + assert.NoError(t, err) + + mbi := cm.blockchain.(*blockchainmocks.Plugin) + opaqueData := "anything" + mbi.On("ParseInterface", context.Background(), mock.MatchedBy(func(method *fftypes.FFIMethod) bool { + return method.Name == req.Method.Name + }), req.Errors).Return(opaqueData, nil) + mbi.On("InvokeContract", context.Background(), "ns1:"+op.ID.String(), "0x123", mock.MatchedBy(func(loc *fftypes.JSONAny) bool { + return loc.String() == req.Location.String() + }), opaqueData, req.Input, req.Options, (*blockchain.BatchPin)(nil)). + Return(false, fmt.Errorf("rejected")) + + po, err := cm.PrepareOperation(context.Background(), op) + assert.NoError(t, err) + assert.Equal(t, req, po.Data.(txcommon.BlockchainInvokeData).Request) + + _, phase, err := cm.RunOperation(context.Background(), po) + + assert.Equal(t, core.OpPhaseInitializing, phase) + assert.Regexp(t, "rejected", err) + + mbi.AssertExpectations(t) +} + func TestPrepareAndRunBlockchainInvokeValidateFail(t *testing.T) { cm := newTestContractManager() @@ -158,7 +244,7 @@ func TestPrepareAndRunBlockchainContractDeploy(t *testing.T) { assert.NoError(t, err) mbi := cm.blockchain.(*blockchainmocks.Plugin) - mbi.On("DeployContract", context.Background(), "ns1:"+op.ID.String(), signingKey, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) + mbi.On("DeployContract", context.Background(), "ns1:"+op.ID.String(), signingKey, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(false, nil) po, err := cm.PrepareOperation(context.Background(), op) assert.NoError(t, err) @@ -172,6 +258,40 @@ func TestPrepareAndRunBlockchainContractDeploy(t *testing.T) { mbi.AssertExpectations(t) } +func TestPrepareAndRunBlockchainContractDeployRejected(t *testing.T) { + cm := newTestContractManager() + + op := &core.Operation{ + Type: core.OpTypeBlockchainContractDeploy, + ID: fftypes.NewUUID(), + Namespace: "ns1", + } + signingKey := "0x2468" + req := &core.ContractDeployRequest{ + Key: signingKey, + Definition: fftypes.JSONAnyPtr("[]"), + Contract: fftypes.JSONAnyPtr("\"0x123456\""), + Input: []interface{}{"one", "two", "three"}, + } + err := addBlockchainReqInputs(op, req) + assert.NoError(t, err) + + mbi := cm.blockchain.(*blockchainmocks.Plugin) + mbi.On("DeployContract", context.Background(), "ns1:"+op.ID.String(), signingKey, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(true, fmt.Errorf("rejected")) + + po, err := cm.PrepareOperation(context.Background(), op) + assert.NoError(t, err) + assert.Equal(t, req, po.Data.(blockchainContractDeployData).Request) + + _, phase, err := cm.RunOperation(context.Background(), po) + + assert.Equal(t, core.OpPhaseComplete, phase) + assert.Regexp(t, "rejected", err) + + mbi.AssertExpectations(t) +} + func TestPrepareOperationNotSupported(t *testing.T) { cm := newTestContractManager() @@ -588,7 +708,7 @@ func TestRunBlockchainInvokeWithBatch(t *testing.T) { assert.Equal(t, []*fftypes.Bytes32{pin}, batchPin.Contexts) assert.Equal(t, "test-payload", batchPin.BatchPayloadRef) return true - })).Return(nil) + })).Return(false, nil) po := txcommon.OpBlockchainInvoke(op, req, &txcommon.BatchPinData{ Batch: storedBatch, diff --git a/internal/operations/operation_updater.go b/internal/operations/operation_updater.go index 0365d8fff..9f3b6d3a6 100644 --- a/internal/operations/operation_updater.go +++ b/internal/operations/operation_updater.go @@ -105,6 +105,12 @@ func (ou *operationUpdater) SubmitOperationUpdate(ctx context.Context, update *c } if ou.conf.workerCount > 0 { + if update.Status == core.OpStatusFailed { + // We do a cache update pre-emptively, as for idempotency checking on an error status we want to + // see the update immediately - even though it's being asynchronously flushed to the storage + ou.manager.updateCachedOperation(id, update.Status, &update.ErrorMessage, update.Output, nil) + } + select { case ou.pickWorker(ctx, id, update) <- update: case <-ou.ctx.Done(): diff --git a/mocks/apiservermocks/ffi_swagger_gen.go b/mocks/apiservermocks/ffi_swagger_gen.go index 1e71bed06..fa0cf0838 100644 --- a/mocks/apiservermocks/ffi_swagger_gen.go +++ b/mocks/apiservermocks/ffi_swagger_gen.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package apiservermocks @@ -22,6 +22,10 @@ type FFISwaggerGen struct { func (_m *FFISwaggerGen) Build(ctx context.Context, api *core.ContractAPI, ffi *fftypes.FFI) (*ffapi.SwaggerGenOptions, []*ffapi.Route) { ret := _m.Called(ctx, api, ffi) + if len(ret) == 0 { + panic("no return value specified for Build") + } + var r0 *ffapi.SwaggerGenOptions var r1 []*ffapi.Route if rf, ok := ret.Get(0).(func(context.Context, *core.ContractAPI, *fftypes.FFI) (*ffapi.SwaggerGenOptions, []*ffapi.Route)); ok { diff --git a/mocks/apiservermocks/server.go b/mocks/apiservermocks/server.go index b7045eed2..6b73db0b8 100644 --- a/mocks/apiservermocks/server.go +++ b/mocks/apiservermocks/server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package apiservermocks @@ -18,6 +18,10 @@ type Server struct { func (_m *Server) Serve(ctx context.Context, mgr namespace.Manager) error { ret := _m.Called(ctx, mgr) + if len(ret) == 0 { + panic("no return value specified for Serve") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, namespace.Manager) error); ok { r0 = rf(ctx, mgr) diff --git a/mocks/assetmocks/manager.go b/mocks/assetmocks/manager.go index 437b2f127..262b2ac67 100644 --- a/mocks/assetmocks/manager.go +++ b/mocks/assetmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package assetmocks @@ -24,6 +24,10 @@ type Manager struct { func (_m *Manager) ActivateTokenPool(ctx context.Context, pool *core.TokenPool) error { ret := _m.Called(ctx, pool) + if len(ret) == 0 { + panic("no return value specified for ActivateTokenPool") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPool) error); ok { r0 = rf(ctx, pool) @@ -38,6 +42,10 @@ func (_m *Manager) ActivateTokenPool(ctx context.Context, pool *core.TokenPool) func (_m *Manager) BurnTokens(ctx context.Context, transfer *core.TokenTransferInput, waitConfirm bool) (*core.TokenTransfer, error) { ret := _m.Called(ctx, transfer, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for BurnTokens") + } + var r0 *core.TokenTransfer var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenTransferInput, bool) (*core.TokenTransfer, error)); ok { @@ -64,6 +72,10 @@ func (_m *Manager) BurnTokens(ctx context.Context, transfer *core.TokenTransferI func (_m *Manager) CreateTokenPool(ctx context.Context, pool *core.TokenPoolInput, waitConfirm bool) (*core.TokenPool, error) { ret := _m.Called(ctx, pool, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for CreateTokenPool") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPoolInput, bool) (*core.TokenPool, error)); ok { @@ -90,6 +102,10 @@ func (_m *Manager) CreateTokenPool(ctx context.Context, pool *core.TokenPoolInpu func (_m *Manager) DeleteTokenPool(ctx context.Context, poolNameOrID string) error { ret := _m.Called(ctx, poolNameOrID) + if len(ret) == 0 { + panic("no return value specified for DeleteTokenPool") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, poolNameOrID) @@ -104,6 +120,10 @@ func (_m *Manager) DeleteTokenPool(ctx context.Context, poolNameOrID string) err func (_m *Manager) GetTokenAccountPools(ctx context.Context, key string, filter ffapi.AndFilter) ([]*core.TokenAccountPool, *ffapi.FilterResult, error) { ret := _m.Called(ctx, key, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenAccountPools") + } + var r0 []*core.TokenAccountPool var r1 *ffapi.FilterResult var r2 error @@ -139,6 +159,10 @@ func (_m *Manager) GetTokenAccountPools(ctx context.Context, key string, filter func (_m *Manager) GetTokenAccounts(ctx context.Context, filter ffapi.AndFilter) ([]*core.TokenAccount, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenAccounts") + } + var r0 []*core.TokenAccount var r1 *ffapi.FilterResult var r2 error @@ -174,6 +198,10 @@ func (_m *Manager) GetTokenAccounts(ctx context.Context, filter ffapi.AndFilter) func (_m *Manager) GetTokenApprovals(ctx context.Context, filter ffapi.AndFilter) ([]*core.TokenApproval, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenApprovals") + } + var r0 []*core.TokenApproval var r1 *ffapi.FilterResult var r2 error @@ -209,6 +237,10 @@ func (_m *Manager) GetTokenApprovals(ctx context.Context, filter ffapi.AndFilter func (_m *Manager) GetTokenBalances(ctx context.Context, filter ffapi.AndFilter) ([]*core.TokenBalance, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenBalances") + } + var r0 []*core.TokenBalance var r1 *ffapi.FilterResult var r2 error @@ -244,6 +276,10 @@ func (_m *Manager) GetTokenBalances(ctx context.Context, filter ffapi.AndFilter) func (_m *Manager) GetTokenConnectors(ctx context.Context) []*core.TokenConnector { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetTokenConnectors") + } + var r0 []*core.TokenConnector if rf, ok := ret.Get(0).(func(context.Context) []*core.TokenConnector); ok { r0 = rf(ctx) @@ -260,6 +296,10 @@ func (_m *Manager) GetTokenConnectors(ctx context.Context) []*core.TokenConnecto func (_m *Manager) GetTokenPoolByID(ctx context.Context, id *fftypes.UUID) (*core.TokenPool, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetTokenPoolByID") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) (*core.TokenPool, error)); ok { @@ -286,6 +326,10 @@ func (_m *Manager) GetTokenPoolByID(ctx context.Context, id *fftypes.UUID) (*cor func (_m *Manager) GetTokenPoolByLocator(ctx context.Context, connector string, poolLocator string) (*core.TokenPool, error) { ret := _m.Called(ctx, connector, poolLocator) + if len(ret) == 0 { + panic("no return value specified for GetTokenPoolByLocator") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.TokenPool, error)); ok { @@ -312,6 +356,10 @@ func (_m *Manager) GetTokenPoolByLocator(ctx context.Context, connector string, func (_m *Manager) GetTokenPoolByNameOrID(ctx context.Context, poolNameOrID string) (*core.TokenPool, error) { ret := _m.Called(ctx, poolNameOrID) + if len(ret) == 0 { + panic("no return value specified for GetTokenPoolByNameOrID") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.TokenPool, error)); ok { @@ -338,6 +386,10 @@ func (_m *Manager) GetTokenPoolByNameOrID(ctx context.Context, poolNameOrID stri func (_m *Manager) GetTokenPools(ctx context.Context, filter ffapi.AndFilter) ([]*core.TokenPool, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenPools") + } + var r0 []*core.TokenPool var r1 *ffapi.FilterResult var r2 error @@ -373,6 +425,10 @@ func (_m *Manager) GetTokenPools(ctx context.Context, filter ffapi.AndFilter) ([ func (_m *Manager) GetTokenTransferByID(ctx context.Context, id string) (*core.TokenTransfer, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetTokenTransferByID") + } + var r0 *core.TokenTransfer var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.TokenTransfer, error)); ok { @@ -399,6 +455,10 @@ func (_m *Manager) GetTokenTransferByID(ctx context.Context, id string) (*core.T func (_m *Manager) GetTokenTransfers(ctx context.Context, filter ffapi.AndFilter) ([]*core.TokenTransfer, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenTransfers") + } + var r0 []*core.TokenTransfer var r1 *ffapi.FilterResult var r2 error @@ -434,6 +494,10 @@ func (_m *Manager) GetTokenTransfers(ctx context.Context, filter ffapi.AndFilter func (_m *Manager) MintTokens(ctx context.Context, transfer *core.TokenTransferInput, waitConfirm bool) (*core.TokenTransfer, error) { ret := _m.Called(ctx, transfer, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for MintTokens") + } + var r0 *core.TokenTransfer var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenTransferInput, bool) (*core.TokenTransfer, error)); ok { @@ -460,6 +524,10 @@ func (_m *Manager) MintTokens(ctx context.Context, transfer *core.TokenTransferI func (_m *Manager) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -474,6 +542,10 @@ func (_m *Manager) Name() string { func (_m *Manager) NewApproval(approve *core.TokenApprovalInput) syncasync.Sender { ret := _m.Called(approve) + if len(ret) == 0 { + panic("no return value specified for NewApproval") + } + var r0 syncasync.Sender if rf, ok := ret.Get(0).(func(*core.TokenApprovalInput) syncasync.Sender); ok { r0 = rf(approve) @@ -490,6 +562,10 @@ func (_m *Manager) NewApproval(approve *core.TokenApprovalInput) syncasync.Sende func (_m *Manager) NewTransfer(transfer *core.TokenTransferInput) syncasync.Sender { ret := _m.Called(transfer) + if len(ret) == 0 { + panic("no return value specified for NewTransfer") + } + var r0 syncasync.Sender if rf, ok := ret.Get(0).(func(*core.TokenTransferInput) syncasync.Sender); ok { r0 = rf(transfer) @@ -506,6 +582,10 @@ func (_m *Manager) NewTransfer(transfer *core.TokenTransferInput) syncasync.Send func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*core.PreparedOperation, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for PrepareOperation") + } + var r0 *core.PreparedOperation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation) (*core.PreparedOperation, error)); ok { @@ -532,6 +612,10 @@ func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*c func (_m *Manager) ResolvePoolMethods(ctx context.Context, pool *core.TokenPool) error { ret := _m.Called(ctx, pool) + if len(ret) == 0 { + panic("no return value specified for ResolvePoolMethods") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPool) error); ok { r0 = rf(ctx, pool) @@ -546,6 +630,10 @@ func (_m *Manager) ResolvePoolMethods(ctx context.Context, pool *core.TokenPool) func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) (fftypes.JSONObject, core.OpPhase, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for RunOperation") + } + var r0 fftypes.JSONObject var r1 core.OpPhase var r2 error @@ -579,6 +667,10 @@ func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) func (_m *Manager) TokenApproval(ctx context.Context, approval *core.TokenApprovalInput, waitConfirm bool) (*core.TokenApproval, error) { ret := _m.Called(ctx, approval, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for TokenApproval") + } + var r0 *core.TokenApproval var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenApprovalInput, bool) (*core.TokenApproval, error)); ok { @@ -605,6 +697,10 @@ func (_m *Manager) TokenApproval(ctx context.Context, approval *core.TokenApprov func (_m *Manager) TransferTokens(ctx context.Context, transfer *core.TokenTransferInput, waitConfirm bool) (*core.TokenTransfer, error) { ret := _m.Called(ctx, transfer, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for TransferTokens") + } + var r0 *core.TokenTransfer var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenTransferInput, bool) (*core.TokenTransfer, error)); ok { diff --git a/mocks/batchmocks/manager.go b/mocks/batchmocks/manager.go index 5fb28c04a..c938d70a7 100644 --- a/mocks/batchmocks/manager.go +++ b/mocks/batchmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package batchmocks @@ -26,6 +26,10 @@ func (_m *Manager) Close() { func (_m *Manager) LoadContexts(ctx context.Context, payload *batch.DispatchPayload) error { ret := _m.Called(ctx, payload) + if len(ret) == 0 { + panic("no return value specified for LoadContexts") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *batch.DispatchPayload) error); ok { r0 = rf(ctx, payload) @@ -40,6 +44,10 @@ func (_m *Manager) LoadContexts(ctx context.Context, payload *batch.DispatchPayl func (_m *Manager) NewMessages() chan<- int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NewMessages") + } + var r0 chan<- int64 if rf, ok := ret.Get(0).(func() chan<- int64); ok { r0 = rf() @@ -61,6 +69,10 @@ func (_m *Manager) RegisterDispatcher(name string, txType fftypes.FFEnum, msgTyp func (_m *Manager) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -75,6 +87,10 @@ func (_m *Manager) Start() error { func (_m *Manager) Status() *batch.ManagerStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 *batch.ManagerStatus if rf, ok := ret.Get(0).(func() *batch.ManagerStatus); ok { r0 = rf() diff --git a/mocks/blockchaincommonmocks/firefly_subscriptions.go b/mocks/blockchaincommonmocks/firefly_subscriptions.go index 605e7ee38..c8ce82366 100644 --- a/mocks/blockchaincommonmocks/firefly_subscriptions.go +++ b/mocks/blockchaincommonmocks/firefly_subscriptions.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package blockchaincommonmocks @@ -26,6 +26,10 @@ func (_m *FireflySubscriptions) AddSubscription(ctx context.Context, namespace * func (_m *FireflySubscriptions) GetSubscription(subID string) *common.SubscriptionInfo { ret := _m.Called(subID) + if len(ret) == 0 { + panic("no return value specified for GetSubscription") + } + var r0 *common.SubscriptionInfo if rf, ok := ret.Get(0).(func(string) *common.SubscriptionInfo); ok { r0 = rf(subID) diff --git a/mocks/blockchainmocks/callbacks.go b/mocks/blockchainmocks/callbacks.go index 56654c774..0769667f6 100644 --- a/mocks/blockchainmocks/callbacks.go +++ b/mocks/blockchainmocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package blockchainmocks @@ -16,6 +16,10 @@ type Callbacks struct { func (_m *Callbacks) BlockchainEventBatch(batch []*blockchain.EventToDispatch) error { ret := _m.Called(batch) + if len(ret) == 0 { + panic("no return value specified for BlockchainEventBatch") + } + var r0 error if rf, ok := ret.Get(0).(func([]*blockchain.EventToDispatch) error); ok { r0 = rf(batch) diff --git a/mocks/blockchainmocks/plugin.go b/mocks/blockchainmocks/plugin.go index ab1812f64..1f0802259 100644 --- a/mocks/blockchainmocks/plugin.go +++ b/mocks/blockchainmocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package blockchainmocks @@ -28,6 +28,10 @@ type Plugin struct { func (_m *Plugin) AddContractListener(ctx context.Context, subscription *core.ContractListener) error { ret := _m.Called(ctx, subscription) + if len(ret) == 0 { + panic("no return value specified for AddContractListener") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.ContractListener) error); ok { r0 = rf(ctx, subscription) @@ -42,6 +46,10 @@ func (_m *Plugin) AddContractListener(ctx context.Context, subscription *core.Co func (_m *Plugin) AddFireflySubscription(ctx context.Context, namespace *core.Namespace, contract *blockchain.MultipartyContract) (string, error) { ret := _m.Called(ctx, namespace, contract) + if len(ret) == 0 { + panic("no return value specified for AddFireflySubscription") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Namespace, *blockchain.MultipartyContract) (string, error)); ok { @@ -66,6 +74,10 @@ func (_m *Plugin) AddFireflySubscription(ctx context.Context, namespace *core.Na func (_m *Plugin) Capabilities() *blockchain.Capabilities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Capabilities") + } + var r0 *blockchain.Capabilities if rf, ok := ret.Get(0).(func() *blockchain.Capabilities); ok { r0 = rf() @@ -82,6 +94,10 @@ func (_m *Plugin) Capabilities() *blockchain.Capabilities { func (_m *Plugin) DeleteContractListener(ctx context.Context, subscription *core.ContractListener, okNotFound bool) error { ret := _m.Called(ctx, subscription, okNotFound) + if len(ret) == 0 { + panic("no return value specified for DeleteContractListener") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.ContractListener, bool) error); ok { r0 = rf(ctx, subscription, okNotFound) @@ -93,23 +109,41 @@ func (_m *Plugin) DeleteContractListener(ctx context.Context, subscription *core } // DeployContract provides a mock function with given fields: ctx, nsOpID, signingKey, definition, contract, input, options -func (_m *Plugin) DeployContract(ctx context.Context, nsOpID string, signingKey string, definition *fftypes.JSONAny, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) error { +func (_m *Plugin) DeployContract(ctx context.Context, nsOpID string, signingKey string, definition *fftypes.JSONAny, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (bool, error) { ret := _m.Called(ctx, nsOpID, signingKey, definition, contract, input, options) - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, *fftypes.JSONAny, *fftypes.JSONAny, []interface{}, map[string]interface{}) error); ok { + if len(ret) == 0 { + panic("no return value specified for DeployContract") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, *fftypes.JSONAny, *fftypes.JSONAny, []interface{}, map[string]interface{}) (bool, error)); ok { + return rf(ctx, nsOpID, signingKey, definition, contract, input, options) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, *fftypes.JSONAny, *fftypes.JSONAny, []interface{}, map[string]interface{}) bool); ok { r0 = rf(ctx, nsOpID, signingKey, definition, contract, input, options) } else { - r0 = ret.Error(0) + r0 = ret.Get(0).(bool) } - return r0 + if rf, ok := ret.Get(1).(func(context.Context, string, string, *fftypes.JSONAny, *fftypes.JSONAny, []interface{}, map[string]interface{}) error); ok { + r1 = rf(ctx, nsOpID, signingKey, definition, contract, input, options) + } else { + r1 = ret.Error(1) + } + + return r0, r1 } // GenerateErrorSignature provides a mock function with given fields: ctx, errorDef func (_m *Plugin) GenerateErrorSignature(ctx context.Context, errorDef *fftypes.FFIErrorDefinition) string { ret := _m.Called(ctx, errorDef) + if len(ret) == 0 { + panic("no return value specified for GenerateErrorSignature") + } + var r0 string if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIErrorDefinition) string); ok { r0 = rf(ctx, errorDef) @@ -124,6 +158,10 @@ func (_m *Plugin) GenerateErrorSignature(ctx context.Context, errorDef *fftypes. func (_m *Plugin) GenerateEventSignature(ctx context.Context, event *fftypes.FFIEventDefinition) string { ret := _m.Called(ctx, event) + if len(ret) == 0 { + panic("no return value specified for GenerateEventSignature") + } + var r0 string if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIEventDefinition) string); ok { r0 = rf(ctx, event) @@ -138,6 +176,10 @@ func (_m *Plugin) GenerateEventSignature(ctx context.Context, event *fftypes.FFI func (_m *Plugin) GenerateFFI(ctx context.Context, generationRequest *fftypes.FFIGenerationRequest) (*fftypes.FFI, error) { ret := _m.Called(ctx, generationRequest) + if len(ret) == 0 { + panic("no return value specified for GenerateFFI") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIGenerationRequest) (*fftypes.FFI, error)); ok { @@ -164,6 +206,10 @@ func (_m *Plugin) GenerateFFI(ctx context.Context, generationRequest *fftypes.FF func (_m *Plugin) GetAndConvertDeprecatedContractConfig(ctx context.Context) (*fftypes.JSONAny, string, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetAndConvertDeprecatedContractConfig") + } + var r0 *fftypes.JSONAny var r1 string var r2 error @@ -197,6 +243,10 @@ func (_m *Plugin) GetAndConvertDeprecatedContractConfig(ctx context.Context) (*f func (_m *Plugin) GetContractListenerStatus(ctx context.Context, subID string, okNotFound bool) (bool, interface{}, error) { ret := _m.Called(ctx, subID, okNotFound) + if len(ret) == 0 { + panic("no return value specified for GetContractListenerStatus") + } + var r0 bool var r1 interface{} var r2 error @@ -230,6 +280,10 @@ func (_m *Plugin) GetContractListenerStatus(ctx context.Context, subID string, o func (_m *Plugin) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamValidator, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetFFIParamValidator") + } + var r0 fftypes.FFIParamValidator var r1 error if rf, ok := ret.Get(0).(func(context.Context) (fftypes.FFIParamValidator, error)); ok { @@ -256,6 +310,10 @@ func (_m *Plugin) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamVal func (_m *Plugin) GetNetworkVersion(ctx context.Context, location *fftypes.JSONAny) (int, error) { ret := _m.Called(ctx, location) + if len(ret) == 0 { + panic("no return value specified for GetNetworkVersion") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.JSONAny) (int, error)); ok { @@ -280,6 +338,10 @@ func (_m *Plugin) GetNetworkVersion(ctx context.Context, location *fftypes.JSONA func (_m *Plugin) GetTransactionStatus(ctx context.Context, operation *core.Operation) (interface{}, error) { ret := _m.Called(ctx, operation) + if len(ret) == 0 { + panic("no return value specified for GetTransactionStatus") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation) (interface{}, error)); ok { @@ -306,6 +368,10 @@ func (_m *Plugin) GetTransactionStatus(ctx context.Context, operation *core.Oper func (_m *Plugin) Init(ctx context.Context, cancelCtx context.CancelFunc, _a2 config.Section, _a3 metrics.Manager, cacheManager cache.Manager) error { ret := _m.Called(ctx, cancelCtx, _a2, _a3, cacheManager) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, context.CancelFunc, config.Section, metrics.Manager, cache.Manager) error); ok { r0 = rf(ctx, cancelCtx, _a2, _a3, cacheManager) @@ -322,23 +388,41 @@ func (_m *Plugin) InitConfig(_a0 config.Section) { } // InvokeContract provides a mock function with given fields: ctx, nsOpID, signingKey, location, parsedMethod, input, options, batch -func (_m *Plugin) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) error { +func (_m *Plugin) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error) { ret := _m.Called(ctx, nsOpID, signingKey, location, parsedMethod, input, options, batch) - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, *fftypes.JSONAny, interface{}, map[string]interface{}, map[string]interface{}, *blockchain.BatchPin) error); ok { + if len(ret) == 0 { + panic("no return value specified for InvokeContract") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, *fftypes.JSONAny, interface{}, map[string]interface{}, map[string]interface{}, *blockchain.BatchPin) (bool, error)); ok { + return rf(ctx, nsOpID, signingKey, location, parsedMethod, input, options, batch) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, *fftypes.JSONAny, interface{}, map[string]interface{}, map[string]interface{}, *blockchain.BatchPin) bool); ok { r0 = rf(ctx, nsOpID, signingKey, location, parsedMethod, input, options, batch) } else { - r0 = ret.Error(0) + r0 = ret.Get(0).(bool) } - return r0 + if rf, ok := ret.Get(1).(func(context.Context, string, string, *fftypes.JSONAny, interface{}, map[string]interface{}, map[string]interface{}, *blockchain.BatchPin) error); ok { + r1 = rf(ctx, nsOpID, signingKey, location, parsedMethod, input, options, batch) + } else { + r1 = ret.Error(1) + } + + return r0, r1 } // Name provides a mock function with given fields: func (_m *Plugin) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -353,6 +437,10 @@ func (_m *Plugin) Name() string { func (_m *Plugin) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (*fftypes.JSONAny, error) { ret := _m.Called(ctx, ntype, location) + if len(ret) == 0 { + panic("no return value specified for NormalizeContractLocation") + } + var r0 *fftypes.JSONAny var r1 error if rf, ok := ret.Get(0).(func(context.Context, blockchain.NormalizeType, *fftypes.JSONAny) (*fftypes.JSONAny, error)); ok { @@ -379,6 +467,10 @@ func (_m *Plugin) NormalizeContractLocation(ctx context.Context, ntype blockchai func (_m *Plugin) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errors []*fftypes.FFIError) (interface{}, error) { ret := _m.Called(ctx, method, errors) + if len(ret) == 0 { + panic("no return value specified for ParseInterface") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIMethod, []*fftypes.FFIError) (interface{}, error)); ok { @@ -405,6 +497,10 @@ func (_m *Plugin) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, func (_m *Plugin) QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error) { ret := _m.Called(ctx, signingKey, location, parsedMethod, input, options) + if len(ret) == 0 { + panic("no return value specified for QueryContract") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.JSONAny, interface{}, map[string]interface{}, map[string]interface{}) (interface{}, error)); ok { @@ -436,6 +532,10 @@ func (_m *Plugin) RemoveFireflySubscription(ctx context.Context, subID string) { func (_m *Plugin) ResolveSigningKey(ctx context.Context, keyRef string, intent blockchain.ResolveKeyIntent) (string, error) { ret := _m.Called(ctx, keyRef, intent) + if len(ret) == 0 { + panic("no return value specified for ResolveSigningKey") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, blockchain.ResolveKeyIntent) (string, error)); ok { @@ -470,6 +570,10 @@ func (_m *Plugin) SetOperationHandler(namespace string, handler core.OperationCa func (_m *Plugin) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -484,6 +588,10 @@ func (_m *Plugin) Start() error { func (_m *Plugin) SubmitBatchPin(ctx context.Context, nsOpID string, networkNamespace string, signingKey string, batch *blockchain.BatchPin, location *fftypes.JSONAny) error { ret := _m.Called(ctx, nsOpID, networkNamespace, signingKey, batch, location) + if len(ret) == 0 { + panic("no return value specified for SubmitBatchPin") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *blockchain.BatchPin, *fftypes.JSONAny) error); ok { r0 = rf(ctx, nsOpID, networkNamespace, signingKey, batch, location) @@ -498,6 +606,10 @@ func (_m *Plugin) SubmitBatchPin(ctx context.Context, nsOpID string, networkName func (_m *Plugin) SubmitNetworkAction(ctx context.Context, nsOpID string, signingKey string, action fftypes.FFEnum, location *fftypes.JSONAny) error { ret := _m.Called(ctx, nsOpID, signingKey, action, location) + if len(ret) == 0 { + panic("no return value specified for SubmitNetworkAction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, fftypes.FFEnum, *fftypes.JSONAny) error); ok { r0 = rf(ctx, nsOpID, signingKey, action, location) @@ -512,6 +624,10 @@ func (_m *Plugin) SubmitNetworkAction(ctx context.Context, nsOpID string, signin func (_m *Plugin) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error { ret := _m.Called(ctx, parsedMethod, input, hasMessage) + if len(ret) == 0 { + panic("no return value specified for ValidateInvokeRequest") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, map[string]interface{}, bool) error); ok { r0 = rf(ctx, parsedMethod, input, hasMessage) @@ -526,6 +642,10 @@ func (_m *Plugin) ValidateInvokeRequest(ctx context.Context, parsedMethod interf func (_m *Plugin) VerifierType() fftypes.FFEnum { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for VerifierType") + } + var r0 fftypes.FFEnum if rf, ok := ret.Get(0).(func() fftypes.FFEnum); ok { r0 = rf() diff --git a/mocks/broadcastmocks/manager.go b/mocks/broadcastmocks/manager.go index ad208a2fb..76b9fcefc 100644 --- a/mocks/broadcastmocks/manager.go +++ b/mocks/broadcastmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package broadcastmocks @@ -22,6 +22,10 @@ type Manager struct { func (_m *Manager) BroadcastMessage(ctx context.Context, in *core.MessageInOut, waitConfirm bool) (*core.Message, error) { ret := _m.Called(ctx, in, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for BroadcastMessage") + } + var r0 *core.Message var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.MessageInOut, bool) (*core.Message, error)); ok { @@ -48,6 +52,10 @@ func (_m *Manager) BroadcastMessage(ctx context.Context, in *core.MessageInOut, func (_m *Manager) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -62,6 +70,10 @@ func (_m *Manager) Name() string { func (_m *Manager) NewBroadcast(in *core.MessageInOut) syncasync.Sender { ret := _m.Called(in) + if len(ret) == 0 { + panic("no return value specified for NewBroadcast") + } + var r0 syncasync.Sender if rf, ok := ret.Get(0).(func(*core.MessageInOut) syncasync.Sender); ok { r0 = rf(in) @@ -78,6 +90,10 @@ func (_m *Manager) NewBroadcast(in *core.MessageInOut) syncasync.Sender { func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*core.PreparedOperation, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for PrepareOperation") + } + var r0 *core.PreparedOperation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation) (*core.PreparedOperation, error)); ok { @@ -104,6 +120,10 @@ func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*c func (_m *Manager) PublishDataBlob(ctx context.Context, id string, idempotencyKey core.IdempotencyKey) (*core.Data, error) { ret := _m.Called(ctx, id, idempotencyKey) + if len(ret) == 0 { + panic("no return value specified for PublishDataBlob") + } + var r0 *core.Data var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, core.IdempotencyKey) (*core.Data, error)); ok { @@ -130,6 +150,10 @@ func (_m *Manager) PublishDataBlob(ctx context.Context, id string, idempotencyKe func (_m *Manager) PublishDataValue(ctx context.Context, id string, idempotencyKey core.IdempotencyKey) (*core.Data, error) { ret := _m.Called(ctx, id, idempotencyKey) + if len(ret) == 0 { + panic("no return value specified for PublishDataValue") + } + var r0 *core.Data var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, core.IdempotencyKey) (*core.Data, error)); ok { @@ -156,6 +180,10 @@ func (_m *Manager) PublishDataValue(ctx context.Context, id string, idempotencyK func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) (fftypes.JSONObject, core.OpPhase, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for RunOperation") + } + var r0 fftypes.JSONObject var r1 core.OpPhase var r2 error @@ -189,6 +217,10 @@ func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) func (_m *Manager) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() diff --git a/mocks/cachemocks/manager.go b/mocks/cachemocks/manager.go index 9dee64684..d8569e249 100644 --- a/mocks/cachemocks/manager.go +++ b/mocks/cachemocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package cachemocks @@ -16,6 +16,10 @@ type Manager struct { func (_m *Manager) GetCache(cc *cache.CConfig) (cache.CInterface, error) { ret := _m.Called(cc) + if len(ret) == 0 { + panic("no return value specified for GetCache") + } + var r0 cache.CInterface var r1 error if rf, ok := ret.Get(0).(func(*cache.CConfig) (cache.CInterface, error)); ok { @@ -42,6 +46,10 @@ func (_m *Manager) GetCache(cc *cache.CConfig) (cache.CInterface, error) { func (_m *Manager) ListCacheNames(namespace string) []string { ret := _m.Called(namespace) + if len(ret) == 0 { + panic("no return value specified for ListCacheNames") + } + var r0 []string if rf, ok := ret.Get(0).(func(string) []string); ok { r0 = rf(namespace) diff --git a/mocks/contractmocks/manager.go b/mocks/contractmocks/manager.go index 7b45ecc53..042061c6f 100644 --- a/mocks/contractmocks/manager.go +++ b/mocks/contractmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package contractmocks @@ -23,6 +23,10 @@ type Manager struct { func (_m *Manager) AddContractAPIListener(ctx context.Context, apiName string, eventPath string, listener *core.ContractListener) (*core.ContractListener, error) { ret := _m.Called(ctx, apiName, eventPath, listener) + if len(ret) == 0 { + panic("no return value specified for AddContractAPIListener") + } + var r0 *core.ContractListener var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, *core.ContractListener) (*core.ContractListener, error)); ok { @@ -49,6 +53,10 @@ func (_m *Manager) AddContractAPIListener(ctx context.Context, apiName string, e func (_m *Manager) AddContractListener(ctx context.Context, listener *core.ContractListenerInput) (*core.ContractListener, error) { ret := _m.Called(ctx, listener) + if len(ret) == 0 { + panic("no return value specified for AddContractListener") + } + var r0 *core.ContractListener var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.ContractListenerInput) (*core.ContractListener, error)); ok { @@ -75,6 +83,10 @@ func (_m *Manager) AddContractListener(ctx context.Context, listener *core.Contr func (_m *Manager) DeleteContractAPI(ctx context.Context, apiName string) error { ret := _m.Called(ctx, apiName) + if len(ret) == 0 { + panic("no return value specified for DeleteContractAPI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, apiName) @@ -89,6 +101,10 @@ func (_m *Manager) DeleteContractAPI(ctx context.Context, apiName string) error func (_m *Manager) DeleteContractListenerByNameOrID(ctx context.Context, nameOrID string) error { ret := _m.Called(ctx, nameOrID) + if len(ret) == 0 { + panic("no return value specified for DeleteContractListenerByNameOrID") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, nameOrID) @@ -103,6 +119,10 @@ func (_m *Manager) DeleteContractListenerByNameOrID(ctx context.Context, nameOrI func (_m *Manager) DeleteFFI(ctx context.Context, id *fftypes.UUID) error { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for DeleteFFI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) error); ok { r0 = rf(ctx, id) @@ -117,6 +137,10 @@ func (_m *Manager) DeleteFFI(ctx context.Context, id *fftypes.UUID) error { func (_m *Manager) DeployContract(ctx context.Context, req *core.ContractDeployRequest, waitConfirm bool) (interface{}, error) { ret := _m.Called(ctx, req, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for DeployContract") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.ContractDeployRequest, bool) (interface{}, error)); ok { @@ -143,6 +167,10 @@ func (_m *Manager) DeployContract(ctx context.Context, req *core.ContractDeployR func (_m *Manager) GenerateFFI(ctx context.Context, generationRequest *fftypes.FFIGenerationRequest) (*fftypes.FFI, error) { ret := _m.Called(ctx, generationRequest) + if len(ret) == 0 { + panic("no return value specified for GenerateFFI") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIGenerationRequest) (*fftypes.FFI, error)); ok { @@ -169,6 +197,10 @@ func (_m *Manager) GenerateFFI(ctx context.Context, generationRequest *fftypes.F func (_m *Manager) GetContractAPI(ctx context.Context, httpServerURL string, apiName string) (*core.ContractAPI, error) { ret := _m.Called(ctx, httpServerURL, apiName) + if len(ret) == 0 { + panic("no return value specified for GetContractAPI") + } + var r0 *core.ContractAPI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.ContractAPI, error)); ok { @@ -195,6 +227,10 @@ func (_m *Manager) GetContractAPI(ctx context.Context, httpServerURL string, api func (_m *Manager) GetContractAPIInterface(ctx context.Context, apiName string) (*fftypes.FFI, error) { ret := _m.Called(ctx, apiName) + if len(ret) == 0 { + panic("no return value specified for GetContractAPIInterface") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*fftypes.FFI, error)); ok { @@ -221,6 +257,10 @@ func (_m *Manager) GetContractAPIInterface(ctx context.Context, apiName string) func (_m *Manager) GetContractAPIListeners(ctx context.Context, apiName string, eventPath string, filter ffapi.AndFilter) ([]*core.ContractListener, *ffapi.FilterResult, error) { ret := _m.Called(ctx, apiName, eventPath, filter) + if len(ret) == 0 { + panic("no return value specified for GetContractAPIListeners") + } + var r0 []*core.ContractListener var r1 *ffapi.FilterResult var r2 error @@ -256,6 +296,10 @@ func (_m *Manager) GetContractAPIListeners(ctx context.Context, apiName string, func (_m *Manager) GetContractAPIs(ctx context.Context, httpServerURL string, filter ffapi.AndFilter) ([]*core.ContractAPI, *ffapi.FilterResult, error) { ret := _m.Called(ctx, httpServerURL, filter) + if len(ret) == 0 { + panic("no return value specified for GetContractAPIs") + } + var r0 []*core.ContractAPI var r1 *ffapi.FilterResult var r2 error @@ -291,6 +335,10 @@ func (_m *Manager) GetContractAPIs(ctx context.Context, httpServerURL string, fi func (_m *Manager) GetContractListenerByNameOrID(ctx context.Context, nameOrID string) (*core.ContractListener, error) { ret := _m.Called(ctx, nameOrID) + if len(ret) == 0 { + panic("no return value specified for GetContractListenerByNameOrID") + } + var r0 *core.ContractListener var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.ContractListener, error)); ok { @@ -317,6 +365,10 @@ func (_m *Manager) GetContractListenerByNameOrID(ctx context.Context, nameOrID s func (_m *Manager) GetContractListenerByNameOrIDWithStatus(ctx context.Context, nameOrID string) (*core.ContractListenerWithStatus, error) { ret := _m.Called(ctx, nameOrID) + if len(ret) == 0 { + panic("no return value specified for GetContractListenerByNameOrIDWithStatus") + } + var r0 *core.ContractListenerWithStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.ContractListenerWithStatus, error)); ok { @@ -343,6 +395,10 @@ func (_m *Manager) GetContractListenerByNameOrIDWithStatus(ctx context.Context, func (_m *Manager) GetContractListeners(ctx context.Context, filter ffapi.AndFilter) ([]*core.ContractListener, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetContractListeners") + } + var r0 []*core.ContractListener var r1 *ffapi.FilterResult var r2 error @@ -378,6 +434,10 @@ func (_m *Manager) GetContractListeners(ctx context.Context, filter ffapi.AndFil func (_m *Manager) GetFFI(ctx context.Context, name string, version string) (*fftypes.FFI, error) { ret := _m.Called(ctx, name, version) + if len(ret) == 0 { + panic("no return value specified for GetFFI") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*fftypes.FFI, error)); ok { @@ -404,6 +464,10 @@ func (_m *Manager) GetFFI(ctx context.Context, name string, version string) (*ff func (_m *Manager) GetFFIByID(ctx context.Context, id *fftypes.UUID) (*fftypes.FFI, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetFFIByID") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) (*fftypes.FFI, error)); ok { @@ -430,6 +494,10 @@ func (_m *Manager) GetFFIByID(ctx context.Context, id *fftypes.UUID) (*fftypes.F func (_m *Manager) GetFFIByIDWithChildren(ctx context.Context, id *fftypes.UUID) (*fftypes.FFI, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetFFIByIDWithChildren") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) (*fftypes.FFI, error)); ok { @@ -456,6 +524,10 @@ func (_m *Manager) GetFFIByIDWithChildren(ctx context.Context, id *fftypes.UUID) func (_m *Manager) GetFFIEvents(ctx context.Context, id *fftypes.UUID) ([]*fftypes.FFIEvent, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetFFIEvents") + } + var r0 []*fftypes.FFIEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) ([]*fftypes.FFIEvent, error)); ok { @@ -482,6 +554,10 @@ func (_m *Manager) GetFFIEvents(ctx context.Context, id *fftypes.UUID) ([]*fftyp func (_m *Manager) GetFFIMethods(ctx context.Context, id *fftypes.UUID) ([]*fftypes.FFIMethod, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetFFIMethods") + } + var r0 []*fftypes.FFIMethod var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) ([]*fftypes.FFIMethod, error)); ok { @@ -508,6 +584,10 @@ func (_m *Manager) GetFFIMethods(ctx context.Context, id *fftypes.UUID) ([]*ffty func (_m *Manager) GetFFIWithChildren(ctx context.Context, name string, version string) (*fftypes.FFI, error) { ret := _m.Called(ctx, name, version) + if len(ret) == 0 { + panic("no return value specified for GetFFIWithChildren") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*fftypes.FFI, error)); ok { @@ -534,6 +614,10 @@ func (_m *Manager) GetFFIWithChildren(ctx context.Context, name string, version func (_m *Manager) GetFFIs(ctx context.Context, filter ffapi.AndFilter) ([]*fftypes.FFI, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetFFIs") + } + var r0 []*fftypes.FFI var r1 *ffapi.FilterResult var r2 error @@ -569,6 +653,10 @@ func (_m *Manager) GetFFIs(ctx context.Context, filter ffapi.AndFilter) ([]*ffty func (_m *Manager) InvokeContract(ctx context.Context, req *core.ContractCallRequest, waitConfirm bool) (interface{}, error) { ret := _m.Called(ctx, req, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for InvokeContract") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.ContractCallRequest, bool) (interface{}, error)); ok { @@ -595,6 +683,10 @@ func (_m *Manager) InvokeContract(ctx context.Context, req *core.ContractCallReq func (_m *Manager) InvokeContractAPI(ctx context.Context, apiName string, methodPath string, req *core.ContractCallRequest, waitConfirm bool) (interface{}, error) { ret := _m.Called(ctx, apiName, methodPath, req, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for InvokeContractAPI") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, *core.ContractCallRequest, bool) (interface{}, error)); ok { @@ -621,6 +713,10 @@ func (_m *Manager) InvokeContractAPI(ctx context.Context, apiName string, method func (_m *Manager) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -635,6 +731,10 @@ func (_m *Manager) Name() string { func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*core.PreparedOperation, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for PrepareOperation") + } + var r0 *core.PreparedOperation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation) (*core.PreparedOperation, error)); ok { @@ -661,6 +761,10 @@ func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*c func (_m *Manager) ResolveContractAPI(ctx context.Context, httpServerURL string, api *core.ContractAPI) error { ret := _m.Called(ctx, httpServerURL, api) + if len(ret) == 0 { + panic("no return value specified for ResolveContractAPI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *core.ContractAPI) error); ok { r0 = rf(ctx, httpServerURL, api) @@ -675,6 +779,10 @@ func (_m *Manager) ResolveContractAPI(ctx context.Context, httpServerURL string, func (_m *Manager) ResolveFFI(ctx context.Context, ffi *fftypes.FFI) error { ret := _m.Called(ctx, ffi) + if len(ret) == 0 { + panic("no return value specified for ResolveFFI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFI) error); ok { r0 = rf(ctx, ffi) @@ -689,6 +797,10 @@ func (_m *Manager) ResolveFFI(ctx context.Context, ffi *fftypes.FFI) error { func (_m *Manager) ResolveFFIReference(ctx context.Context, ref *fftypes.FFIReference) error { ret := _m.Called(ctx, ref) + if len(ret) == 0 { + panic("no return value specified for ResolveFFIReference") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIReference) error); ok { r0 = rf(ctx, ref) @@ -703,6 +815,10 @@ func (_m *Manager) ResolveFFIReference(ctx context.Context, ref *fftypes.FFIRefe func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) (fftypes.JSONObject, core.OpPhase, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for RunOperation") + } + var r0 fftypes.JSONObject var r1 core.OpPhase var r2 error diff --git a/mocks/coremocks/operation_callbacks.go b/mocks/coremocks/operation_callbacks.go index 9035e4336..c628ce6a4 100644 --- a/mocks/coremocks/operation_callbacks.go +++ b/mocks/coremocks/operation_callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package coremocks diff --git a/mocks/databasemocks/callbacks.go b/mocks/databasemocks/callbacks.go index bbbf7e172..ff790d9eb 100644 --- a/mocks/databasemocks/callbacks.go +++ b/mocks/databasemocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package databasemocks diff --git a/mocks/databasemocks/plugin.go b/mocks/databasemocks/plugin.go index 387f87a6d..9050baa0b 100644 --- a/mocks/databasemocks/plugin.go +++ b/mocks/databasemocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package databasemocks @@ -27,6 +27,10 @@ type Plugin struct { func (_m *Plugin) Capabilities() *database.Capabilities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Capabilities") + } + var r0 *database.Capabilities if rf, ok := ret.Get(0).(func() *database.Capabilities); ok { r0 = rf() @@ -43,6 +47,10 @@ func (_m *Plugin) Capabilities() *database.Capabilities { func (_m *Plugin) DeleteBlob(ctx context.Context, sequence int64) error { ret := _m.Called(ctx, sequence) + if len(ret) == 0 { + panic("no return value specified for DeleteBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { r0 = rf(ctx, sequence) @@ -57,6 +65,10 @@ func (_m *Plugin) DeleteBlob(ctx context.Context, sequence int64) error { func (_m *Plugin) DeleteContractAPI(ctx context.Context, namespace string, id *fftypes.UUID) error { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for DeleteContractAPI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, id) @@ -71,6 +83,10 @@ func (_m *Plugin) DeleteContractAPI(ctx context.Context, namespace string, id *f func (_m *Plugin) DeleteContractListenerByID(ctx context.Context, namespace string, id *fftypes.UUID) error { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for DeleteContractListenerByID") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, id) @@ -85,6 +101,10 @@ func (_m *Plugin) DeleteContractListenerByID(ctx context.Context, namespace stri func (_m *Plugin) DeleteData(ctx context.Context, namespace string, id *fftypes.UUID) error { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for DeleteData") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, id) @@ -99,6 +119,10 @@ func (_m *Plugin) DeleteData(ctx context.Context, namespace string, id *fftypes. func (_m *Plugin) DeleteFFI(ctx context.Context, namespace string, id *fftypes.UUID) error { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for DeleteFFI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, id) @@ -113,6 +137,10 @@ func (_m *Plugin) DeleteFFI(ctx context.Context, namespace string, id *fftypes.U func (_m *Plugin) DeleteNonce(ctx context.Context, hash *fftypes.Bytes32) error { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for DeleteNonce") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) error); ok { r0 = rf(ctx, hash) @@ -127,6 +155,10 @@ func (_m *Plugin) DeleteNonce(ctx context.Context, hash *fftypes.Bytes32) error func (_m *Plugin) DeleteOffset(ctx context.Context, t fftypes.FFEnum, name string) error { ret := _m.Called(ctx, t, name) + if len(ret) == 0 { + panic("no return value specified for DeleteOffset") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, fftypes.FFEnum, string) error); ok { r0 = rf(ctx, t, name) @@ -141,6 +173,10 @@ func (_m *Plugin) DeleteOffset(ctx context.Context, t fftypes.FFEnum, name strin func (_m *Plugin) DeleteSubscriptionByID(ctx context.Context, namespace string, id *fftypes.UUID) error { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for DeleteSubscriptionByID") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, id) @@ -155,6 +191,10 @@ func (_m *Plugin) DeleteSubscriptionByID(ctx context.Context, namespace string, func (_m *Plugin) DeleteTokenApprovals(ctx context.Context, namespace string, poolID *fftypes.UUID) error { ret := _m.Called(ctx, namespace, poolID) + if len(ret) == 0 { + panic("no return value specified for DeleteTokenApprovals") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, poolID) @@ -169,6 +209,10 @@ func (_m *Plugin) DeleteTokenApprovals(ctx context.Context, namespace string, po func (_m *Plugin) DeleteTokenBalances(ctx context.Context, namespace string, poolID *fftypes.UUID) error { ret := _m.Called(ctx, namespace, poolID) + if len(ret) == 0 { + panic("no return value specified for DeleteTokenBalances") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, poolID) @@ -183,6 +227,10 @@ func (_m *Plugin) DeleteTokenBalances(ctx context.Context, namespace string, poo func (_m *Plugin) DeleteTokenPool(ctx context.Context, namespace string, id *fftypes.UUID) error { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for DeleteTokenPool") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, id) @@ -197,6 +245,10 @@ func (_m *Plugin) DeleteTokenPool(ctx context.Context, namespace string, id *fft func (_m *Plugin) DeleteTokenTransfers(ctx context.Context, namespace string, poolID *fftypes.UUID) error { ret := _m.Called(ctx, namespace, poolID) + if len(ret) == 0 { + panic("no return value specified for DeleteTokenTransfers") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) error); ok { r0 = rf(ctx, namespace, poolID) @@ -211,6 +263,10 @@ func (_m *Plugin) DeleteTokenTransfers(ctx context.Context, namespace string, po func (_m *Plugin) GetBatchByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.BatchPersisted, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetBatchByID") + } + var r0 *core.BatchPersisted var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.BatchPersisted, error)); ok { @@ -237,6 +293,10 @@ func (_m *Plugin) GetBatchByID(ctx context.Context, namespace string, id *fftype func (_m *Plugin) GetBatchIDsForDataAttachments(ctx context.Context, namespace string, dataIDs []*fftypes.UUID) ([]*fftypes.UUID, error) { ret := _m.Called(ctx, namespace, dataIDs) + if len(ret) == 0 { + panic("no return value specified for GetBatchIDsForDataAttachments") + } + var r0 []*fftypes.UUID var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, []*fftypes.UUID) ([]*fftypes.UUID, error)); ok { @@ -263,6 +323,10 @@ func (_m *Plugin) GetBatchIDsForDataAttachments(ctx context.Context, namespace s func (_m *Plugin) GetBatchIDsForMessages(ctx context.Context, namespace string, msgIDs []*fftypes.UUID) ([]*fftypes.UUID, error) { ret := _m.Called(ctx, namespace, msgIDs) + if len(ret) == 0 { + panic("no return value specified for GetBatchIDsForMessages") + } + var r0 []*fftypes.UUID var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, []*fftypes.UUID) ([]*fftypes.UUID, error)); ok { @@ -289,6 +353,10 @@ func (_m *Plugin) GetBatchIDsForMessages(ctx context.Context, namespace string, func (_m *Plugin) GetBatches(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.BatchPersisted, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetBatches") + } + var r0 []*core.BatchPersisted var r1 *ffapi.FilterResult var r2 error @@ -324,6 +392,10 @@ func (_m *Plugin) GetBatches(ctx context.Context, namespace string, filter ffapi func (_m *Plugin) GetBlobs(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Blob, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetBlobs") + } + var r0 []*core.Blob var r1 *ffapi.FilterResult var r2 error @@ -359,6 +431,10 @@ func (_m *Plugin) GetBlobs(ctx context.Context, namespace string, filter ffapi.F func (_m *Plugin) GetBlockchainEventByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.BlockchainEvent, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockchainEventByID") + } + var r0 *core.BlockchainEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.BlockchainEvent, error)); ok { @@ -385,6 +461,10 @@ func (_m *Plugin) GetBlockchainEventByID(ctx context.Context, namespace string, func (_m *Plugin) GetBlockchainEventByProtocolID(ctx context.Context, namespace string, listener *fftypes.UUID, protocolID string) (*core.BlockchainEvent, error) { ret := _m.Called(ctx, namespace, listener, protocolID) + if len(ret) == 0 { + panic("no return value specified for GetBlockchainEventByProtocolID") + } + var r0 *core.BlockchainEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, string) (*core.BlockchainEvent, error)); ok { @@ -411,6 +491,10 @@ func (_m *Plugin) GetBlockchainEventByProtocolID(ctx context.Context, namespace func (_m *Plugin) GetBlockchainEvents(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.BlockchainEvent, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetBlockchainEvents") + } + var r0 []*core.BlockchainEvent var r1 *ffapi.FilterResult var r2 error @@ -446,6 +530,10 @@ func (_m *Plugin) GetBlockchainEvents(ctx context.Context, namespace string, fil func (_m *Plugin) GetChartHistogram(ctx context.Context, namespace string, intervals []core.ChartHistogramInterval, collection database.CollectionName) ([]*core.ChartHistogram, error) { ret := _m.Called(ctx, namespace, intervals, collection) + if len(ret) == 0 { + panic("no return value specified for GetChartHistogram") + } + var r0 []*core.ChartHistogram var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, []core.ChartHistogramInterval, database.CollectionName) ([]*core.ChartHistogram, error)); ok { @@ -472,6 +560,10 @@ func (_m *Plugin) GetChartHistogram(ctx context.Context, namespace string, inter func (_m *Plugin) GetContractAPIByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.ContractAPI, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetContractAPIByID") + } + var r0 *core.ContractAPI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.ContractAPI, error)); ok { @@ -498,6 +590,10 @@ func (_m *Plugin) GetContractAPIByID(ctx context.Context, namespace string, id * func (_m *Plugin) GetContractAPIByName(ctx context.Context, namespace string, name string) (*core.ContractAPI, error) { ret := _m.Called(ctx, namespace, name) + if len(ret) == 0 { + panic("no return value specified for GetContractAPIByName") + } + var r0 *core.ContractAPI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.ContractAPI, error)); ok { @@ -524,6 +620,10 @@ func (_m *Plugin) GetContractAPIByName(ctx context.Context, namespace string, na func (_m *Plugin) GetContractAPIByNetworkName(ctx context.Context, namespace string, networkName string) (*core.ContractAPI, error) { ret := _m.Called(ctx, namespace, networkName) + if len(ret) == 0 { + panic("no return value specified for GetContractAPIByNetworkName") + } + var r0 *core.ContractAPI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.ContractAPI, error)); ok { @@ -550,6 +650,10 @@ func (_m *Plugin) GetContractAPIByNetworkName(ctx context.Context, namespace str func (_m *Plugin) GetContractAPIs(ctx context.Context, namespace string, filter ffapi.AndFilter) ([]*core.ContractAPI, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetContractAPIs") + } + var r0 []*core.ContractAPI var r1 *ffapi.FilterResult var r2 error @@ -585,6 +689,10 @@ func (_m *Plugin) GetContractAPIs(ctx context.Context, namespace string, filter func (_m *Plugin) GetContractListener(ctx context.Context, namespace string, name string) (*core.ContractListener, error) { ret := _m.Called(ctx, namespace, name) + if len(ret) == 0 { + panic("no return value specified for GetContractListener") + } + var r0 *core.ContractListener var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.ContractListener, error)); ok { @@ -611,6 +719,10 @@ func (_m *Plugin) GetContractListener(ctx context.Context, namespace string, nam func (_m *Plugin) GetContractListenerByBackendID(ctx context.Context, namespace string, id string) (*core.ContractListener, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetContractListenerByBackendID") + } + var r0 *core.ContractListener var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.ContractListener, error)); ok { @@ -637,6 +749,10 @@ func (_m *Plugin) GetContractListenerByBackendID(ctx context.Context, namespace func (_m *Plugin) GetContractListenerByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.ContractListener, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetContractListenerByID") + } + var r0 *core.ContractListener var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.ContractListener, error)); ok { @@ -663,6 +779,10 @@ func (_m *Plugin) GetContractListenerByID(ctx context.Context, namespace string, func (_m *Plugin) GetContractListeners(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.ContractListener, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetContractListeners") + } + var r0 []*core.ContractListener var r1 *ffapi.FilterResult var r2 error @@ -698,6 +818,10 @@ func (_m *Plugin) GetContractListeners(ctx context.Context, namespace string, fi func (_m *Plugin) GetData(ctx context.Context, namespace string, filter ffapi.Filter) (core.DataArray, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetData") + } + var r0 core.DataArray var r1 *ffapi.FilterResult var r2 error @@ -733,6 +857,10 @@ func (_m *Plugin) GetData(ctx context.Context, namespace string, filter ffapi.Fi func (_m *Plugin) GetDataByID(ctx context.Context, namespace string, id *fftypes.UUID, withValue bool) (*core.Data, error) { ret := _m.Called(ctx, namespace, id, withValue) + if len(ret) == 0 { + panic("no return value specified for GetDataByID") + } + var r0 *core.Data var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, bool) (*core.Data, error)); ok { @@ -759,6 +887,10 @@ func (_m *Plugin) GetDataByID(ctx context.Context, namespace string, id *fftypes func (_m *Plugin) GetDataRefs(ctx context.Context, namespace string, filter ffapi.Filter) (core.DataRefs, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetDataRefs") + } + var r0 core.DataRefs var r1 *ffapi.FilterResult var r2 error @@ -794,6 +926,10 @@ func (_m *Plugin) GetDataRefs(ctx context.Context, namespace string, filter ffap func (_m *Plugin) GetDataSubPaths(ctx context.Context, namespace string, path string) ([]string, error) { ret := _m.Called(ctx, namespace, path) + if len(ret) == 0 { + panic("no return value specified for GetDataSubPaths") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]string, error)); ok { @@ -820,6 +956,10 @@ func (_m *Plugin) GetDataSubPaths(ctx context.Context, namespace string, path st func (_m *Plugin) GetDatatypeByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.Datatype, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetDatatypeByID") + } + var r0 *core.Datatype var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.Datatype, error)); ok { @@ -846,6 +986,10 @@ func (_m *Plugin) GetDatatypeByID(ctx context.Context, namespace string, id *fft func (_m *Plugin) GetDatatypeByName(ctx context.Context, namespace string, name string, version string) (*core.Datatype, error) { ret := _m.Called(ctx, namespace, name, version) + if len(ret) == 0 { + panic("no return value specified for GetDatatypeByName") + } + var r0 *core.Datatype var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*core.Datatype, error)); ok { @@ -872,6 +1016,10 @@ func (_m *Plugin) GetDatatypeByName(ctx context.Context, namespace string, name func (_m *Plugin) GetDatatypes(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Datatype, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetDatatypes") + } + var r0 []*core.Datatype var r1 *ffapi.FilterResult var r2 error @@ -907,6 +1055,10 @@ func (_m *Plugin) GetDatatypes(ctx context.Context, namespace string, filter ffa func (_m *Plugin) GetEventByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.Event, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetEventByID") + } + var r0 *core.Event var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.Event, error)); ok { @@ -933,6 +1085,10 @@ func (_m *Plugin) GetEventByID(ctx context.Context, namespace string, id *fftype func (_m *Plugin) GetEvents(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Event, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetEvents") + } + var r0 []*core.Event var r1 *ffapi.FilterResult var r2 error @@ -968,6 +1124,10 @@ func (_m *Plugin) GetEvents(ctx context.Context, namespace string, filter ffapi. func (_m *Plugin) GetFFI(ctx context.Context, namespace string, name string, version string) (*fftypes.FFI, error) { ret := _m.Called(ctx, namespace, name, version) + if len(ret) == 0 { + panic("no return value specified for GetFFI") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*fftypes.FFI, error)); ok { @@ -994,6 +1154,10 @@ func (_m *Plugin) GetFFI(ctx context.Context, namespace string, name string, ver func (_m *Plugin) GetFFIByID(ctx context.Context, namespace string, id *fftypes.UUID) (*fftypes.FFI, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetFFIByID") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*fftypes.FFI, error)); ok { @@ -1020,6 +1184,10 @@ func (_m *Plugin) GetFFIByID(ctx context.Context, namespace string, id *fftypes. func (_m *Plugin) GetFFIByNetworkName(ctx context.Context, namespace string, networkName string, version string) (*fftypes.FFI, error) { ret := _m.Called(ctx, namespace, networkName, version) + if len(ret) == 0 { + panic("no return value specified for GetFFIByNetworkName") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*fftypes.FFI, error)); ok { @@ -1046,6 +1214,10 @@ func (_m *Plugin) GetFFIByNetworkName(ctx context.Context, namespace string, net func (_m *Plugin) GetFFIErrors(ctx context.Context, namespace string, filter ffapi.Filter) ([]*fftypes.FFIError, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetFFIErrors") + } + var r0 []*fftypes.FFIError var r1 *ffapi.FilterResult var r2 error @@ -1081,6 +1253,10 @@ func (_m *Plugin) GetFFIErrors(ctx context.Context, namespace string, filter ffa func (_m *Plugin) GetFFIEvent(ctx context.Context, namespace string, interfaceID *fftypes.UUID, pathName string) (*fftypes.FFIEvent, error) { ret := _m.Called(ctx, namespace, interfaceID, pathName) + if len(ret) == 0 { + panic("no return value specified for GetFFIEvent") + } + var r0 *fftypes.FFIEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, string) (*fftypes.FFIEvent, error)); ok { @@ -1107,6 +1283,10 @@ func (_m *Plugin) GetFFIEvent(ctx context.Context, namespace string, interfaceID func (_m *Plugin) GetFFIEvents(ctx context.Context, namespace string, filter ffapi.Filter) ([]*fftypes.FFIEvent, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetFFIEvents") + } + var r0 []*fftypes.FFIEvent var r1 *ffapi.FilterResult var r2 error @@ -1142,6 +1322,10 @@ func (_m *Plugin) GetFFIEvents(ctx context.Context, namespace string, filter ffa func (_m *Plugin) GetFFIMethod(ctx context.Context, namespace string, interfaceID *fftypes.UUID, pathName string) (*fftypes.FFIMethod, error) { ret := _m.Called(ctx, namespace, interfaceID, pathName) + if len(ret) == 0 { + panic("no return value specified for GetFFIMethod") + } + var r0 *fftypes.FFIMethod var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, string) (*fftypes.FFIMethod, error)); ok { @@ -1168,6 +1352,10 @@ func (_m *Plugin) GetFFIMethod(ctx context.Context, namespace string, interfaceI func (_m *Plugin) GetFFIMethods(ctx context.Context, namespace string, filter ffapi.Filter) ([]*fftypes.FFIMethod, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetFFIMethods") + } + var r0 []*fftypes.FFIMethod var r1 *ffapi.FilterResult var r2 error @@ -1203,6 +1391,10 @@ func (_m *Plugin) GetFFIMethods(ctx context.Context, namespace string, filter ff func (_m *Plugin) GetFFIs(ctx context.Context, namespace string, filter ffapi.Filter) ([]*fftypes.FFI, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetFFIs") + } + var r0 []*fftypes.FFI var r1 *ffapi.FilterResult var r2 error @@ -1238,6 +1430,10 @@ func (_m *Plugin) GetFFIs(ctx context.Context, namespace string, filter ffapi.Fi func (_m *Plugin) GetGroupByHash(ctx context.Context, namespace string, hash *fftypes.Bytes32) (*core.Group, error) { ret := _m.Called(ctx, namespace, hash) + if len(ret) == 0 { + panic("no return value specified for GetGroupByHash") + } + var r0 *core.Group var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.Bytes32) (*core.Group, error)); ok { @@ -1264,6 +1460,10 @@ func (_m *Plugin) GetGroupByHash(ctx context.Context, namespace string, hash *ff func (_m *Plugin) GetGroups(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Group, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetGroups") + } + var r0 []*core.Group var r1 *ffapi.FilterResult var r2 error @@ -1299,6 +1499,10 @@ func (_m *Plugin) GetGroups(ctx context.Context, namespace string, filter ffapi. func (_m *Plugin) GetIdentities(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Identity, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetIdentities") + } + var r0 []*core.Identity var r1 *ffapi.FilterResult var r2 error @@ -1334,6 +1538,10 @@ func (_m *Plugin) GetIdentities(ctx context.Context, namespace string, filter ff func (_m *Plugin) GetIdentityByDID(ctx context.Context, namespace string, did string) (*core.Identity, error) { ret := _m.Called(ctx, namespace, did) + if len(ret) == 0 { + panic("no return value specified for GetIdentityByDID") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.Identity, error)); ok { @@ -1360,6 +1568,10 @@ func (_m *Plugin) GetIdentityByDID(ctx context.Context, namespace string, did st func (_m *Plugin) GetIdentityByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.Identity, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetIdentityByID") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.Identity, error)); ok { @@ -1386,6 +1598,10 @@ func (_m *Plugin) GetIdentityByID(ctx context.Context, namespace string, id *fft func (_m *Plugin) GetIdentityByName(ctx context.Context, iType fftypes.FFEnum, namespace string, name string) (*core.Identity, error) { ret := _m.Called(ctx, iType, namespace, name) + if len(ret) == 0 { + panic("no return value specified for GetIdentityByName") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, fftypes.FFEnum, string, string) (*core.Identity, error)); ok { @@ -1412,6 +1628,10 @@ func (_m *Plugin) GetIdentityByName(ctx context.Context, iType fftypes.FFEnum, n func (_m *Plugin) GetMessageByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.Message, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetMessageByID") + } + var r0 *core.Message var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.Message, error)); ok { @@ -1438,6 +1658,10 @@ func (_m *Plugin) GetMessageByID(ctx context.Context, namespace string, id *ffty func (_m *Plugin) GetMessageIDs(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.IDAndSequence, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetMessageIDs") + } + var r0 []*core.IDAndSequence var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, ffapi.Filter) ([]*core.IDAndSequence, error)); ok { @@ -1464,6 +1688,10 @@ func (_m *Plugin) GetMessageIDs(ctx context.Context, namespace string, filter ff func (_m *Plugin) GetMessages(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Message, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetMessages") + } + var r0 []*core.Message var r1 *ffapi.FilterResult var r2 error @@ -1499,6 +1727,10 @@ func (_m *Plugin) GetMessages(ctx context.Context, namespace string, filter ffap func (_m *Plugin) GetMessagesForData(ctx context.Context, namespace string, dataID *fftypes.UUID, filter ffapi.Filter) ([]*core.Message, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, dataID, filter) + if len(ret) == 0 { + panic("no return value specified for GetMessagesForData") + } + var r0 []*core.Message var r1 *ffapi.FilterResult var r2 error @@ -1534,6 +1766,10 @@ func (_m *Plugin) GetMessagesForData(ctx context.Context, namespace string, data func (_m *Plugin) GetNamespace(ctx context.Context, name string) (*core.Namespace, error) { ret := _m.Called(ctx, name) + if len(ret) == 0 { + panic("no return value specified for GetNamespace") + } + var r0 *core.Namespace var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Namespace, error)); ok { @@ -1560,6 +1796,10 @@ func (_m *Plugin) GetNamespace(ctx context.Context, name string) (*core.Namespac func (_m *Plugin) GetNextPins(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.NextPin, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetNextPins") + } + var r0 []*core.NextPin var r1 *ffapi.FilterResult var r2 error @@ -1595,6 +1835,10 @@ func (_m *Plugin) GetNextPins(ctx context.Context, namespace string, filter ffap func (_m *Plugin) GetNextPinsForContext(ctx context.Context, namespace string, _a2 *fftypes.Bytes32) ([]*core.NextPin, error) { ret := _m.Called(ctx, namespace, _a2) + if len(ret) == 0 { + panic("no return value specified for GetNextPinsForContext") + } + var r0 []*core.NextPin var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.Bytes32) ([]*core.NextPin, error)); ok { @@ -1621,6 +1865,10 @@ func (_m *Plugin) GetNextPinsForContext(ctx context.Context, namespace string, _ func (_m *Plugin) GetNonce(ctx context.Context, hash *fftypes.Bytes32) (*core.Nonce, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for GetNonce") + } + var r0 *core.Nonce var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.Bytes32) (*core.Nonce, error)); ok { @@ -1647,6 +1895,10 @@ func (_m *Plugin) GetNonce(ctx context.Context, hash *fftypes.Bytes32) (*core.No func (_m *Plugin) GetNonces(ctx context.Context, filter ffapi.Filter) ([]*core.Nonce, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetNonces") + } + var r0 []*core.Nonce var r1 *ffapi.FilterResult var r2 error @@ -1682,6 +1934,10 @@ func (_m *Plugin) GetNonces(ctx context.Context, filter ffapi.Filter) ([]*core.N func (_m *Plugin) GetOffset(ctx context.Context, t fftypes.FFEnum, name string) (*core.Offset, error) { ret := _m.Called(ctx, t, name) + if len(ret) == 0 { + panic("no return value specified for GetOffset") + } + var r0 *core.Offset var r1 error if rf, ok := ret.Get(0).(func(context.Context, fftypes.FFEnum, string) (*core.Offset, error)); ok { @@ -1708,6 +1964,10 @@ func (_m *Plugin) GetOffset(ctx context.Context, t fftypes.FFEnum, name string) func (_m *Plugin) GetOffsets(ctx context.Context, filter ffapi.Filter) ([]*core.Offset, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetOffsets") + } + var r0 []*core.Offset var r1 *ffapi.FilterResult var r2 error @@ -1743,6 +2003,10 @@ func (_m *Plugin) GetOffsets(ctx context.Context, filter ffapi.Filter) ([]*core. func (_m *Plugin) GetOperationByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.Operation, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetOperationByID") + } + var r0 *core.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.Operation, error)); ok { @@ -1769,6 +2033,10 @@ func (_m *Plugin) GetOperationByID(ctx context.Context, namespace string, id *ff func (_m *Plugin) GetOperations(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Operation, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetOperations") + } + var r0 []*core.Operation var r1 *ffapi.FilterResult var r2 error @@ -1804,6 +2072,10 @@ func (_m *Plugin) GetOperations(ctx context.Context, namespace string, filter ff func (_m *Plugin) GetPins(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Pin, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetPins") + } + var r0 []*core.Pin var r1 *ffapi.FilterResult var r2 error @@ -1839,6 +2111,10 @@ func (_m *Plugin) GetPins(ctx context.Context, namespace string, filter ffapi.Fi func (_m *Plugin) GetSubscriptionByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.Subscription, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetSubscriptionByID") + } + var r0 *core.Subscription var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.Subscription, error)); ok { @@ -1865,6 +2141,10 @@ func (_m *Plugin) GetSubscriptionByID(ctx context.Context, namespace string, id func (_m *Plugin) GetSubscriptionByName(ctx context.Context, namespace string, name string) (*core.Subscription, error) { ret := _m.Called(ctx, namespace, name) + if len(ret) == 0 { + panic("no return value specified for GetSubscriptionByName") + } + var r0 *core.Subscription var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.Subscription, error)); ok { @@ -1891,6 +2171,10 @@ func (_m *Plugin) GetSubscriptionByName(ctx context.Context, namespace string, n func (_m *Plugin) GetSubscriptions(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Subscription, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetSubscriptions") + } + var r0 []*core.Subscription var r1 *ffapi.FilterResult var r2 error @@ -1926,6 +2210,10 @@ func (_m *Plugin) GetSubscriptions(ctx context.Context, namespace string, filter func (_m *Plugin) GetTokenAccountPools(ctx context.Context, namespace string, key string, filter ffapi.Filter) ([]*core.TokenAccountPool, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, key, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenAccountPools") + } + var r0 []*core.TokenAccountPool var r1 *ffapi.FilterResult var r2 error @@ -1961,6 +2249,10 @@ func (_m *Plugin) GetTokenAccountPools(ctx context.Context, namespace string, ke func (_m *Plugin) GetTokenAccounts(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.TokenAccount, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenAccounts") + } + var r0 []*core.TokenAccount var r1 *ffapi.FilterResult var r2 error @@ -1996,6 +2288,10 @@ func (_m *Plugin) GetTokenAccounts(ctx context.Context, namespace string, filter func (_m *Plugin) GetTokenApprovalByID(ctx context.Context, namespace string, localID *fftypes.UUID) (*core.TokenApproval, error) { ret := _m.Called(ctx, namespace, localID) + if len(ret) == 0 { + panic("no return value specified for GetTokenApprovalByID") + } + var r0 *core.TokenApproval var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.TokenApproval, error)); ok { @@ -2022,6 +2318,10 @@ func (_m *Plugin) GetTokenApprovalByID(ctx context.Context, namespace string, lo func (_m *Plugin) GetTokenApprovalByProtocolID(ctx context.Context, namespace string, poolID *fftypes.UUID, protocolID string) (*core.TokenApproval, error) { ret := _m.Called(ctx, namespace, poolID, protocolID) + if len(ret) == 0 { + panic("no return value specified for GetTokenApprovalByProtocolID") + } + var r0 *core.TokenApproval var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, string) (*core.TokenApproval, error)); ok { @@ -2048,6 +2348,10 @@ func (_m *Plugin) GetTokenApprovalByProtocolID(ctx context.Context, namespace st func (_m *Plugin) GetTokenApprovals(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.TokenApproval, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenApprovals") + } + var r0 []*core.TokenApproval var r1 *ffapi.FilterResult var r2 error @@ -2083,6 +2387,10 @@ func (_m *Plugin) GetTokenApprovals(ctx context.Context, namespace string, filte func (_m *Plugin) GetTokenBalance(ctx context.Context, namespace string, poolID *fftypes.UUID, tokenIndex string, identity string) (*core.TokenBalance, error) { ret := _m.Called(ctx, namespace, poolID, tokenIndex, identity) + if len(ret) == 0 { + panic("no return value specified for GetTokenBalance") + } + var r0 *core.TokenBalance var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, string, string) (*core.TokenBalance, error)); ok { @@ -2109,6 +2417,10 @@ func (_m *Plugin) GetTokenBalance(ctx context.Context, namespace string, poolID func (_m *Plugin) GetTokenBalances(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.TokenBalance, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenBalances") + } + var r0 []*core.TokenBalance var r1 *ffapi.FilterResult var r2 error @@ -2144,6 +2456,10 @@ func (_m *Plugin) GetTokenBalances(ctx context.Context, namespace string, filter func (_m *Plugin) GetTokenPool(ctx context.Context, namespace string, name string) (*core.TokenPool, error) { ret := _m.Called(ctx, namespace, name) + if len(ret) == 0 { + panic("no return value specified for GetTokenPool") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.TokenPool, error)); ok { @@ -2170,6 +2486,10 @@ func (_m *Plugin) GetTokenPool(ctx context.Context, namespace string, name strin func (_m *Plugin) GetTokenPoolByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.TokenPool, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetTokenPoolByID") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.TokenPool, error)); ok { @@ -2196,6 +2516,10 @@ func (_m *Plugin) GetTokenPoolByID(ctx context.Context, namespace string, id *ff func (_m *Plugin) GetTokenPoolByNetworkName(ctx context.Context, namespace string, networkName string) (*core.TokenPool, error) { ret := _m.Called(ctx, namespace, networkName) + if len(ret) == 0 { + panic("no return value specified for GetTokenPoolByNetworkName") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.TokenPool, error)); ok { @@ -2222,6 +2546,10 @@ func (_m *Plugin) GetTokenPoolByNetworkName(ctx context.Context, namespace strin func (_m *Plugin) GetTokenPools(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.TokenPool, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenPools") + } + var r0 []*core.TokenPool var r1 *ffapi.FilterResult var r2 error @@ -2257,6 +2585,10 @@ func (_m *Plugin) GetTokenPools(ctx context.Context, namespace string, filter ff func (_m *Plugin) GetTokenTransferByID(ctx context.Context, namespace string, localID *fftypes.UUID) (*core.TokenTransfer, error) { ret := _m.Called(ctx, namespace, localID) + if len(ret) == 0 { + panic("no return value specified for GetTokenTransferByID") + } + var r0 *core.TokenTransfer var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.TokenTransfer, error)); ok { @@ -2283,6 +2615,10 @@ func (_m *Plugin) GetTokenTransferByID(ctx context.Context, namespace string, lo func (_m *Plugin) GetTokenTransferByProtocolID(ctx context.Context, namespace string, poolID *fftypes.UUID, protocolID string) (*core.TokenTransfer, error) { ret := _m.Called(ctx, namespace, poolID, protocolID) + if len(ret) == 0 { + panic("no return value specified for GetTokenTransferByProtocolID") + } + var r0 *core.TokenTransfer var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, string) (*core.TokenTransfer, error)); ok { @@ -2309,6 +2645,10 @@ func (_m *Plugin) GetTokenTransferByProtocolID(ctx context.Context, namespace st func (_m *Plugin) GetTokenTransfers(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.TokenTransfer, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetTokenTransfers") + } + var r0 []*core.TokenTransfer var r1 *ffapi.FilterResult var r2 error @@ -2344,6 +2684,10 @@ func (_m *Plugin) GetTokenTransfers(ctx context.Context, namespace string, filte func (_m *Plugin) GetTransactionByID(ctx context.Context, namespace string, id *fftypes.UUID) (*core.Transaction, error) { ret := _m.Called(ctx, namespace, id) + if len(ret) == 0 { + panic("no return value specified for GetTransactionByID") + } + var r0 *core.Transaction var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID) (*core.Transaction, error)); ok { @@ -2370,6 +2714,10 @@ func (_m *Plugin) GetTransactionByID(ctx context.Context, namespace string, id * func (_m *Plugin) GetTransactions(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Transaction, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetTransactions") + } + var r0 []*core.Transaction var r1 *ffapi.FilterResult var r2 error @@ -2405,6 +2753,10 @@ func (_m *Plugin) GetTransactions(ctx context.Context, namespace string, filter func (_m *Plugin) GetVerifierByHash(ctx context.Context, namespace string, hash *fftypes.Bytes32) (*core.Verifier, error) { ret := _m.Called(ctx, namespace, hash) + if len(ret) == 0 { + panic("no return value specified for GetVerifierByHash") + } + var r0 *core.Verifier var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.Bytes32) (*core.Verifier, error)); ok { @@ -2431,6 +2783,10 @@ func (_m *Plugin) GetVerifierByHash(ctx context.Context, namespace string, hash func (_m *Plugin) GetVerifierByValue(ctx context.Context, vType fftypes.FFEnum, namespace string, value string) (*core.Verifier, error) { ret := _m.Called(ctx, vType, namespace, value) + if len(ret) == 0 { + panic("no return value specified for GetVerifierByValue") + } + var r0 *core.Verifier var r1 error if rf, ok := ret.Get(0).(func(context.Context, fftypes.FFEnum, string, string) (*core.Verifier, error)); ok { @@ -2457,6 +2813,10 @@ func (_m *Plugin) GetVerifierByValue(ctx context.Context, vType fftypes.FFEnum, func (_m *Plugin) GetVerifiers(ctx context.Context, namespace string, filter ffapi.Filter) ([]*core.Verifier, *ffapi.FilterResult, error) { ret := _m.Called(ctx, namespace, filter) + if len(ret) == 0 { + panic("no return value specified for GetVerifiers") + } + var r0 []*core.Verifier var r1 *ffapi.FilterResult var r2 error @@ -2492,6 +2852,10 @@ func (_m *Plugin) GetVerifiers(ctx context.Context, namespace string, filter ffa func (_m *Plugin) Init(ctx context.Context, _a1 config.Section) error { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, config.Section) error); ok { r0 = rf(ctx, _a1) @@ -2511,6 +2875,10 @@ func (_m *Plugin) InitConfig(_a0 config.Section) { func (_m *Plugin) InsertBlob(ctx context.Context, blob *core.Blob) error { ret := _m.Called(ctx, blob) + if len(ret) == 0 { + panic("no return value specified for InsertBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Blob) error); ok { r0 = rf(ctx, blob) @@ -2525,6 +2893,10 @@ func (_m *Plugin) InsertBlob(ctx context.Context, blob *core.Blob) error { func (_m *Plugin) InsertBlobs(ctx context.Context, blobs []*core.Blob) error { ret := _m.Called(ctx, blobs) + if len(ret) == 0 { + panic("no return value specified for InsertBlobs") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*core.Blob) error); ok { r0 = rf(ctx, blobs) @@ -2546,6 +2918,10 @@ func (_m *Plugin) InsertBlockchainEvents(ctx context.Context, messages []*core.B _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InsertBlockchainEvents") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*core.BlockchainEvent, ...database.PostCompletionHook) error); ok { r0 = rf(ctx, messages, hooks...) @@ -2560,6 +2936,10 @@ func (_m *Plugin) InsertBlockchainEvents(ctx context.Context, messages []*core.B func (_m *Plugin) InsertContractListener(ctx context.Context, sub *core.ContractListener) error { ret := _m.Called(ctx, sub) + if len(ret) == 0 { + panic("no return value specified for InsertContractListener") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.ContractListener) error); ok { r0 = rf(ctx, sub) @@ -2574,6 +2954,10 @@ func (_m *Plugin) InsertContractListener(ctx context.Context, sub *core.Contract func (_m *Plugin) InsertDataArray(ctx context.Context, data core.DataArray) error { ret := _m.Called(ctx, data) + if len(ret) == 0 { + panic("no return value specified for InsertDataArray") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, core.DataArray) error); ok { r0 = rf(ctx, data) @@ -2588,6 +2972,10 @@ func (_m *Plugin) InsertDataArray(ctx context.Context, data core.DataArray) erro func (_m *Plugin) InsertEvent(ctx context.Context, data *core.Event) error { ret := _m.Called(ctx, data) + if len(ret) == 0 { + panic("no return value specified for InsertEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Event) error); ok { r0 = rf(ctx, data) @@ -2609,6 +2997,10 @@ func (_m *Plugin) InsertMessages(ctx context.Context, messages []*core.Message, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InsertMessages") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*core.Message, ...database.PostCompletionHook) error); ok { r0 = rf(ctx, messages, hooks...) @@ -2623,6 +3015,10 @@ func (_m *Plugin) InsertMessages(ctx context.Context, messages []*core.Message, func (_m *Plugin) InsertNextPin(ctx context.Context, nextpin *core.NextPin) error { ret := _m.Called(ctx, nextpin) + if len(ret) == 0 { + panic("no return value specified for InsertNextPin") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.NextPin) error); ok { r0 = rf(ctx, nextpin) @@ -2637,6 +3033,10 @@ func (_m *Plugin) InsertNextPin(ctx context.Context, nextpin *core.NextPin) erro func (_m *Plugin) InsertNonce(ctx context.Context, nonce *core.Nonce) error { ret := _m.Called(ctx, nonce) + if len(ret) == 0 { + panic("no return value specified for InsertNonce") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Nonce) error); ok { r0 = rf(ctx, nonce) @@ -2658,6 +3058,10 @@ func (_m *Plugin) InsertOperation(ctx context.Context, operation *core.Operation _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InsertOperation") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation, ...database.PostCompletionHook) error); ok { r0 = rf(ctx, operation, hooks...) @@ -2679,6 +3083,10 @@ func (_m *Plugin) InsertOperations(ctx context.Context, ops []*core.Operation, h _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InsertOperations") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*core.Operation, ...database.PostCompletionHook) error); ok { r0 = rf(ctx, ops, hooks...) @@ -2693,6 +3101,10 @@ func (_m *Plugin) InsertOperations(ctx context.Context, ops []*core.Operation, h func (_m *Plugin) InsertOrGetBatch(ctx context.Context, data *core.BatchPersisted) (*core.BatchPersisted, error) { ret := _m.Called(ctx, data) + if len(ret) == 0 { + panic("no return value specified for InsertOrGetBatch") + } + var r0 *core.BatchPersisted var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.BatchPersisted) (*core.BatchPersisted, error)); ok { @@ -2719,6 +3131,10 @@ func (_m *Plugin) InsertOrGetBatch(ctx context.Context, data *core.BatchPersiste func (_m *Plugin) InsertOrGetBlockchainEvent(ctx context.Context, event *core.BlockchainEvent) (*core.BlockchainEvent, error) { ret := _m.Called(ctx, event) + if len(ret) == 0 { + panic("no return value specified for InsertOrGetBlockchainEvent") + } + var r0 *core.BlockchainEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.BlockchainEvent) (*core.BlockchainEvent, error)); ok { @@ -2745,6 +3161,10 @@ func (_m *Plugin) InsertOrGetBlockchainEvent(ctx context.Context, event *core.Bl func (_m *Plugin) InsertOrGetContractAPI(ctx context.Context, api *core.ContractAPI) (*core.ContractAPI, error) { ret := _m.Called(ctx, api) + if len(ret) == 0 { + panic("no return value specified for InsertOrGetContractAPI") + } + var r0 *core.ContractAPI var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.ContractAPI) (*core.ContractAPI, error)); ok { @@ -2771,6 +3191,10 @@ func (_m *Plugin) InsertOrGetContractAPI(ctx context.Context, api *core.Contract func (_m *Plugin) InsertOrGetFFI(ctx context.Context, ffi *fftypes.FFI) (*fftypes.FFI, error) { ret := _m.Called(ctx, ffi) + if len(ret) == 0 { + panic("no return value specified for InsertOrGetFFI") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFI) (*fftypes.FFI, error)); ok { @@ -2797,6 +3221,10 @@ func (_m *Plugin) InsertOrGetFFI(ctx context.Context, ffi *fftypes.FFI) (*fftype func (_m *Plugin) InsertOrGetTokenPool(ctx context.Context, pool *core.TokenPool) (*core.TokenPool, error) { ret := _m.Called(ctx, pool) + if len(ret) == 0 { + panic("no return value specified for InsertOrGetTokenPool") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPool) (*core.TokenPool, error)); ok { @@ -2823,6 +3251,10 @@ func (_m *Plugin) InsertOrGetTokenPool(ctx context.Context, pool *core.TokenPool func (_m *Plugin) InsertOrGetTokenTransfer(ctx context.Context, approval *core.TokenTransfer) (*core.TokenTransfer, error) { ret := _m.Called(ctx, approval) + if len(ret) == 0 { + panic("no return value specified for InsertOrGetTokenTransfer") + } + var r0 *core.TokenTransfer var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenTransfer) (*core.TokenTransfer, error)); ok { @@ -2849,6 +3281,10 @@ func (_m *Plugin) InsertOrGetTokenTransfer(ctx context.Context, approval *core.T func (_m *Plugin) InsertPins(ctx context.Context, pins []*core.Pin) error { ret := _m.Called(ctx, pins) + if len(ret) == 0 { + panic("no return value specified for InsertPins") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*core.Pin) error); ok { r0 = rf(ctx, pins) @@ -2863,6 +3299,10 @@ func (_m *Plugin) InsertPins(ctx context.Context, pins []*core.Pin) error { func (_m *Plugin) InsertTransaction(ctx context.Context, txn *core.Transaction) error { ret := _m.Called(ctx, txn) + if len(ret) == 0 { + panic("no return value specified for InsertTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Transaction) error); ok { r0 = rf(ctx, txn) @@ -2877,6 +3317,10 @@ func (_m *Plugin) InsertTransaction(ctx context.Context, txn *core.Transaction) func (_m *Plugin) InsertTransactions(ctx context.Context, txns []*core.Transaction) error { ret := _m.Called(ctx, txns) + if len(ret) == 0 { + panic("no return value specified for InsertTransactions") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*core.Transaction) error); ok { r0 = rf(ctx, txns) @@ -2891,6 +3335,10 @@ func (_m *Plugin) InsertTransactions(ctx context.Context, txns []*core.Transacti func (_m *Plugin) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -2905,6 +3353,10 @@ func (_m *Plugin) Name() string { func (_m *Plugin) ReplaceMessage(ctx context.Context, message *core.Message) error { ret := _m.Called(ctx, message) + if len(ret) == 0 { + panic("no return value specified for ReplaceMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Message) error); ok { r0 = rf(ctx, message) @@ -2919,6 +3371,10 @@ func (_m *Plugin) ReplaceMessage(ctx context.Context, message *core.Message) err func (_m *Plugin) RunAsGroup(ctx context.Context, fn func(context.Context) error) error { ret := _m.Called(ctx, fn) + if len(ret) == 0 { + panic("no return value specified for RunAsGroup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, func(context.Context) error) error); ok { r0 = rf(ctx, fn) @@ -2938,6 +3394,10 @@ func (_m *Plugin) SetHandler(namespace string, handler database.Callbacks) { func (_m *Plugin) UpdateBatch(ctx context.Context, namespace string, id *fftypes.UUID, update ffapi.Update) error { ret := _m.Called(ctx, namespace, id, update) + if len(ret) == 0 { + panic("no return value specified for UpdateBatch") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, ffapi.Update) error); ok { r0 = rf(ctx, namespace, id, update) @@ -2952,6 +3412,10 @@ func (_m *Plugin) UpdateBatch(ctx context.Context, namespace string, id *fftypes func (_m *Plugin) UpdateContractListener(ctx context.Context, namespace string, id *fftypes.UUID, update ffapi.Update) error { ret := _m.Called(ctx, namespace, id, update) + if len(ret) == 0 { + panic("no return value specified for UpdateContractListener") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, ffapi.Update) error); ok { r0 = rf(ctx, namespace, id, update) @@ -2966,6 +3430,10 @@ func (_m *Plugin) UpdateContractListener(ctx context.Context, namespace string, func (_m *Plugin) UpdateData(ctx context.Context, namespace string, id *fftypes.UUID, update ffapi.Update) error { ret := _m.Called(ctx, namespace, id, update) + if len(ret) == 0 { + panic("no return value specified for UpdateData") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, ffapi.Update) error); ok { r0 = rf(ctx, namespace, id, update) @@ -2980,6 +3448,10 @@ func (_m *Plugin) UpdateData(ctx context.Context, namespace string, id *fftypes. func (_m *Plugin) UpdateMessage(ctx context.Context, namespace string, id *fftypes.UUID, update ffapi.Update) error { ret := _m.Called(ctx, namespace, id, update) + if len(ret) == 0 { + panic("no return value specified for UpdateMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, ffapi.Update) error); ok { r0 = rf(ctx, namespace, id, update) @@ -2994,6 +3466,10 @@ func (_m *Plugin) UpdateMessage(ctx context.Context, namespace string, id *fftyp func (_m *Plugin) UpdateMessages(ctx context.Context, namespace string, filter ffapi.Filter, update ffapi.Update) error { ret := _m.Called(ctx, namespace, filter, update) + if len(ret) == 0 { + panic("no return value specified for UpdateMessages") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, ffapi.Filter, ffapi.Update) error); ok { r0 = rf(ctx, namespace, filter, update) @@ -3008,6 +3484,10 @@ func (_m *Plugin) UpdateMessages(ctx context.Context, namespace string, filter f func (_m *Plugin) UpdateNextPin(ctx context.Context, namespace string, sequence int64, update ffapi.Update) error { ret := _m.Called(ctx, namespace, sequence, update) + if len(ret) == 0 { + panic("no return value specified for UpdateNextPin") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, int64, ffapi.Update) error); ok { r0 = rf(ctx, namespace, sequence, update) @@ -3022,6 +3502,10 @@ func (_m *Plugin) UpdateNextPin(ctx context.Context, namespace string, sequence func (_m *Plugin) UpdateNonce(ctx context.Context, nonce *core.Nonce) error { ret := _m.Called(ctx, nonce) + if len(ret) == 0 { + panic("no return value specified for UpdateNonce") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Nonce) error); ok { r0 = rf(ctx, nonce) @@ -3036,6 +3520,10 @@ func (_m *Plugin) UpdateNonce(ctx context.Context, nonce *core.Nonce) error { func (_m *Plugin) UpdateOffset(ctx context.Context, rowID int64, update ffapi.Update) error { ret := _m.Called(ctx, rowID, update) + if len(ret) == 0 { + panic("no return value specified for UpdateOffset") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, int64, ffapi.Update) error); ok { r0 = rf(ctx, rowID, update) @@ -3050,6 +3538,10 @@ func (_m *Plugin) UpdateOffset(ctx context.Context, rowID int64, update ffapi.Up func (_m *Plugin) UpdateOperation(ctx context.Context, namespace string, id *fftypes.UUID, filter ffapi.Filter, update ffapi.Update) (bool, error) { ret := _m.Called(ctx, namespace, id, filter, update) + if len(ret) == 0 { + panic("no return value specified for UpdateOperation") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, ffapi.Filter, ffapi.Update) (bool, error)); ok { @@ -3074,6 +3566,10 @@ func (_m *Plugin) UpdateOperation(ctx context.Context, namespace string, id *fft func (_m *Plugin) UpdatePins(ctx context.Context, namespace string, filter ffapi.Filter, update ffapi.Update) error { ret := _m.Called(ctx, namespace, filter, update) + if len(ret) == 0 { + panic("no return value specified for UpdatePins") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, ffapi.Filter, ffapi.Update) error); ok { r0 = rf(ctx, namespace, filter, update) @@ -3088,6 +3584,10 @@ func (_m *Plugin) UpdatePins(ctx context.Context, namespace string, filter ffapi func (_m *Plugin) UpdateSubscription(ctx context.Context, namespace string, name string, update ffapi.Update) error { ret := _m.Called(ctx, namespace, name, update) + if len(ret) == 0 { + panic("no return value specified for UpdateSubscription") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, ffapi.Update) error); ok { r0 = rf(ctx, namespace, name, update) @@ -3102,6 +3602,10 @@ func (_m *Plugin) UpdateSubscription(ctx context.Context, namespace string, name func (_m *Plugin) UpdateTokenApprovals(ctx context.Context, filter ffapi.Filter, update ffapi.Update) error { ret := _m.Called(ctx, filter, update) + if len(ret) == 0 { + panic("no return value specified for UpdateTokenApprovals") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, ffapi.Filter, ffapi.Update) error); ok { r0 = rf(ctx, filter, update) @@ -3116,6 +3620,10 @@ func (_m *Plugin) UpdateTokenApprovals(ctx context.Context, filter ffapi.Filter, func (_m *Plugin) UpdateTokenBalances(ctx context.Context, transfer *core.TokenTransfer) error { ret := _m.Called(ctx, transfer) + if len(ret) == 0 { + panic("no return value specified for UpdateTokenBalances") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenTransfer) error); ok { r0 = rf(ctx, transfer) @@ -3130,6 +3638,10 @@ func (_m *Plugin) UpdateTokenBalances(ctx context.Context, transfer *core.TokenT func (_m *Plugin) UpdateTransaction(ctx context.Context, namespace string, id *fftypes.UUID, update ffapi.Update) error { ret := _m.Called(ctx, namespace, id, update) + if len(ret) == 0 { + panic("no return value specified for UpdateTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *fftypes.UUID, ffapi.Update) error); ok { r0 = rf(ctx, namespace, id, update) @@ -3144,6 +3656,10 @@ func (_m *Plugin) UpdateTransaction(ctx context.Context, namespace string, id *f func (_m *Plugin) UpsertContractAPI(ctx context.Context, api *core.ContractAPI, optimization database.UpsertOptimization) error { ret := _m.Called(ctx, api, optimization) + if len(ret) == 0 { + panic("no return value specified for UpsertContractAPI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.ContractAPI, database.UpsertOptimization) error); ok { r0 = rf(ctx, api, optimization) @@ -3158,6 +3674,10 @@ func (_m *Plugin) UpsertContractAPI(ctx context.Context, api *core.ContractAPI, func (_m *Plugin) UpsertData(ctx context.Context, data *core.Data, optimization database.UpsertOptimization) error { ret := _m.Called(ctx, data, optimization) + if len(ret) == 0 { + panic("no return value specified for UpsertData") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Data, database.UpsertOptimization) error); ok { r0 = rf(ctx, data, optimization) @@ -3172,6 +3692,10 @@ func (_m *Plugin) UpsertData(ctx context.Context, data *core.Data, optimization func (_m *Plugin) UpsertDatatype(ctx context.Context, datadef *core.Datatype, allowExisting bool) error { ret := _m.Called(ctx, datadef, allowExisting) + if len(ret) == 0 { + panic("no return value specified for UpsertDatatype") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Datatype, bool) error); ok { r0 = rf(ctx, datadef, allowExisting) @@ -3186,6 +3710,10 @@ func (_m *Plugin) UpsertDatatype(ctx context.Context, datadef *core.Datatype, al func (_m *Plugin) UpsertFFI(ctx context.Context, ffi *fftypes.FFI, optimization database.UpsertOptimization) error { ret := _m.Called(ctx, ffi, optimization) + if len(ret) == 0 { + panic("no return value specified for UpsertFFI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFI, database.UpsertOptimization) error); ok { r0 = rf(ctx, ffi, optimization) @@ -3200,6 +3728,10 @@ func (_m *Plugin) UpsertFFI(ctx context.Context, ffi *fftypes.FFI, optimization func (_m *Plugin) UpsertFFIError(ctx context.Context, method *fftypes.FFIError) error { ret := _m.Called(ctx, method) + if len(ret) == 0 { + panic("no return value specified for UpsertFFIError") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIError) error); ok { r0 = rf(ctx, method) @@ -3214,6 +3746,10 @@ func (_m *Plugin) UpsertFFIError(ctx context.Context, method *fftypes.FFIError) func (_m *Plugin) UpsertFFIEvent(ctx context.Context, method *fftypes.FFIEvent) error { ret := _m.Called(ctx, method) + if len(ret) == 0 { + panic("no return value specified for UpsertFFIEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIEvent) error); ok { r0 = rf(ctx, method) @@ -3228,6 +3764,10 @@ func (_m *Plugin) UpsertFFIEvent(ctx context.Context, method *fftypes.FFIEvent) func (_m *Plugin) UpsertFFIMethod(ctx context.Context, method *fftypes.FFIMethod) error { ret := _m.Called(ctx, method) + if len(ret) == 0 { + panic("no return value specified for UpsertFFIMethod") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFIMethod) error); ok { r0 = rf(ctx, method) @@ -3242,6 +3782,10 @@ func (_m *Plugin) UpsertFFIMethod(ctx context.Context, method *fftypes.FFIMethod func (_m *Plugin) UpsertGroup(ctx context.Context, data *core.Group, optimization database.UpsertOptimization) error { ret := _m.Called(ctx, data, optimization) + if len(ret) == 0 { + panic("no return value specified for UpsertGroup") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Group, database.UpsertOptimization) error); ok { r0 = rf(ctx, data, optimization) @@ -3256,6 +3800,10 @@ func (_m *Plugin) UpsertGroup(ctx context.Context, data *core.Group, optimizatio func (_m *Plugin) UpsertIdentity(ctx context.Context, data *core.Identity, optimization database.UpsertOptimization) error { ret := _m.Called(ctx, data, optimization) + if len(ret) == 0 { + panic("no return value specified for UpsertIdentity") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Identity, database.UpsertOptimization) error); ok { r0 = rf(ctx, data, optimization) @@ -3277,6 +3825,10 @@ func (_m *Plugin) UpsertMessage(ctx context.Context, message *core.Message, opti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpsertMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Message, database.UpsertOptimization, ...database.PostCompletionHook) error); ok { r0 = rf(ctx, message, optimization, hooks...) @@ -3291,6 +3843,10 @@ func (_m *Plugin) UpsertMessage(ctx context.Context, message *core.Message, opti func (_m *Plugin) UpsertNamespace(ctx context.Context, data *core.Namespace, allowExisting bool) error { ret := _m.Called(ctx, data, allowExisting) + if len(ret) == 0 { + panic("no return value specified for UpsertNamespace") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Namespace, bool) error); ok { r0 = rf(ctx, data, allowExisting) @@ -3305,6 +3861,10 @@ func (_m *Plugin) UpsertNamespace(ctx context.Context, data *core.Namespace, all func (_m *Plugin) UpsertOffset(ctx context.Context, data *core.Offset, allowExisting bool) error { ret := _m.Called(ctx, data, allowExisting) + if len(ret) == 0 { + panic("no return value specified for UpsertOffset") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Offset, bool) error); ok { r0 = rf(ctx, data, allowExisting) @@ -3319,6 +3879,10 @@ func (_m *Plugin) UpsertOffset(ctx context.Context, data *core.Offset, allowExis func (_m *Plugin) UpsertPin(ctx context.Context, parked *core.Pin) error { ret := _m.Called(ctx, parked) + if len(ret) == 0 { + panic("no return value specified for UpsertPin") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Pin) error); ok { r0 = rf(ctx, parked) @@ -3333,6 +3897,10 @@ func (_m *Plugin) UpsertPin(ctx context.Context, parked *core.Pin) error { func (_m *Plugin) UpsertSubscription(ctx context.Context, data *core.Subscription, allowExisting bool) error { ret := _m.Called(ctx, data, allowExisting) + if len(ret) == 0 { + panic("no return value specified for UpsertSubscription") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Subscription, bool) error); ok { r0 = rf(ctx, data, allowExisting) @@ -3347,6 +3915,10 @@ func (_m *Plugin) UpsertSubscription(ctx context.Context, data *core.Subscriptio func (_m *Plugin) UpsertTokenApproval(ctx context.Context, approval *core.TokenApproval) error { ret := _m.Called(ctx, approval) + if len(ret) == 0 { + panic("no return value specified for UpsertTokenApproval") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenApproval) error); ok { r0 = rf(ctx, approval) @@ -3361,6 +3933,10 @@ func (_m *Plugin) UpsertTokenApproval(ctx context.Context, approval *core.TokenA func (_m *Plugin) UpsertTokenPool(ctx context.Context, pool *core.TokenPool, optimization database.UpsertOptimization) error { ret := _m.Called(ctx, pool, optimization) + if len(ret) == 0 { + panic("no return value specified for UpsertTokenPool") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPool, database.UpsertOptimization) error); ok { r0 = rf(ctx, pool, optimization) @@ -3375,6 +3951,10 @@ func (_m *Plugin) UpsertTokenPool(ctx context.Context, pool *core.TokenPool, opt func (_m *Plugin) UpsertVerifier(ctx context.Context, data *core.Verifier, optimization database.UpsertOptimization) error { ret := _m.Called(ctx, data, optimization) + if len(ret) == 0 { + panic("no return value specified for UpsertVerifier") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Verifier, database.UpsertOptimization) error); ok { r0 = rf(ctx, data, optimization) diff --git a/mocks/dataexchangemocks/callbacks.go b/mocks/dataexchangemocks/callbacks.go index 92df31557..2d11b72f6 100644 --- a/mocks/dataexchangemocks/callbacks.go +++ b/mocks/dataexchangemocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package dataexchangemocks @@ -16,6 +16,10 @@ type Callbacks struct { func (_m *Callbacks) DXEvent(plugin dataexchange.Plugin, event dataexchange.DXEvent) error { ret := _m.Called(plugin, event) + if len(ret) == 0 { + panic("no return value specified for DXEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(dataexchange.Plugin, dataexchange.DXEvent) error); ok { r0 = rf(plugin, event) diff --git a/mocks/dataexchangemocks/dx_event.go b/mocks/dataexchangemocks/dx_event.go index 348dace64..200fe5e71 100644 --- a/mocks/dataexchangemocks/dx_event.go +++ b/mocks/dataexchangemocks/dx_event.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package dataexchangemocks @@ -26,6 +26,10 @@ func (_m *DXEvent) AckWithManifest(manifest string) { func (_m *DXEvent) EventID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for EventID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -40,6 +44,10 @@ func (_m *DXEvent) EventID() string { func (_m *DXEvent) MessageReceived() *dataexchange.MessageReceived { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MessageReceived") + } + var r0 *dataexchange.MessageReceived if rf, ok := ret.Get(0).(func() *dataexchange.MessageReceived); ok { r0 = rf() @@ -56,6 +64,10 @@ func (_m *DXEvent) MessageReceived() *dataexchange.MessageReceived { func (_m *DXEvent) PrivateBlobReceived() *dataexchange.PrivateBlobReceived { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PrivateBlobReceived") + } + var r0 *dataexchange.PrivateBlobReceived if rf, ok := ret.Get(0).(func() *dataexchange.PrivateBlobReceived); ok { r0 = rf() @@ -72,6 +84,10 @@ func (_m *DXEvent) PrivateBlobReceived() *dataexchange.PrivateBlobReceived { func (_m *DXEvent) Type() dataexchange.DXEventType { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Type") + } + var r0 dataexchange.DXEventType if rf, ok := ret.Get(0).(func() dataexchange.DXEventType); ok { r0 = rf() diff --git a/mocks/dataexchangemocks/plugin.go b/mocks/dataexchangemocks/plugin.go index 4a9343d0f..e0e932143 100644 --- a/mocks/dataexchangemocks/plugin.go +++ b/mocks/dataexchangemocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package dataexchangemocks @@ -27,6 +27,10 @@ type Plugin struct { func (_m *Plugin) AddNode(ctx context.Context, networkNamespace string, nodeName string, peer fftypes.JSONObject) error { ret := _m.Called(ctx, networkNamespace, nodeName, peer) + if len(ret) == 0 { + panic("no return value specified for AddNode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, fftypes.JSONObject) error); ok { r0 = rf(ctx, networkNamespace, nodeName, peer) @@ -41,6 +45,10 @@ func (_m *Plugin) AddNode(ctx context.Context, networkNamespace string, nodeName func (_m *Plugin) Capabilities() *dataexchange.Capabilities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Capabilities") + } + var r0 *dataexchange.Capabilities if rf, ok := ret.Get(0).(func() *dataexchange.Capabilities); ok { r0 = rf() @@ -57,6 +65,10 @@ func (_m *Plugin) Capabilities() *dataexchange.Capabilities { func (_m *Plugin) DeleteBlob(ctx context.Context, payloadRef string) error { ret := _m.Called(ctx, payloadRef) + if len(ret) == 0 { + panic("no return value specified for DeleteBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, payloadRef) @@ -71,6 +83,10 @@ func (_m *Plugin) DeleteBlob(ctx context.Context, payloadRef string) error { func (_m *Plugin) DownloadBlob(ctx context.Context, payloadRef string) (io.ReadCloser, error) { ret := _m.Called(ctx, payloadRef) + if len(ret) == 0 { + panic("no return value specified for DownloadBlob") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok { @@ -97,6 +113,10 @@ func (_m *Plugin) DownloadBlob(ctx context.Context, payloadRef string) (io.ReadC func (_m *Plugin) GetEndpointInfo(ctx context.Context, nodeName string) (fftypes.JSONObject, error) { ret := _m.Called(ctx, nodeName) + if len(ret) == 0 { + panic("no return value specified for GetEndpointInfo") + } + var r0 fftypes.JSONObject var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (fftypes.JSONObject, error)); ok { @@ -123,6 +143,10 @@ func (_m *Plugin) GetEndpointInfo(ctx context.Context, nodeName string) (fftypes func (_m *Plugin) GetPeerID(peer fftypes.JSONObject) string { ret := _m.Called(peer) + if len(ret) == 0 { + panic("no return value specified for GetPeerID") + } + var r0 string if rf, ok := ret.Get(0).(func(fftypes.JSONObject) string); ok { r0 = rf(peer) @@ -137,6 +161,10 @@ func (_m *Plugin) GetPeerID(peer fftypes.JSONObject) string { func (_m *Plugin) Init(ctx context.Context, cancelCtx context.CancelFunc, _a2 config.Section) error { ret := _m.Called(ctx, cancelCtx, _a2) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, context.CancelFunc, config.Section) error); ok { r0 = rf(ctx, cancelCtx, _a2) @@ -156,6 +184,10 @@ func (_m *Plugin) InitConfig(_a0 config.Section) { func (_m *Plugin) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -170,6 +202,10 @@ func (_m *Plugin) Name() string { func (_m *Plugin) SendMessage(ctx context.Context, nsOpID string, peer fftypes.JSONObject, sender fftypes.JSONObject, data []byte) error { ret := _m.Called(ctx, nsOpID, peer, sender, data) + if len(ret) == 0 { + panic("no return value specified for SendMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, fftypes.JSONObject, fftypes.JSONObject, []byte) error); ok { r0 = rf(ctx, nsOpID, peer, sender, data) @@ -194,6 +230,10 @@ func (_m *Plugin) SetOperationHandler(namespace string, handler core.OperationCa func (_m *Plugin) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -208,6 +248,10 @@ func (_m *Plugin) Start() error { func (_m *Plugin) TransferBlob(ctx context.Context, nsOpID string, peer fftypes.JSONObject, sender fftypes.JSONObject, payloadRef string) error { ret := _m.Called(ctx, nsOpID, peer, sender, payloadRef) + if len(ret) == 0 { + panic("no return value specified for TransferBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, fftypes.JSONObject, fftypes.JSONObject, string) error); ok { r0 = rf(ctx, nsOpID, peer, sender, payloadRef) @@ -222,6 +266,10 @@ func (_m *Plugin) TransferBlob(ctx context.Context, nsOpID string, peer fftypes. func (_m *Plugin) UploadBlob(ctx context.Context, ns string, id fftypes.UUID, content io.Reader) (string, *fftypes.Bytes32, int64, error) { ret := _m.Called(ctx, ns, id, content) + if len(ret) == 0 { + panic("no return value specified for UploadBlob") + } + var r0 string var r1 *fftypes.Bytes32 var r2 int64 diff --git a/mocks/datamocks/manager.go b/mocks/datamocks/manager.go index cbdfa9917..aaf313950 100644 --- a/mocks/datamocks/manager.go +++ b/mocks/datamocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package datamocks @@ -26,6 +26,10 @@ type Manager struct { func (_m *Manager) BlobsEnabled() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BlobsEnabled") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() @@ -40,6 +44,10 @@ func (_m *Manager) BlobsEnabled() bool { func (_m *Manager) CheckDatatype(ctx context.Context, datatype *core.Datatype) error { ret := _m.Called(ctx, datatype) + if len(ret) == 0 { + panic("no return value specified for CheckDatatype") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Datatype) error); ok { r0 = rf(ctx, datatype) @@ -54,6 +62,10 @@ func (_m *Manager) CheckDatatype(ctx context.Context, datatype *core.Datatype) e func (_m *Manager) DeleteData(ctx context.Context, dataID string) error { ret := _m.Called(ctx, dataID) + if len(ret) == 0 { + panic("no return value specified for DeleteData") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, dataID) @@ -68,6 +80,10 @@ func (_m *Manager) DeleteData(ctx context.Context, dataID string) error { func (_m *Manager) DownloadBlob(ctx context.Context, dataID string) (*core.Blob, io.ReadCloser, error) { ret := _m.Called(ctx, dataID) + if len(ret) == 0 { + panic("no return value specified for DownloadBlob") + } + var r0 *core.Blob var r1 io.ReadCloser var r2 error @@ -110,6 +126,10 @@ func (_m *Manager) GetMessageDataCached(ctx context.Context, msg *core.Message, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetMessageDataCached") + } + var r0 core.DataArray var r1 bool var r2 error @@ -150,6 +170,10 @@ func (_m *Manager) GetMessageWithDataCached(ctx context.Context, msgID *fftypes. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for GetMessageWithDataCached") + } + var r0 *core.Message var r1 core.DataArray var r2 bool @@ -192,6 +216,10 @@ func (_m *Manager) GetMessageWithDataCached(ctx context.Context, msgID *fftypes. func (_m *Manager) HydrateBatch(ctx context.Context, persistedBatch *core.BatchPersisted) (*core.Batch, error) { ret := _m.Called(ctx, persistedBatch) + if len(ret) == 0 { + panic("no return value specified for HydrateBatch") + } + var r0 *core.Batch var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.BatchPersisted) (*core.Batch, error)); ok { @@ -225,6 +253,10 @@ func (_m *Manager) PeekMessageCache(ctx context.Context, id *fftypes.UUID, optio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for PeekMessageCache") + } + var r0 *core.Message var r1 core.DataArray if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, ...data.CacheReadOption) (*core.Message, core.DataArray)); ok { @@ -253,6 +285,10 @@ func (_m *Manager) PeekMessageCache(ctx context.Context, id *fftypes.UUID, optio func (_m *Manager) ResolveInlineData(ctx context.Context, msg *data.NewMessage) error { ret := _m.Called(ctx, msg) + if len(ret) == 0 { + panic("no return value specified for ResolveInlineData") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *data.NewMessage) error); ok { r0 = rf(ctx, msg) @@ -287,6 +323,10 @@ func (_m *Manager) UpdateMessageStateIfCached(ctx context.Context, id *fftypes.U func (_m *Manager) UploadBlob(ctx context.Context, inData *core.DataRefOrValue, blob *ffapi.Multipart, autoMeta bool) (*core.Data, error) { ret := _m.Called(ctx, inData, blob, autoMeta) + if len(ret) == 0 { + panic("no return value specified for UploadBlob") + } + var r0 *core.Data var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.DataRefOrValue, *ffapi.Multipart, bool) (*core.Data, error)); ok { @@ -313,6 +353,10 @@ func (_m *Manager) UploadBlob(ctx context.Context, inData *core.DataRefOrValue, func (_m *Manager) UploadJSON(ctx context.Context, inData *core.DataRefOrValue) (*core.Data, error) { ret := _m.Called(ctx, inData) + if len(ret) == 0 { + panic("no return value specified for UploadJSON") + } + var r0 *core.Data var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.DataRefOrValue) (*core.Data, error)); ok { @@ -339,6 +383,10 @@ func (_m *Manager) UploadJSON(ctx context.Context, inData *core.DataRefOrValue) func (_m *Manager) ValidateAll(ctx context.Context, _a1 core.DataArray) (bool, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for ValidateAll") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, core.DataArray) (bool, error)); ok { @@ -368,6 +416,10 @@ func (_m *Manager) WaitStop() { func (_m *Manager) WriteNewMessage(ctx context.Context, newMsg *data.NewMessage) error { ret := _m.Called(ctx, newMsg) + if len(ret) == 0 { + panic("no return value specified for WriteNewMessage") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *data.NewMessage) error); ok { r0 = rf(ctx, newMsg) diff --git a/mocks/definitionsmocks/handler.go b/mocks/definitionsmocks/handler.go index 7b6d8cd07..c67c6db42 100644 --- a/mocks/definitionsmocks/handler.go +++ b/mocks/definitionsmocks/handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package definitionsmocks @@ -22,6 +22,10 @@ type Handler struct { func (_m *Handler) HandleDefinitionBroadcast(ctx context.Context, state *core.BatchState, msg *core.Message, data core.DataArray, tx *fftypes.UUID) (definitions.HandlerResult, error) { ret := _m.Called(ctx, state, msg, data, tx) + if len(ret) == 0 { + panic("no return value specified for HandleDefinitionBroadcast") + } + var r0 definitions.HandlerResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.BatchState, *core.Message, core.DataArray, *fftypes.UUID) (definitions.HandlerResult, error)); ok { diff --git a/mocks/definitionsmocks/sender.go b/mocks/definitionsmocks/sender.go index 96b7bb40f..28fd4736c 100644 --- a/mocks/definitionsmocks/sender.go +++ b/mocks/definitionsmocks/sender.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package definitionsmocks @@ -21,6 +21,10 @@ type Sender struct { func (_m *Sender) ClaimIdentity(ctx context.Context, def *core.IdentityClaim, signingIdentity *core.SignerRef, parentSigner *core.SignerRef) error { ret := _m.Called(ctx, def, signingIdentity, parentSigner) + if len(ret) == 0 { + panic("no return value specified for ClaimIdentity") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.IdentityClaim, *core.SignerRef, *core.SignerRef) error); ok { r0 = rf(ctx, def, signingIdentity, parentSigner) @@ -35,6 +39,10 @@ func (_m *Sender) ClaimIdentity(ctx context.Context, def *core.IdentityClaim, si func (_m *Sender) DefineContractAPI(ctx context.Context, httpServerURL string, api *core.ContractAPI, waitConfirm bool) error { ret := _m.Called(ctx, httpServerURL, api, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for DefineContractAPI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *core.ContractAPI, bool) error); ok { r0 = rf(ctx, httpServerURL, api, waitConfirm) @@ -49,6 +57,10 @@ func (_m *Sender) DefineContractAPI(ctx context.Context, httpServerURL string, a func (_m *Sender) DefineDatatype(ctx context.Context, datatype *core.Datatype, waitConfirm bool) error { ret := _m.Called(ctx, datatype, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for DefineDatatype") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Datatype, bool) error); ok { r0 = rf(ctx, datatype, waitConfirm) @@ -63,6 +75,10 @@ func (_m *Sender) DefineDatatype(ctx context.Context, datatype *core.Datatype, w func (_m *Sender) DefineFFI(ctx context.Context, ffi *fftypes.FFI, waitConfirm bool) error { ret := _m.Called(ctx, ffi, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for DefineFFI") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.FFI, bool) error); ok { r0 = rf(ctx, ffi, waitConfirm) @@ -77,6 +93,10 @@ func (_m *Sender) DefineFFI(ctx context.Context, ffi *fftypes.FFI, waitConfirm b func (_m *Sender) DefineTokenPool(ctx context.Context, pool *core.TokenPool, waitConfirm bool) error { ret := _m.Called(ctx, pool, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for DefineTokenPool") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPool, bool) error); ok { r0 = rf(ctx, pool, waitConfirm) @@ -91,6 +111,10 @@ func (_m *Sender) DefineTokenPool(ctx context.Context, pool *core.TokenPool, wai func (_m *Sender) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -105,6 +129,10 @@ func (_m *Sender) Name() string { func (_m *Sender) PublishContractAPI(ctx context.Context, httpServerURL string, name string, networkName string, waitConfirm bool) (*core.ContractAPI, error) { ret := _m.Called(ctx, httpServerURL, name, networkName, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for PublishContractAPI") + } + var r0 *core.ContractAPI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, string, bool) (*core.ContractAPI, error)); ok { @@ -131,6 +159,10 @@ func (_m *Sender) PublishContractAPI(ctx context.Context, httpServerURL string, func (_m *Sender) PublishFFI(ctx context.Context, name string, version string, networkName string, waitConfirm bool) (*fftypes.FFI, error) { ret := _m.Called(ctx, name, version, networkName, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for PublishFFI") + } + var r0 *fftypes.FFI var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, string, bool) (*fftypes.FFI, error)); ok { @@ -157,6 +189,10 @@ func (_m *Sender) PublishFFI(ctx context.Context, name string, version string, n func (_m *Sender) PublishTokenPool(ctx context.Context, poolNameOrID string, networkName string, waitConfirm bool) (*core.TokenPool, error) { ret := _m.Called(ctx, poolNameOrID, networkName, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for PublishTokenPool") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) (*core.TokenPool, error)); ok { @@ -183,6 +219,10 @@ func (_m *Sender) PublishTokenPool(ctx context.Context, poolNameOrID string, net func (_m *Sender) UpdateIdentity(ctx context.Context, identity *core.Identity, def *core.IdentityUpdate, signingIdentity *core.SignerRef, waitConfirm bool) error { ret := _m.Called(ctx, identity, def, signingIdentity, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for UpdateIdentity") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Identity, *core.IdentityUpdate, *core.SignerRef, bool) error); ok { r0 = rf(ctx, identity, def, signingIdentity, waitConfirm) diff --git a/mocks/eventmocks/event_manager.go b/mocks/eventmocks/event_manager.go index 0521b7c4c..0251218d9 100644 --- a/mocks/eventmocks/event_manager.go +++ b/mocks/eventmocks/event_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package eventmocks @@ -33,6 +33,10 @@ type EventManager struct { func (_m *EventManager) AddSystemEventListener(ns string, el system.EventListener) error { ret := _m.Called(ns, el) + if len(ret) == 0 { + panic("no return value specified for AddSystemEventListener") + } + var r0 error if rf, ok := ret.Get(0).(func(string, system.EventListener) error); ok { r0 = rf(ns, el) @@ -47,6 +51,10 @@ func (_m *EventManager) AddSystemEventListener(ns string, el system.EventListene func (_m *EventManager) BlockchainEventBatch(batch []*blockchain.EventToDispatch) error { ret := _m.Called(batch) + if len(ret) == 0 { + panic("no return value specified for BlockchainEventBatch") + } + var r0 error if rf, ok := ret.Get(0).(func([]*blockchain.EventToDispatch) error); ok { r0 = rf(batch) @@ -61,6 +69,10 @@ func (_m *EventManager) BlockchainEventBatch(batch []*blockchain.EventToDispatch func (_m *EventManager) CreateUpdateDurableSubscription(ctx context.Context, subDef *core.Subscription, mustNew bool) error { ret := _m.Called(ctx, subDef, mustNew) + if len(ret) == 0 { + panic("no return value specified for CreateUpdateDurableSubscription") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Subscription, bool) error); ok { r0 = rf(ctx, subDef, mustNew) @@ -75,6 +87,10 @@ func (_m *EventManager) CreateUpdateDurableSubscription(ctx context.Context, sub func (_m *EventManager) DXEvent(plugin dataexchange.Plugin, event dataexchange.DXEvent) error { ret := _m.Called(plugin, event) + if len(ret) == 0 { + panic("no return value specified for DXEvent") + } + var r0 error if rf, ok := ret.Get(0).(func(dataexchange.Plugin, dataexchange.DXEvent) error); ok { r0 = rf(plugin, event) @@ -89,6 +105,10 @@ func (_m *EventManager) DXEvent(plugin dataexchange.Plugin, event dataexchange.D func (_m *EventManager) DeleteDurableSubscription(ctx context.Context, subDef *core.Subscription) error { ret := _m.Called(ctx, subDef) + if len(ret) == 0 { + panic("no return value specified for DeleteDurableSubscription") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Subscription) error); ok { r0 = rf(ctx, subDef) @@ -103,6 +123,10 @@ func (_m *EventManager) DeleteDurableSubscription(ctx context.Context, subDef *c func (_m *EventManager) DeletedSubscriptions() chan<- *fftypes.UUID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DeletedSubscriptions") + } + var r0 chan<- *fftypes.UUID if rf, ok := ret.Get(0).(func() chan<- *fftypes.UUID); ok { r0 = rf() @@ -119,6 +143,10 @@ func (_m *EventManager) DeletedSubscriptions() chan<- *fftypes.UUID { func (_m *EventManager) EnrichEvent(ctx context.Context, event *core.Event) (*core.EnrichedEvent, error) { ret := _m.Called(ctx, event) + if len(ret) == 0 { + panic("no return value specified for EnrichEvent") + } + var r0 *core.EnrichedEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Event) (*core.EnrichedEvent, error)); ok { @@ -145,6 +173,10 @@ func (_m *EventManager) EnrichEvent(ctx context.Context, event *core.Event) (*co func (_m *EventManager) GetPlugins() []*core.NamespaceStatusPlugin { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetPlugins") + } + var r0 []*core.NamespaceStatusPlugin if rf, ok := ret.Get(0).(func() []*core.NamespaceStatusPlugin); ok { r0 = rf() @@ -161,6 +193,10 @@ func (_m *EventManager) GetPlugins() []*core.NamespaceStatusPlugin { func (_m *EventManager) NewEvents() chan<- int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NewEvents") + } + var r0 chan<- int64 if rf, ok := ret.Get(0).(func() chan<- int64); ok { r0 = rf() @@ -177,6 +213,10 @@ func (_m *EventManager) NewEvents() chan<- int64 { func (_m *EventManager) NewPins() chan<- int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NewPins") + } + var r0 chan<- int64 if rf, ok := ret.Get(0).(func() chan<- int64); ok { r0 = rf() @@ -193,6 +233,10 @@ func (_m *EventManager) NewPins() chan<- int64 { func (_m *EventManager) NewSubscriptions() chan<- *fftypes.UUID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NewSubscriptions") + } + var r0 chan<- *fftypes.UUID if rf, ok := ret.Get(0).(func() chan<- *fftypes.UUID); ok { r0 = rf() @@ -214,6 +258,10 @@ func (_m *EventManager) QueueBatchRewind(batchID *fftypes.UUID) { func (_m *EventManager) ResolveTransportAndCapabilities(ctx context.Context, transportName string) (string, *pkgevents.Capabilities, error) { ret := _m.Called(ctx, transportName) + if len(ret) == 0 { + panic("no return value specified for ResolveTransportAndCapabilities") + } + var r0 string var r1 *pkgevents.Capabilities var r2 error @@ -247,6 +295,10 @@ func (_m *EventManager) ResolveTransportAndCapabilities(ctx context.Context, tra func (_m *EventManager) SharedStorageBatchDownloaded(ss sharedstorage.Plugin, payloadRef string, data []byte) (*fftypes.UUID, error) { ret := _m.Called(ss, payloadRef, data) + if len(ret) == 0 { + panic("no return value specified for SharedStorageBatchDownloaded") + } + var r0 *fftypes.UUID var r1 error if rf, ok := ret.Get(0).(func(sharedstorage.Plugin, string, []byte) (*fftypes.UUID, error)); ok { @@ -273,6 +325,10 @@ func (_m *EventManager) SharedStorageBatchDownloaded(ss sharedstorage.Plugin, pa func (_m *EventManager) SharedStorageBlobDownloaded(ss sharedstorage.Plugin, hash fftypes.Bytes32, size int64, payloadRef string, dataID *fftypes.UUID) error { ret := _m.Called(ss, hash, size, payloadRef, dataID) + if len(ret) == 0 { + panic("no return value specified for SharedStorageBlobDownloaded") + } + var r0 error if rf, ok := ret.Get(0).(func(sharedstorage.Plugin, fftypes.Bytes32, int64, string, *fftypes.UUID) error); ok { r0 = rf(ss, hash, size, payloadRef, dataID) @@ -287,6 +343,10 @@ func (_m *EventManager) SharedStorageBlobDownloaded(ss sharedstorage.Plugin, has func (_m *EventManager) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -301,6 +361,10 @@ func (_m *EventManager) Start() error { func (_m *EventManager) SubscriptionUpdates() chan<- *fftypes.UUID { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SubscriptionUpdates") + } + var r0 chan<- *fftypes.UUID if rf, ok := ret.Get(0).(func() chan<- *fftypes.UUID); ok { r0 = rf() @@ -317,6 +381,10 @@ func (_m *EventManager) SubscriptionUpdates() chan<- *fftypes.UUID { func (_m *EventManager) TokenPoolCreated(ctx context.Context, ti tokens.Plugin, pool *tokens.TokenPool) error { ret := _m.Called(ctx, ti, pool) + if len(ret) == 0 { + panic("no return value specified for TokenPoolCreated") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, tokens.Plugin, *tokens.TokenPool) error); ok { r0 = rf(ctx, ti, pool) @@ -331,6 +399,10 @@ func (_m *EventManager) TokenPoolCreated(ctx context.Context, ti tokens.Plugin, func (_m *EventManager) TokensApproved(ti tokens.Plugin, approval *tokens.TokenApproval) error { ret := _m.Called(ti, approval) + if len(ret) == 0 { + panic("no return value specified for TokensApproved") + } + var r0 error if rf, ok := ret.Get(0).(func(tokens.Plugin, *tokens.TokenApproval) error); ok { r0 = rf(ti, approval) @@ -345,6 +417,10 @@ func (_m *EventManager) TokensApproved(ti tokens.Plugin, approval *tokens.TokenA func (_m *EventManager) TokensTransferred(ti tokens.Plugin, transfer *tokens.TokenTransfer) error { ret := _m.Called(ti, transfer) + if len(ret) == 0 { + panic("no return value specified for TokensTransferred") + } + var r0 error if rf, ok := ret.Get(0).(func(tokens.Plugin, *tokens.TokenTransfer) error); ok { r0 = rf(ti, transfer) diff --git a/mocks/eventsmocks/callbacks.go b/mocks/eventsmocks/callbacks.go index 9223ee394..a018cbb77 100644 --- a/mocks/eventsmocks/callbacks.go +++ b/mocks/eventsmocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package eventsmocks @@ -28,6 +28,10 @@ func (_m *Callbacks) DeliveryResponse(connID string, inflight *core.EventDeliver func (_m *Callbacks) EphemeralSubscription(connID string, namespace string, filter *core.SubscriptionFilter, options *core.SubscriptionOptions) error { ret := _m.Called(connID, namespace, filter, options) + if len(ret) == 0 { + panic("no return value specified for EphemeralSubscription") + } + var r0 error if rf, ok := ret.Get(0).(func(string, string, *core.SubscriptionFilter, *core.SubscriptionOptions) error); ok { r0 = rf(connID, namespace, filter, options) @@ -42,6 +46,10 @@ func (_m *Callbacks) EphemeralSubscription(connID string, namespace string, filt func (_m *Callbacks) RegisterConnection(connID string, matcher events.SubscriptionMatcher) error { ret := _m.Called(connID, matcher) + if len(ret) == 0 { + panic("no return value specified for RegisterConnection") + } + var r0 error if rf, ok := ret.Get(0).(func(string, events.SubscriptionMatcher) error); ok { r0 = rf(connID, matcher) diff --git a/mocks/eventsmocks/plugin.go b/mocks/eventsmocks/plugin.go index 5bc34a37e..72b9b9057 100644 --- a/mocks/eventsmocks/plugin.go +++ b/mocks/eventsmocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package eventsmocks @@ -25,6 +25,10 @@ type Plugin struct { func (_m *Plugin) BatchDeliveryRequest(ctx context.Context, connID string, sub *core.Subscription, _a3 []*core.CombinedEventDataDelivery) error { ret := _m.Called(ctx, connID, sub, _a3) + if len(ret) == 0 { + panic("no return value specified for BatchDeliveryRequest") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *core.Subscription, []*core.CombinedEventDataDelivery) error); ok { r0 = rf(ctx, connID, sub, _a3) @@ -39,6 +43,10 @@ func (_m *Plugin) BatchDeliveryRequest(ctx context.Context, connID string, sub * func (_m *Plugin) Capabilities() *events.Capabilities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Capabilities") + } + var r0 *events.Capabilities if rf, ok := ret.Get(0).(func() *events.Capabilities); ok { r0 = rf() @@ -55,6 +63,10 @@ func (_m *Plugin) Capabilities() *events.Capabilities { func (_m *Plugin) DeliveryRequest(ctx context.Context, connID string, sub *core.Subscription, event *core.EventDelivery, data core.DataArray) error { ret := _m.Called(ctx, connID, sub, event, data) + if len(ret) == 0 { + panic("no return value specified for DeliveryRequest") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *core.Subscription, *core.EventDelivery, core.DataArray) error); ok { r0 = rf(ctx, connID, sub, event, data) @@ -69,6 +81,10 @@ func (_m *Plugin) DeliveryRequest(ctx context.Context, connID string, sub *core. func (_m *Plugin) Init(ctx context.Context, _a1 config.Section) error { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, config.Section) error); ok { r0 = rf(ctx, _a1) @@ -88,6 +104,10 @@ func (_m *Plugin) InitConfig(_a0 config.Section) { func (_m *Plugin) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -107,6 +127,10 @@ func (_m *Plugin) NamespaceRestarted(ns string, startTime time.Time) { func (_m *Plugin) SetHandler(namespace string, handler events.Callbacks) error { ret := _m.Called(namespace, handler) + if len(ret) == 0 { + panic("no return value specified for SetHandler") + } + var r0 error if rf, ok := ret.Get(0).(func(string, events.Callbacks) error); ok { r0 = rf(namespace, handler) @@ -121,6 +145,10 @@ func (_m *Plugin) SetHandler(namespace string, handler events.Callbacks) error { func (_m *Plugin) ValidateOptions(ctx context.Context, options *core.SubscriptionOptions) error { ret := _m.Called(ctx, options) + if len(ret) == 0 { + panic("no return value specified for ValidateOptions") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.SubscriptionOptions) error); ok { r0 = rf(ctx, options) diff --git a/mocks/identitymanagermocks/manager.go b/mocks/identitymanagermocks/manager.go index 7e573cca2..6a0ed097d 100644 --- a/mocks/identitymanagermocks/manager.go +++ b/mocks/identitymanagermocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package identitymanagermocks @@ -23,6 +23,10 @@ type Manager struct { func (_m *Manager) CachedIdentityLookupByID(ctx context.Context, id *fftypes.UUID) (*core.Identity, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for CachedIdentityLookupByID") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) (*core.Identity, error)); ok { @@ -49,6 +53,10 @@ func (_m *Manager) CachedIdentityLookupByID(ctx context.Context, id *fftypes.UUI func (_m *Manager) CachedIdentityLookupMustExist(ctx context.Context, did string) (*core.Identity, bool, error) { ret := _m.Called(ctx, did) + if len(ret) == 0 { + panic("no return value specified for CachedIdentityLookupMustExist") + } + var r0 *core.Identity var r1 bool var r2 error @@ -82,6 +90,10 @@ func (_m *Manager) CachedIdentityLookupMustExist(ctx context.Context, did string func (_m *Manager) CachedIdentityLookupNilOK(ctx context.Context, did string) (*core.Identity, bool, error) { ret := _m.Called(ctx, did) + if len(ret) == 0 { + panic("no return value specified for CachedIdentityLookupNilOK") + } + var r0 *core.Identity var r1 bool var r2 error @@ -115,6 +127,10 @@ func (_m *Manager) CachedIdentityLookupNilOK(ctx context.Context, did string) (* func (_m *Manager) FindIdentityForVerifier(ctx context.Context, iTypes []fftypes.FFEnum, verifier *core.VerifierRef) (*core.Identity, error) { ret := _m.Called(ctx, iTypes, verifier) + if len(ret) == 0 { + panic("no return value specified for FindIdentityForVerifier") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, []fftypes.FFEnum, *core.VerifierRef) (*core.Identity, error)); ok { @@ -141,6 +157,10 @@ func (_m *Manager) FindIdentityForVerifier(ctx context.Context, iTypes []fftypes func (_m *Manager) GetLocalNode(ctx context.Context) (*core.Identity, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetLocalNode") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*core.Identity, error)); ok { @@ -167,6 +187,10 @@ func (_m *Manager) GetLocalNode(ctx context.Context) (*core.Identity, error) { func (_m *Manager) GetRootOrg(ctx context.Context) (*core.Identity, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetRootOrg") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*core.Identity, error)); ok { @@ -193,6 +217,10 @@ func (_m *Manager) GetRootOrg(ctx context.Context) (*core.Identity, error) { func (_m *Manager) GetRootOrgDID(ctx context.Context) (string, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetRootOrgDID") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context) (string, error)); ok { @@ -217,6 +245,10 @@ func (_m *Manager) GetRootOrgDID(ctx context.Context) (string, error) { func (_m *Manager) ResolveIdentitySigner(ctx context.Context, _a1 *core.Identity) (*core.SignerRef, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for ResolveIdentitySigner") + } + var r0 *core.SignerRef var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Identity) (*core.SignerRef, error)); ok { @@ -243,6 +275,10 @@ func (_m *Manager) ResolveIdentitySigner(ctx context.Context, _a1 *core.Identity func (_m *Manager) ResolveInputSigningIdentity(ctx context.Context, signerRef *core.SignerRef) error { ret := _m.Called(ctx, signerRef) + if len(ret) == 0 { + panic("no return value specified for ResolveInputSigningIdentity") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.SignerRef) error); ok { r0 = rf(ctx, signerRef) @@ -257,6 +293,10 @@ func (_m *Manager) ResolveInputSigningIdentity(ctx context.Context, signerRef *c func (_m *Manager) ResolveInputSigningKey(ctx context.Context, inputKey string, keyNormalizationMode int) (string, error) { ret := _m.Called(ctx, inputKey, keyNormalizationMode) + if len(ret) == 0 { + panic("no return value specified for ResolveInputSigningKey") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, int) (string, error)); ok { @@ -281,6 +321,10 @@ func (_m *Manager) ResolveInputSigningKey(ctx context.Context, inputKey string, func (_m *Manager) ResolveInputVerifierRef(ctx context.Context, inputKey *core.VerifierRef, intent blockchain.ResolveKeyIntent) (*core.VerifierRef, error) { ret := _m.Called(ctx, inputKey, intent) + if len(ret) == 0 { + panic("no return value specified for ResolveInputVerifierRef") + } + var r0 *core.VerifierRef var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.VerifierRef, blockchain.ResolveKeyIntent) (*core.VerifierRef, error)); ok { @@ -307,6 +351,10 @@ func (_m *Manager) ResolveInputVerifierRef(ctx context.Context, inputKey *core.V func (_m *Manager) ResolveMultipartyRootVerifier(ctx context.Context) (*core.VerifierRef, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for ResolveMultipartyRootVerifier") + } + var r0 *core.VerifierRef var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*core.VerifierRef, error)); ok { @@ -333,6 +381,10 @@ func (_m *Manager) ResolveMultipartyRootVerifier(ctx context.Context) (*core.Ver func (_m *Manager) ResolveQuerySigningKey(ctx context.Context, inputKey string, keyNormalizationMode int) (string, error) { ret := _m.Called(ctx, inputKey, keyNormalizationMode) + if len(ret) == 0 { + panic("no return value specified for ResolveQuerySigningKey") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, int) (string, error)); ok { @@ -357,6 +409,10 @@ func (_m *Manager) ResolveQuerySigningKey(ctx context.Context, inputKey string, func (_m *Manager) ValidateNodeOwner(ctx context.Context, node *core.Identity, _a2 *core.Identity) (bool, error) { ret := _m.Called(ctx, node, _a2) + if len(ret) == 0 { + panic("no return value specified for ValidateNodeOwner") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Identity, *core.Identity) (bool, error)); ok { @@ -381,6 +437,10 @@ func (_m *Manager) ValidateNodeOwner(ctx context.Context, node *core.Identity, _ func (_m *Manager) VerifyIdentityChain(ctx context.Context, _a1 *core.Identity) (*core.Identity, bool, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for VerifyIdentityChain") + } + var r0 *core.Identity var r1 bool var r2 error diff --git a/mocks/identitymocks/callbacks.go b/mocks/identitymocks/callbacks.go index 1c41342ab..d3445fa43 100644 --- a/mocks/identitymocks/callbacks.go +++ b/mocks/identitymocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package identitymocks diff --git a/mocks/identitymocks/plugin.go b/mocks/identitymocks/plugin.go index cb022730b..0d2c8e6b6 100644 --- a/mocks/identitymocks/plugin.go +++ b/mocks/identitymocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package identitymocks @@ -21,6 +21,10 @@ type Plugin struct { func (_m *Plugin) Capabilities() *identity.Capabilities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Capabilities") + } + var r0 *identity.Capabilities if rf, ok := ret.Get(0).(func() *identity.Capabilities); ok { r0 = rf() @@ -37,6 +41,10 @@ func (_m *Plugin) Capabilities() *identity.Capabilities { func (_m *Plugin) Init(ctx context.Context, _a1 config.Section) error { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, config.Section) error); ok { r0 = rf(ctx, _a1) @@ -56,6 +64,10 @@ func (_m *Plugin) InitConfig(_a0 config.Section) { func (_m *Plugin) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -75,6 +87,10 @@ func (_m *Plugin) SetHandler(namespace string, handler identity.Callbacks) { func (_m *Plugin) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() diff --git a/mocks/metricsmocks/manager.go b/mocks/metricsmocks/manager.go index d7ab0d295..9e59f8fd4 100644 --- a/mocks/metricsmocks/manager.go +++ b/mocks/metricsmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package metricsmocks @@ -55,6 +55,10 @@ func (_m *Manager) DeleteTime(id string) { func (_m *Manager) GetTime(id string) time.Time { ret := _m.Called(id) + if len(ret) == 0 { + panic("no return value specified for GetTime") + } + var r0 time.Time if rf, ok := ret.Get(0).(func(string) time.Time); ok { r0 = rf(id) @@ -69,6 +73,10 @@ func (_m *Manager) GetTime(id string) time.Time { func (_m *Manager) IsMetricsEnabled() bool { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for IsMetricsEnabled") + } + var r0 bool if rf, ok := ret.Get(0).(func() bool); ok { r0 = rf() diff --git a/mocks/multipartymocks/manager.go b/mocks/multipartymocks/manager.go index b5a072978..c968b0bd1 100644 --- a/mocks/multipartymocks/manager.go +++ b/mocks/multipartymocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package multipartymocks @@ -25,6 +25,10 @@ type Manager struct { func (_m *Manager) ConfigureContract(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for ConfigureContract") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -39,6 +43,10 @@ func (_m *Manager) ConfigureContract(ctx context.Context) error { func (_m *Manager) GetNetworkVersion() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetNetworkVersion") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -53,6 +61,10 @@ func (_m *Manager) GetNetworkVersion() int { func (_m *Manager) LocalNode() multiparty.LocalNode { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LocalNode") + } + var r0 multiparty.LocalNode if rf, ok := ret.Get(0).(func() multiparty.LocalNode); ok { r0 = rf() @@ -67,6 +79,10 @@ func (_m *Manager) LocalNode() multiparty.LocalNode { func (_m *Manager) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -81,6 +97,10 @@ func (_m *Manager) Name() string { func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*core.PreparedOperation, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for PrepareOperation") + } + var r0 *core.PreparedOperation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation) (*core.PreparedOperation, error)); ok { @@ -107,6 +127,10 @@ func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*c func (_m *Manager) RootOrg() multiparty.RootOrg { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RootOrg") + } + var r0 multiparty.RootOrg if rf, ok := ret.Get(0).(func() multiparty.RootOrg); ok { r0 = rf() @@ -121,6 +145,10 @@ func (_m *Manager) RootOrg() multiparty.RootOrg { func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) (fftypes.JSONObject, core.OpPhase, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for RunOperation") + } + var r0 fftypes.JSONObject var r1 core.OpPhase var r2 error @@ -154,6 +182,10 @@ func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) func (_m *Manager) SubmitBatchPin(ctx context.Context, batch *core.BatchPersisted, contexts []*fftypes.Bytes32, payloadRef string, idempotentSubmit bool) error { ret := _m.Called(ctx, batch, contexts, payloadRef, idempotentSubmit) + if len(ret) == 0 { + panic("no return value specified for SubmitBatchPin") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.BatchPersisted, []*fftypes.Bytes32, string, bool) error); ok { r0 = rf(ctx, batch, contexts, payloadRef, idempotentSubmit) @@ -168,6 +200,10 @@ func (_m *Manager) SubmitBatchPin(ctx context.Context, batch *core.BatchPersiste func (_m *Manager) SubmitNetworkAction(ctx context.Context, signingKey string, action *core.NetworkAction, idempotentSubmit bool) error { ret := _m.Called(ctx, signingKey, action, idempotentSubmit) + if len(ret) == 0 { + panic("no return value specified for SubmitNetworkAction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *core.NetworkAction, bool) error); ok { r0 = rf(ctx, signingKey, action, idempotentSubmit) @@ -182,6 +218,10 @@ func (_m *Manager) SubmitNetworkAction(ctx context.Context, signingKey string, a func (_m *Manager) TerminateContract(ctx context.Context, location *fftypes.JSONAny, termination *blockchain.Event) error { ret := _m.Called(ctx, location, termination) + if len(ret) == 0 { + panic("no return value specified for TerminateContract") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.JSONAny, *blockchain.Event) error); ok { r0 = rf(ctx, location, termination) diff --git a/mocks/namespacemocks/manager.go b/mocks/namespacemocks/manager.go index f9d7e9414..b28d3e587 100644 --- a/mocks/namespacemocks/manager.go +++ b/mocks/namespacemocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package namespacemocks @@ -24,6 +24,10 @@ type Manager struct { func (_m *Manager) Authorize(ctx context.Context, authReq *fftypes.AuthReq) error { ret := _m.Called(ctx, authReq) + if len(ret) == 0 { + panic("no return value specified for Authorize") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.AuthReq) error); ok { r0 = rf(ctx, authReq) @@ -38,6 +42,10 @@ func (_m *Manager) Authorize(ctx context.Context, authReq *fftypes.AuthReq) erro func (_m *Manager) GetNamespaces(ctx context.Context, includeInitializing bool) ([]*core.NamespaceWithInitStatus, error) { ret := _m.Called(ctx, includeInitializing) + if len(ret) == 0 { + panic("no return value specified for GetNamespaces") + } + var r0 []*core.NamespaceWithInitStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) ([]*core.NamespaceWithInitStatus, error)); ok { @@ -64,6 +72,10 @@ func (_m *Manager) GetNamespaces(ctx context.Context, includeInitializing bool) func (_m *Manager) GetOperationByNamespacedID(ctx context.Context, nsOpID string) (*core.Operation, error) { ret := _m.Called(ctx, nsOpID) + if len(ret) == 0 { + panic("no return value specified for GetOperationByNamespacedID") + } + var r0 *core.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Operation, error)); ok { @@ -90,6 +102,10 @@ func (_m *Manager) GetOperationByNamespacedID(ctx context.Context, nsOpID string func (_m *Manager) Init(ctx context.Context, cancelCtx context.CancelFunc, reset chan bool, reloadConfig func() error) error { ret := _m.Called(ctx, cancelCtx, reset, reloadConfig) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, context.CancelFunc, chan bool, func() error) error); ok { r0 = rf(ctx, cancelCtx, reset, reloadConfig) @@ -104,6 +120,10 @@ func (_m *Manager) Init(ctx context.Context, cancelCtx context.CancelFunc, reset func (_m *Manager) MustOrchestrator(ns string) orchestrator.Orchestrator { ret := _m.Called(ns) + if len(ret) == 0 { + panic("no return value specified for MustOrchestrator") + } + var r0 orchestrator.Orchestrator if rf, ok := ret.Get(0).(func(string) orchestrator.Orchestrator); ok { r0 = rf(ns) @@ -120,6 +140,10 @@ func (_m *Manager) MustOrchestrator(ns string) orchestrator.Orchestrator { func (_m *Manager) Orchestrator(ctx context.Context, ns string, includeInitializing bool) (orchestrator.Orchestrator, error) { ret := _m.Called(ctx, ns, includeInitializing) + if len(ret) == 0 { + panic("no return value specified for Orchestrator") + } + var r0 orchestrator.Orchestrator var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, bool) (orchestrator.Orchestrator, error)); ok { @@ -146,6 +170,10 @@ func (_m *Manager) Orchestrator(ctx context.Context, ns string, includeInitializ func (_m *Manager) Reset(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Reset") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -160,6 +188,10 @@ func (_m *Manager) Reset(ctx context.Context) error { func (_m *Manager) ResolveOperationByNamespacedID(ctx context.Context, nsOpID string, op *core.OperationUpdateDTO) error { ret := _m.Called(ctx, nsOpID, op) + if len(ret) == 0 { + panic("no return value specified for ResolveOperationByNamespacedID") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *core.OperationUpdateDTO) error); ok { r0 = rf(ctx, nsOpID, op) @@ -174,6 +206,10 @@ func (_m *Manager) ResolveOperationByNamespacedID(ctx context.Context, nsOpID st func (_m *Manager) SPIEvents() spievents.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SPIEvents") + } + var r0 spievents.Manager if rf, ok := ret.Get(0).(func() spievents.Manager); ok { r0 = rf() @@ -190,6 +226,10 @@ func (_m *Manager) SPIEvents() spievents.Manager { func (_m *Manager) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() diff --git a/mocks/networkmapmocks/manager.go b/mocks/networkmapmocks/manager.go index 39a205c09..178021acc 100644 --- a/mocks/networkmapmocks/manager.go +++ b/mocks/networkmapmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package networkmapmocks @@ -22,6 +22,10 @@ type Manager struct { func (_m *Manager) GetDIDDocForIndentityByDID(ctx context.Context, did string) (*networkmap.DIDDocument, error) { ret := _m.Called(ctx, did) + if len(ret) == 0 { + panic("no return value specified for GetDIDDocForIndentityByDID") + } + var r0 *networkmap.DIDDocument var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*networkmap.DIDDocument, error)); ok { @@ -48,6 +52,10 @@ func (_m *Manager) GetDIDDocForIndentityByDID(ctx context.Context, did string) ( func (_m *Manager) GetDIDDocForIndentityByID(ctx context.Context, id string) (*networkmap.DIDDocument, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetDIDDocForIndentityByID") + } + var r0 *networkmap.DIDDocument var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*networkmap.DIDDocument, error)); ok { @@ -74,6 +82,10 @@ func (_m *Manager) GetDIDDocForIndentityByID(ctx context.Context, id string) (*n func (_m *Manager) GetIdentities(ctx context.Context, filter ffapi.AndFilter) ([]*core.Identity, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetIdentities") + } + var r0 []*core.Identity var r1 *ffapi.FilterResult var r2 error @@ -109,6 +121,10 @@ func (_m *Manager) GetIdentities(ctx context.Context, filter ffapi.AndFilter) ([ func (_m *Manager) GetIdentitiesWithVerifiers(ctx context.Context, filter ffapi.AndFilter) ([]*core.IdentityWithVerifiers, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetIdentitiesWithVerifiers") + } + var r0 []*core.IdentityWithVerifiers var r1 *ffapi.FilterResult var r2 error @@ -144,6 +160,10 @@ func (_m *Manager) GetIdentitiesWithVerifiers(ctx context.Context, filter ffapi. func (_m *Manager) GetIdentityByDID(ctx context.Context, did string) (*core.Identity, error) { ret := _m.Called(ctx, did) + if len(ret) == 0 { + panic("no return value specified for GetIdentityByDID") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Identity, error)); ok { @@ -170,6 +190,10 @@ func (_m *Manager) GetIdentityByDID(ctx context.Context, did string) (*core.Iden func (_m *Manager) GetIdentityByDIDWithVerifiers(ctx context.Context, did string) (*core.IdentityWithVerifiers, error) { ret := _m.Called(ctx, did) + if len(ret) == 0 { + panic("no return value specified for GetIdentityByDIDWithVerifiers") + } + var r0 *core.IdentityWithVerifiers var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.IdentityWithVerifiers, error)); ok { @@ -196,6 +220,10 @@ func (_m *Manager) GetIdentityByDIDWithVerifiers(ctx context.Context, did string func (_m *Manager) GetIdentityByID(ctx context.Context, id string) (*core.Identity, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetIdentityByID") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Identity, error)); ok { @@ -222,6 +250,10 @@ func (_m *Manager) GetIdentityByID(ctx context.Context, id string) (*core.Identi func (_m *Manager) GetIdentityByIDWithVerifiers(ctx context.Context, id string) (*core.IdentityWithVerifiers, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetIdentityByIDWithVerifiers") + } + var r0 *core.IdentityWithVerifiers var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.IdentityWithVerifiers, error)); ok { @@ -248,6 +280,10 @@ func (_m *Manager) GetIdentityByIDWithVerifiers(ctx context.Context, id string) func (_m *Manager) GetIdentityVerifiers(ctx context.Context, id string, filter ffapi.AndFilter) ([]*core.Verifier, *ffapi.FilterResult, error) { ret := _m.Called(ctx, id, filter) + if len(ret) == 0 { + panic("no return value specified for GetIdentityVerifiers") + } + var r0 []*core.Verifier var r1 *ffapi.FilterResult var r2 error @@ -283,6 +319,10 @@ func (_m *Manager) GetIdentityVerifiers(ctx context.Context, id string, filter f func (_m *Manager) GetNodeByNameOrID(ctx context.Context, nameOrID string) (*core.Identity, error) { ret := _m.Called(ctx, nameOrID) + if len(ret) == 0 { + panic("no return value specified for GetNodeByNameOrID") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Identity, error)); ok { @@ -309,6 +349,10 @@ func (_m *Manager) GetNodeByNameOrID(ctx context.Context, nameOrID string) (*cor func (_m *Manager) GetNodes(ctx context.Context, filter ffapi.AndFilter) ([]*core.Identity, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetNodes") + } + var r0 []*core.Identity var r1 *ffapi.FilterResult var r2 error @@ -344,6 +388,10 @@ func (_m *Manager) GetNodes(ctx context.Context, filter ffapi.AndFilter) ([]*cor func (_m *Manager) GetOrganizationByNameOrID(ctx context.Context, nameOrID string) (*core.Identity, error) { ret := _m.Called(ctx, nameOrID) + if len(ret) == 0 { + panic("no return value specified for GetOrganizationByNameOrID") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Identity, error)); ok { @@ -370,6 +418,10 @@ func (_m *Manager) GetOrganizationByNameOrID(ctx context.Context, nameOrID strin func (_m *Manager) GetOrganizations(ctx context.Context, filter ffapi.AndFilter) ([]*core.Identity, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetOrganizations") + } + var r0 []*core.Identity var r1 *ffapi.FilterResult var r2 error @@ -405,6 +457,10 @@ func (_m *Manager) GetOrganizations(ctx context.Context, filter ffapi.AndFilter) func (_m *Manager) GetOrganizationsWithVerifiers(ctx context.Context, filter ffapi.AndFilter) ([]*core.IdentityWithVerifiers, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetOrganizationsWithVerifiers") + } + var r0 []*core.IdentityWithVerifiers var r1 *ffapi.FilterResult var r2 error @@ -440,6 +496,10 @@ func (_m *Manager) GetOrganizationsWithVerifiers(ctx context.Context, filter ffa func (_m *Manager) GetVerifierByHash(ctx context.Context, hash string) (*core.Verifier, error) { ret := _m.Called(ctx, hash) + if len(ret) == 0 { + panic("no return value specified for GetVerifierByHash") + } + var r0 *core.Verifier var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Verifier, error)); ok { @@ -466,6 +526,10 @@ func (_m *Manager) GetVerifierByHash(ctx context.Context, hash string) (*core.Ve func (_m *Manager) GetVerifiers(ctx context.Context, filter ffapi.AndFilter) ([]*core.Verifier, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetVerifiers") + } + var r0 []*core.Verifier var r1 *ffapi.FilterResult var r2 error @@ -501,6 +565,10 @@ func (_m *Manager) GetVerifiers(ctx context.Context, filter ffapi.AndFilter) ([] func (_m *Manager) RegisterIdentity(ctx context.Context, dto *core.IdentityCreateDTO, waitConfirm bool) (*core.Identity, error) { ret := _m.Called(ctx, dto, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for RegisterIdentity") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.IdentityCreateDTO, bool) (*core.Identity, error)); ok { @@ -527,6 +595,10 @@ func (_m *Manager) RegisterIdentity(ctx context.Context, dto *core.IdentityCreat func (_m *Manager) RegisterNode(ctx context.Context, waitConfirm bool) (*core.Identity, error) { ret := _m.Called(ctx, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for RegisterNode") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (*core.Identity, error)); ok { @@ -553,6 +625,10 @@ func (_m *Manager) RegisterNode(ctx context.Context, waitConfirm bool) (*core.Id func (_m *Manager) RegisterNodeOrganization(ctx context.Context, waitConfirm bool) (*core.Identity, error) { ret := _m.Called(ctx, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for RegisterNodeOrganization") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (*core.Identity, error)); ok { @@ -579,6 +655,10 @@ func (_m *Manager) RegisterNodeOrganization(ctx context.Context, waitConfirm boo func (_m *Manager) RegisterOrganization(ctx context.Context, org *core.IdentityCreateDTO, waitConfirm bool) (*core.Identity, error) { ret := _m.Called(ctx, org, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for RegisterOrganization") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.IdentityCreateDTO, bool) (*core.Identity, error)); ok { @@ -605,6 +685,10 @@ func (_m *Manager) RegisterOrganization(ctx context.Context, org *core.IdentityC func (_m *Manager) UpdateIdentity(ctx context.Context, id string, dto *core.IdentityUpdateDTO, waitConfirm bool) (*core.Identity, error) { ret := _m.Called(ctx, id, dto, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for UpdateIdentity") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *core.IdentityUpdateDTO, bool) (*core.Identity, error)); ok { diff --git a/mocks/operationmocks/manager.go b/mocks/operationmocks/manager.go index 65963faba..7035ec6b9 100644 --- a/mocks/operationmocks/manager.go +++ b/mocks/operationmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package operationmocks @@ -31,6 +31,10 @@ func (_m *Manager) AddOrReuseOperation(ctx context.Context, op *core.Operation, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for AddOrReuseOperation") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation, ...database.PostCompletionHook) error); ok { r0 = rf(ctx, op, hooks...) @@ -52,6 +56,10 @@ func (_m *Manager) BulkInsertOperations(ctx context.Context, ops ...*core.Operat _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for BulkInsertOperations") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, ...*core.Operation) error); ok { r0 = rf(ctx, ops...) @@ -66,6 +74,10 @@ func (_m *Manager) BulkInsertOperations(ctx context.Context, ops ...*core.Operat func (_m *Manager) GetOperationByIDCached(ctx context.Context, opID *fftypes.UUID) (*core.Operation, error) { ret := _m.Called(ctx, opID) + if len(ret) == 0 { + panic("no return value specified for GetOperationByIDCached") + } + var r0 *core.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) (*core.Operation, error)); ok { @@ -92,6 +104,10 @@ func (_m *Manager) GetOperationByIDCached(ctx context.Context, opID *fftypes.UUI func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*core.PreparedOperation, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for PrepareOperation") + } + var r0 *core.PreparedOperation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation) (*core.PreparedOperation, error)); ok { @@ -123,6 +139,10 @@ func (_m *Manager) RegisterHandler(ctx context.Context, handler operations.Opera func (_m *Manager) ResolveOperationByID(ctx context.Context, opID *fftypes.UUID, op *core.OperationUpdateDTO) error { ret := _m.Called(ctx, opID, op) + if len(ret) == 0 { + panic("no return value specified for ResolveOperationByID") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, *core.OperationUpdateDTO) error); ok { r0 = rf(ctx, opID, op) @@ -137,6 +157,10 @@ func (_m *Manager) ResolveOperationByID(ctx context.Context, opID *fftypes.UUID, func (_m *Manager) ResubmitOperations(ctx context.Context, txID *fftypes.UUID) (int, []*core.Operation, error) { ret := _m.Called(ctx, txID) + if len(ret) == 0 { + panic("no return value specified for ResubmitOperations") + } + var r0 int var r1 []*core.Operation var r2 error @@ -170,6 +194,10 @@ func (_m *Manager) ResubmitOperations(ctx context.Context, txID *fftypes.UUID) ( func (_m *Manager) RetryOperation(ctx context.Context, opID *fftypes.UUID) (*core.Operation, error) { ret := _m.Called(ctx, opID) + if len(ret) == 0 { + panic("no return value specified for RetryOperation") + } + var r0 *core.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) (*core.Operation, error)); ok { @@ -196,6 +224,10 @@ func (_m *Manager) RetryOperation(ctx context.Context, opID *fftypes.UUID) (*cor func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation, idempotentSubmit bool) (fftypes.JSONObject, error) { ret := _m.Called(ctx, op, idempotentSubmit) + if len(ret) == 0 { + panic("no return value specified for RunOperation") + } + var r0 fftypes.JSONObject var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.PreparedOperation, bool) (fftypes.JSONObject, error)); ok { @@ -222,6 +254,10 @@ func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation, func (_m *Manager) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() diff --git a/mocks/orchestratormocks/orchestrator.go b/mocks/orchestratormocks/orchestrator.go index f9589bbc4..0bb4fb57d 100644 --- a/mocks/orchestratormocks/orchestrator.go +++ b/mocks/orchestratormocks/orchestrator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package orchestratormocks @@ -48,6 +48,10 @@ type Orchestrator struct { func (_m *Orchestrator) Assets() assets.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Assets") + } + var r0 assets.Manager if rf, ok := ret.Get(0).(func() assets.Manager); ok { r0 = rf() @@ -64,6 +68,10 @@ func (_m *Orchestrator) Assets() assets.Manager { func (_m *Orchestrator) Authorize(ctx context.Context, authReq *fftypes.AuthReq) error { ret := _m.Called(ctx, authReq) + if len(ret) == 0 { + panic("no return value specified for Authorize") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.AuthReq) error); ok { r0 = rf(ctx, authReq) @@ -78,6 +86,10 @@ func (_m *Orchestrator) Authorize(ctx context.Context, authReq *fftypes.AuthReq) func (_m *Orchestrator) BatchManager() batch.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for BatchManager") + } + var r0 batch.Manager if rf, ok := ret.Get(0).(func() batch.Manager); ok { r0 = rf() @@ -94,6 +106,10 @@ func (_m *Orchestrator) BatchManager() batch.Manager { func (_m *Orchestrator) Broadcast() broadcast.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Broadcast") + } + var r0 broadcast.Manager if rf, ok := ret.Get(0).(func() broadcast.Manager); ok { r0 = rf() @@ -110,6 +126,10 @@ func (_m *Orchestrator) Broadcast() broadcast.Manager { func (_m *Orchestrator) Contracts() contracts.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Contracts") + } + var r0 contracts.Manager if rf, ok := ret.Get(0).(func() contracts.Manager); ok { r0 = rf() @@ -126,6 +146,10 @@ func (_m *Orchestrator) Contracts() contracts.Manager { func (_m *Orchestrator) CreateSubscription(ctx context.Context, subDef *core.Subscription) (*core.Subscription, error) { ret := _m.Called(ctx, subDef) + if len(ret) == 0 { + panic("no return value specified for CreateSubscription") + } + var r0 *core.Subscription var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Subscription) (*core.Subscription, error)); ok { @@ -152,6 +176,10 @@ func (_m *Orchestrator) CreateSubscription(ctx context.Context, subDef *core.Sub func (_m *Orchestrator) CreateUpdateSubscription(ctx context.Context, subDef *core.Subscription) (*core.Subscription, error) { ret := _m.Called(ctx, subDef) + if len(ret) == 0 { + panic("no return value specified for CreateUpdateSubscription") + } + var r0 *core.Subscription var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Subscription) (*core.Subscription, error)); ok { @@ -178,6 +206,10 @@ func (_m *Orchestrator) CreateUpdateSubscription(ctx context.Context, subDef *co func (_m *Orchestrator) Data() data.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Data") + } + var r0 data.Manager if rf, ok := ret.Get(0).(func() data.Manager); ok { r0 = rf() @@ -194,6 +226,10 @@ func (_m *Orchestrator) Data() data.Manager { func (_m *Orchestrator) DefinitionSender() definitions.Sender { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DefinitionSender") + } + var r0 definitions.Sender if rf, ok := ret.Get(0).(func() definitions.Sender); ok { r0 = rf() @@ -210,6 +246,10 @@ func (_m *Orchestrator) DefinitionSender() definitions.Sender { func (_m *Orchestrator) DeleteSubscription(ctx context.Context, id string) error { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for DeleteSubscription") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, id) @@ -224,6 +264,10 @@ func (_m *Orchestrator) DeleteSubscription(ctx context.Context, id string) error func (_m *Orchestrator) Events() events.EventManager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 events.EventManager if rf, ok := ret.Get(0).(func() events.EventManager); ok { r0 = rf() @@ -240,6 +284,10 @@ func (_m *Orchestrator) Events() events.EventManager { func (_m *Orchestrator) GetBatchByID(ctx context.Context, id string) (*core.BatchPersisted, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBatchByID") + } + var r0 *core.BatchPersisted var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.BatchPersisted, error)); ok { @@ -266,6 +314,10 @@ func (_m *Orchestrator) GetBatchByID(ctx context.Context, id string) (*core.Batc func (_m *Orchestrator) GetBatches(ctx context.Context, filter ffapi.AndFilter) ([]*core.BatchPersisted, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetBatches") + } + var r0 []*core.BatchPersisted var r1 *ffapi.FilterResult var r2 error @@ -301,6 +353,10 @@ func (_m *Orchestrator) GetBatches(ctx context.Context, filter ffapi.AndFilter) func (_m *Orchestrator) GetBlockchainEventByID(ctx context.Context, id string) (*core.BlockchainEvent, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockchainEventByID") + } + var r0 *core.BlockchainEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.BlockchainEvent, error)); ok { @@ -327,6 +383,10 @@ func (_m *Orchestrator) GetBlockchainEventByID(ctx context.Context, id string) ( func (_m *Orchestrator) GetBlockchainEvents(ctx context.Context, filter ffapi.AndFilter) ([]*core.BlockchainEvent, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetBlockchainEvents") + } + var r0 []*core.BlockchainEvent var r1 *ffapi.FilterResult var r2 error @@ -362,6 +422,10 @@ func (_m *Orchestrator) GetBlockchainEvents(ctx context.Context, filter ffapi.An func (_m *Orchestrator) GetChartHistogram(ctx context.Context, startTime int64, endTime int64, buckets int64, tableName database.CollectionName) ([]*core.ChartHistogram, error) { ret := _m.Called(ctx, startTime, endTime, buckets, tableName) + if len(ret) == 0 { + panic("no return value specified for GetChartHistogram") + } + var r0 []*core.ChartHistogram var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, int64, int64, database.CollectionName) ([]*core.ChartHistogram, error)); ok { @@ -388,6 +452,10 @@ func (_m *Orchestrator) GetChartHistogram(ctx context.Context, startTime int64, func (_m *Orchestrator) GetData(ctx context.Context, filter ffapi.AndFilter) (core.DataArray, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetData") + } + var r0 core.DataArray var r1 *ffapi.FilterResult var r2 error @@ -423,6 +491,10 @@ func (_m *Orchestrator) GetData(ctx context.Context, filter ffapi.AndFilter) (co func (_m *Orchestrator) GetDataByID(ctx context.Context, id string) (*core.Data, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetDataByID") + } + var r0 *core.Data var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Data, error)); ok { @@ -449,6 +521,10 @@ func (_m *Orchestrator) GetDataByID(ctx context.Context, id string) (*core.Data, func (_m *Orchestrator) GetDataSubPaths(ctx context.Context, path string) ([]string, error) { ret := _m.Called(ctx, path) + if len(ret) == 0 { + panic("no return value specified for GetDataSubPaths") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]string, error)); ok { @@ -475,6 +551,10 @@ func (_m *Orchestrator) GetDataSubPaths(ctx context.Context, path string) ([]str func (_m *Orchestrator) GetDatatypeByID(ctx context.Context, id string) (*core.Datatype, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetDatatypeByID") + } + var r0 *core.Datatype var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Datatype, error)); ok { @@ -501,6 +581,10 @@ func (_m *Orchestrator) GetDatatypeByID(ctx context.Context, id string) (*core.D func (_m *Orchestrator) GetDatatypeByName(ctx context.Context, name string, version string) (*core.Datatype, error) { ret := _m.Called(ctx, name, version) + if len(ret) == 0 { + panic("no return value specified for GetDatatypeByName") + } + var r0 *core.Datatype var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) (*core.Datatype, error)); ok { @@ -527,6 +611,10 @@ func (_m *Orchestrator) GetDatatypeByName(ctx context.Context, name string, vers func (_m *Orchestrator) GetDatatypes(ctx context.Context, filter ffapi.AndFilter) ([]*core.Datatype, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetDatatypes") + } + var r0 []*core.Datatype var r1 *ffapi.FilterResult var r2 error @@ -562,6 +650,10 @@ func (_m *Orchestrator) GetDatatypes(ctx context.Context, filter ffapi.AndFilter func (_m *Orchestrator) GetEventByID(ctx context.Context, id string) (*core.Event, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetEventByID") + } + var r0 *core.Event var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Event, error)); ok { @@ -588,6 +680,10 @@ func (_m *Orchestrator) GetEventByID(ctx context.Context, id string) (*core.Even func (_m *Orchestrator) GetEventByIDWithReference(ctx context.Context, id string) (*core.EnrichedEvent, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetEventByIDWithReference") + } + var r0 *core.EnrichedEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.EnrichedEvent, error)); ok { @@ -614,6 +710,10 @@ func (_m *Orchestrator) GetEventByIDWithReference(ctx context.Context, id string func (_m *Orchestrator) GetEvents(ctx context.Context, filter ffapi.AndFilter) ([]*core.Event, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetEvents") + } + var r0 []*core.Event var r1 *ffapi.FilterResult var r2 error @@ -649,6 +749,10 @@ func (_m *Orchestrator) GetEvents(ctx context.Context, filter ffapi.AndFilter) ( func (_m *Orchestrator) GetEventsWithReferences(ctx context.Context, filter ffapi.AndFilter) ([]*core.EnrichedEvent, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetEventsWithReferences") + } + var r0 []*core.EnrichedEvent var r1 *ffapi.FilterResult var r2 error @@ -684,6 +788,10 @@ func (_m *Orchestrator) GetEventsWithReferences(ctx context.Context, filter ffap func (_m *Orchestrator) GetMessageByID(ctx context.Context, id string) (*core.Message, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetMessageByID") + } + var r0 *core.Message var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Message, error)); ok { @@ -710,6 +818,10 @@ func (_m *Orchestrator) GetMessageByID(ctx context.Context, id string) (*core.Me func (_m *Orchestrator) GetMessageByIDWithData(ctx context.Context, id string) (*core.MessageInOut, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetMessageByIDWithData") + } + var r0 *core.MessageInOut var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.MessageInOut, error)); ok { @@ -736,6 +848,10 @@ func (_m *Orchestrator) GetMessageByIDWithData(ctx context.Context, id string) ( func (_m *Orchestrator) GetMessageData(ctx context.Context, id string) (core.DataArray, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetMessageData") + } + var r0 core.DataArray var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (core.DataArray, error)); ok { @@ -762,6 +878,10 @@ func (_m *Orchestrator) GetMessageData(ctx context.Context, id string) (core.Dat func (_m *Orchestrator) GetMessageEvents(ctx context.Context, id string, filter ffapi.AndFilter) ([]*core.Event, *ffapi.FilterResult, error) { ret := _m.Called(ctx, id, filter) + if len(ret) == 0 { + panic("no return value specified for GetMessageEvents") + } + var r0 []*core.Event var r1 *ffapi.FilterResult var r2 error @@ -797,6 +917,10 @@ func (_m *Orchestrator) GetMessageEvents(ctx context.Context, id string, filter func (_m *Orchestrator) GetMessageTransaction(ctx context.Context, id string) (*core.Transaction, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetMessageTransaction") + } + var r0 *core.Transaction var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Transaction, error)); ok { @@ -823,6 +947,10 @@ func (_m *Orchestrator) GetMessageTransaction(ctx context.Context, id string) (* func (_m *Orchestrator) GetMessages(ctx context.Context, filter ffapi.AndFilter) ([]*core.Message, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetMessages") + } + var r0 []*core.Message var r1 *ffapi.FilterResult var r2 error @@ -858,6 +986,10 @@ func (_m *Orchestrator) GetMessages(ctx context.Context, filter ffapi.AndFilter) func (_m *Orchestrator) GetMessagesForData(ctx context.Context, dataID string, filter ffapi.AndFilter) ([]*core.Message, *ffapi.FilterResult, error) { ret := _m.Called(ctx, dataID, filter) + if len(ret) == 0 { + panic("no return value specified for GetMessagesForData") + } + var r0 []*core.Message var r1 *ffapi.FilterResult var r2 error @@ -893,6 +1025,10 @@ func (_m *Orchestrator) GetMessagesForData(ctx context.Context, dataID string, f func (_m *Orchestrator) GetMessagesWithData(ctx context.Context, filter ffapi.AndFilter) ([]*core.MessageInOut, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetMessagesWithData") + } + var r0 []*core.MessageInOut var r1 *ffapi.FilterResult var r2 error @@ -928,6 +1064,10 @@ func (_m *Orchestrator) GetMessagesWithData(ctx context.Context, filter ffapi.An func (_m *Orchestrator) GetNamespace(ctx context.Context) *core.Namespace { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNamespace") + } + var r0 *core.Namespace if rf, ok := ret.Get(0).(func(context.Context) *core.Namespace); ok { r0 = rf(ctx) @@ -944,6 +1084,10 @@ func (_m *Orchestrator) GetNamespace(ctx context.Context) *core.Namespace { func (_m *Orchestrator) GetNextPins(ctx context.Context, filter ffapi.AndFilter) ([]*core.NextPin, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetNextPins") + } + var r0 []*core.NextPin var r1 *ffapi.FilterResult var r2 error @@ -979,6 +1123,10 @@ func (_m *Orchestrator) GetNextPins(ctx context.Context, filter ffapi.AndFilter) func (_m *Orchestrator) GetOperationByID(ctx context.Context, id string) (*core.Operation, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetOperationByID") + } + var r0 *core.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Operation, error)); ok { @@ -1005,6 +1153,10 @@ func (_m *Orchestrator) GetOperationByID(ctx context.Context, id string) (*core. func (_m *Orchestrator) GetOperationByIDWithStatus(ctx context.Context, id string) (*core.OperationWithDetail, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetOperationByIDWithStatus") + } + var r0 *core.OperationWithDetail var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.OperationWithDetail, error)); ok { @@ -1031,6 +1183,10 @@ func (_m *Orchestrator) GetOperationByIDWithStatus(ctx context.Context, id strin func (_m *Orchestrator) GetOperations(ctx context.Context, filter ffapi.AndFilter) ([]*core.Operation, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetOperations") + } + var r0 []*core.Operation var r1 *ffapi.FilterResult var r2 error @@ -1066,6 +1222,10 @@ func (_m *Orchestrator) GetOperations(ctx context.Context, filter ffapi.AndFilte func (_m *Orchestrator) GetPins(ctx context.Context, filter ffapi.AndFilter) ([]*core.Pin, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetPins") + } + var r0 []*core.Pin var r1 *ffapi.FilterResult var r2 error @@ -1101,6 +1261,10 @@ func (_m *Orchestrator) GetPins(ctx context.Context, filter ffapi.AndFilter) ([] func (_m *Orchestrator) GetStatus(ctx context.Context) (*core.NamespaceStatus, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetStatus") + } + var r0 *core.NamespaceStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*core.NamespaceStatus, error)); ok { @@ -1127,6 +1291,10 @@ func (_m *Orchestrator) GetStatus(ctx context.Context) (*core.NamespaceStatus, e func (_m *Orchestrator) GetSubscriptionByID(ctx context.Context, id string) (*core.Subscription, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetSubscriptionByID") + } + var r0 *core.Subscription var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Subscription, error)); ok { @@ -1153,6 +1321,10 @@ func (_m *Orchestrator) GetSubscriptionByID(ctx context.Context, id string) (*co func (_m *Orchestrator) GetSubscriptionByIDWithStatus(ctx context.Context, id string) (*core.SubscriptionWithStatus, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetSubscriptionByIDWithStatus") + } + var r0 *core.SubscriptionWithStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.SubscriptionWithStatus, error)); ok { @@ -1179,6 +1351,10 @@ func (_m *Orchestrator) GetSubscriptionByIDWithStatus(ctx context.Context, id st func (_m *Orchestrator) GetSubscriptions(ctx context.Context, filter ffapi.AndFilter) ([]*core.Subscription, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetSubscriptions") + } + var r0 []*core.Subscription var r1 *ffapi.FilterResult var r2 error @@ -1214,6 +1390,10 @@ func (_m *Orchestrator) GetSubscriptions(ctx context.Context, filter ffapi.AndFi func (_m *Orchestrator) GetTransactionBlockchainEvents(ctx context.Context, id string) ([]*core.BlockchainEvent, *ffapi.FilterResult, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetTransactionBlockchainEvents") + } + var r0 []*core.BlockchainEvent var r1 *ffapi.FilterResult var r2 error @@ -1249,6 +1429,10 @@ func (_m *Orchestrator) GetTransactionBlockchainEvents(ctx context.Context, id s func (_m *Orchestrator) GetTransactionByID(ctx context.Context, id string) (*core.Transaction, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetTransactionByID") + } + var r0 *core.Transaction var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Transaction, error)); ok { @@ -1275,6 +1459,10 @@ func (_m *Orchestrator) GetTransactionByID(ctx context.Context, id string) (*cor func (_m *Orchestrator) GetTransactionOperations(ctx context.Context, id string) ([]*core.Operation, *ffapi.FilterResult, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetTransactionOperations") + } + var r0 []*core.Operation var r1 *ffapi.FilterResult var r2 error @@ -1310,6 +1498,10 @@ func (_m *Orchestrator) GetTransactionOperations(ctx context.Context, id string) func (_m *Orchestrator) GetTransactionStatus(ctx context.Context, id string) (*core.TransactionStatus, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetTransactionStatus") + } + var r0 *core.TransactionStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.TransactionStatus, error)); ok { @@ -1336,6 +1528,10 @@ func (_m *Orchestrator) GetTransactionStatus(ctx context.Context, id string) (*c func (_m *Orchestrator) GetTransactions(ctx context.Context, filter ffapi.AndFilter) ([]*core.Transaction, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetTransactions") + } + var r0 []*core.Transaction var r1 *ffapi.FilterResult var r2 error @@ -1371,6 +1567,10 @@ func (_m *Orchestrator) GetTransactions(ctx context.Context, filter ffapi.AndFil func (_m *Orchestrator) Identity() identity.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Identity") + } + var r0 identity.Manager if rf, ok := ret.Get(0).(func() identity.Manager); ok { r0 = rf() @@ -1387,6 +1587,10 @@ func (_m *Orchestrator) Identity() identity.Manager { func (_m *Orchestrator) Init() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1401,6 +1605,10 @@ func (_m *Orchestrator) Init() error { func (_m *Orchestrator) MultiParty() multiparty.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MultiParty") + } + var r0 multiparty.Manager if rf, ok := ret.Get(0).(func() multiparty.Manager); ok { r0 = rf() @@ -1417,6 +1625,10 @@ func (_m *Orchestrator) MultiParty() multiparty.Manager { func (_m *Orchestrator) NetworkMap() networkmap.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NetworkMap") + } + var r0 networkmap.Manager if rf, ok := ret.Get(0).(func() networkmap.Manager); ok { r0 = rf() @@ -1433,6 +1645,10 @@ func (_m *Orchestrator) NetworkMap() networkmap.Manager { func (_m *Orchestrator) Operations() operations.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Operations") + } + var r0 operations.Manager if rf, ok := ret.Get(0).(func() operations.Manager); ok { r0 = rf() @@ -1454,6 +1670,10 @@ func (_m *Orchestrator) PreInit(ctx context.Context, cancelCtx context.CancelFun func (_m *Orchestrator) PrivateMessaging() privatemessaging.Manager { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for PrivateMessaging") + } + var r0 privatemessaging.Manager if rf, ok := ret.Get(0).(func() privatemessaging.Manager); ok { r0 = rf() @@ -1470,6 +1690,10 @@ func (_m *Orchestrator) PrivateMessaging() privatemessaging.Manager { func (_m *Orchestrator) RequestReply(ctx context.Context, msg *core.MessageInOut) (*core.MessageInOut, error) { ret := _m.Called(ctx, msg) + if len(ret) == 0 { + panic("no return value specified for RequestReply") + } + var r0 *core.MessageInOut var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.MessageInOut) (*core.MessageInOut, error)); ok { @@ -1496,6 +1720,10 @@ func (_m *Orchestrator) RequestReply(ctx context.Context, msg *core.MessageInOut func (_m *Orchestrator) RewindPins(ctx context.Context, rewind *core.PinRewind) (*core.PinRewind, error) { ret := _m.Called(ctx, rewind) + if len(ret) == 0 { + panic("no return value specified for RewindPins") + } + var r0 *core.PinRewind var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.PinRewind) (*core.PinRewind, error)); ok { @@ -1522,6 +1750,10 @@ func (_m *Orchestrator) RewindPins(ctx context.Context, rewind *core.PinRewind) func (_m *Orchestrator) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -1536,6 +1768,10 @@ func (_m *Orchestrator) Start() error { func (_m *Orchestrator) SubmitNetworkAction(ctx context.Context, action *core.NetworkAction) error { ret := _m.Called(ctx, action) + if len(ret) == 0 { + panic("no return value specified for SubmitNetworkAction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.NetworkAction) error); ok { r0 = rf(ctx, action) diff --git a/mocks/privatemessagingmocks/manager.go b/mocks/privatemessagingmocks/manager.go index 20510a704..1d051d1f6 100644 --- a/mocks/privatemessagingmocks/manager.go +++ b/mocks/privatemessagingmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package privatemessagingmocks @@ -24,6 +24,10 @@ type Manager struct { func (_m *Manager) EnsureLocalGroup(ctx context.Context, group *core.Group, creator *core.Member) (bool, error) { ret := _m.Called(ctx, group, creator) + if len(ret) == 0 { + panic("no return value specified for EnsureLocalGroup") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Group, *core.Member) (bool, error)); ok { @@ -48,6 +52,10 @@ func (_m *Manager) EnsureLocalGroup(ctx context.Context, group *core.Group, crea func (_m *Manager) GetGroupByID(ctx context.Context, id string) (*core.Group, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetGroupByID") + } + var r0 *core.Group var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*core.Group, error)); ok { @@ -74,6 +82,10 @@ func (_m *Manager) GetGroupByID(ctx context.Context, id string) (*core.Group, er func (_m *Manager) GetGroups(ctx context.Context, filter ffapi.AndFilter) ([]*core.Group, *ffapi.FilterResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetGroups") + } + var r0 []*core.Group var r1 *ffapi.FilterResult var r2 error @@ -109,6 +121,10 @@ func (_m *Manager) GetGroups(ctx context.Context, filter ffapi.AndFilter) ([]*co func (_m *Manager) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -123,6 +139,10 @@ func (_m *Manager) Name() string { func (_m *Manager) NewMessage(msg *core.MessageInOut) syncasync.Sender { ret := _m.Called(msg) + if len(ret) == 0 { + panic("no return value specified for NewMessage") + } + var r0 syncasync.Sender if rf, ok := ret.Get(0).(func(*core.MessageInOut) syncasync.Sender); ok { r0 = rf(msg) @@ -139,6 +159,10 @@ func (_m *Manager) NewMessage(msg *core.MessageInOut) syncasync.Sender { func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*core.PreparedOperation, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for PrepareOperation") + } + var r0 *core.PreparedOperation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Operation) (*core.PreparedOperation, error)); ok { @@ -165,6 +189,10 @@ func (_m *Manager) PrepareOperation(ctx context.Context, op *core.Operation) (*c func (_m *Manager) RequestReply(ctx context.Context, request *core.MessageInOut) (*core.MessageInOut, error) { ret := _m.Called(ctx, request) + if len(ret) == 0 { + panic("no return value specified for RequestReply") + } + var r0 *core.MessageInOut var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.MessageInOut) (*core.MessageInOut, error)); ok { @@ -191,6 +219,10 @@ func (_m *Manager) RequestReply(ctx context.Context, request *core.MessageInOut) func (_m *Manager) ResolveInitGroup(ctx context.Context, msg *core.Message, creator *core.Member) (*core.Group, error) { ret := _m.Called(ctx, msg, creator) + if len(ret) == 0 { + panic("no return value specified for ResolveInitGroup") + } + var r0 *core.Group var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.Message, *core.Member) (*core.Group, error)); ok { @@ -217,6 +249,10 @@ func (_m *Manager) ResolveInitGroup(ctx context.Context, msg *core.Message, crea func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) (fftypes.JSONObject, core.OpPhase, error) { ret := _m.Called(ctx, op) + if len(ret) == 0 { + panic("no return value specified for RunOperation") + } + var r0 fftypes.JSONObject var r1 core.OpPhase var r2 error @@ -250,6 +286,10 @@ func (_m *Manager) RunOperation(ctx context.Context, op *core.PreparedOperation) func (_m *Manager) SendMessage(ctx context.Context, in *core.MessageInOut, waitConfirm bool) (*core.Message, error) { ret := _m.Called(ctx, in, waitConfirm) + if len(ret) == 0 { + panic("no return value specified for SendMessage") + } + var r0 *core.Message var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.MessageInOut, bool) (*core.Message, error)); ok { diff --git a/mocks/shareddownloadmocks/callbacks.go b/mocks/shareddownloadmocks/callbacks.go index c321d921b..4348a9b63 100644 --- a/mocks/shareddownloadmocks/callbacks.go +++ b/mocks/shareddownloadmocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package shareddownloadmocks @@ -16,6 +16,10 @@ type Callbacks struct { func (_m *Callbacks) SharedStorageBatchDownloaded(payloadRef string, data []byte) (*fftypes.UUID, error) { ret := _m.Called(payloadRef, data) + if len(ret) == 0 { + panic("no return value specified for SharedStorageBatchDownloaded") + } + var r0 *fftypes.UUID var r1 error if rf, ok := ret.Get(0).(func(string, []byte) (*fftypes.UUID, error)); ok { @@ -42,6 +46,10 @@ func (_m *Callbacks) SharedStorageBatchDownloaded(payloadRef string, data []byte func (_m *Callbacks) SharedStorageBlobDownloaded(hash fftypes.Bytes32, size int64, payloadRef string, dataID *fftypes.UUID) error { ret := _m.Called(hash, size, payloadRef, dataID) + if len(ret) == 0 { + panic("no return value specified for SharedStorageBlobDownloaded") + } + var r0 error if rf, ok := ret.Get(0).(func(fftypes.Bytes32, int64, string, *fftypes.UUID) error); ok { r0 = rf(hash, size, payloadRef, dataID) diff --git a/mocks/shareddownloadmocks/manager.go b/mocks/shareddownloadmocks/manager.go index 7d1841809..aad3eedb3 100644 --- a/mocks/shareddownloadmocks/manager.go +++ b/mocks/shareddownloadmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package shareddownloadmocks @@ -18,6 +18,10 @@ type Manager struct { func (_m *Manager) InitiateDownloadBatch(ctx context.Context, tx *fftypes.UUID, payloadRef string, idempotentSubmit bool) error { ret := _m.Called(ctx, tx, payloadRef, idempotentSubmit) + if len(ret) == 0 { + panic("no return value specified for InitiateDownloadBatch") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, string, bool) error); ok { r0 = rf(ctx, tx, payloadRef, idempotentSubmit) @@ -32,6 +36,10 @@ func (_m *Manager) InitiateDownloadBatch(ctx context.Context, tx *fftypes.UUID, func (_m *Manager) InitiateDownloadBlob(ctx context.Context, tx *fftypes.UUID, dataID *fftypes.UUID, payloadRef string, idempotentSubmit bool) error { ret := _m.Called(ctx, tx, dataID, payloadRef, idempotentSubmit) + if len(ret) == 0 { + panic("no return value specified for InitiateDownloadBlob") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, *fftypes.UUID, string, bool) error); ok { r0 = rf(ctx, tx, dataID, payloadRef, idempotentSubmit) @@ -46,6 +54,10 @@ func (_m *Manager) InitiateDownloadBlob(ctx context.Context, tx *fftypes.UUID, d func (_m *Manager) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() diff --git a/mocks/sharedstoragemocks/callbacks.go b/mocks/sharedstoragemocks/callbacks.go index e9562a513..002173b5f 100644 --- a/mocks/sharedstoragemocks/callbacks.go +++ b/mocks/sharedstoragemocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package sharedstoragemocks diff --git a/mocks/sharedstoragemocks/plugin.go b/mocks/sharedstoragemocks/plugin.go index 6665d8285..44f92f32d 100644 --- a/mocks/sharedstoragemocks/plugin.go +++ b/mocks/sharedstoragemocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package sharedstoragemocks @@ -23,6 +23,10 @@ type Plugin struct { func (_m *Plugin) Capabilities() *sharedstorage.Capabilities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Capabilities") + } + var r0 *sharedstorage.Capabilities if rf, ok := ret.Get(0).(func() *sharedstorage.Capabilities); ok { r0 = rf() @@ -39,6 +43,10 @@ func (_m *Plugin) Capabilities() *sharedstorage.Capabilities { func (_m *Plugin) DownloadData(ctx context.Context, payloadRef string) (io.ReadCloser, error) { ret := _m.Called(ctx, payloadRef) + if len(ret) == 0 { + panic("no return value specified for DownloadData") + } + var r0 io.ReadCloser var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (io.ReadCloser, error)); ok { @@ -65,6 +73,10 @@ func (_m *Plugin) DownloadData(ctx context.Context, payloadRef string) (io.ReadC func (_m *Plugin) Init(ctx context.Context, _a1 config.Section) error { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, config.Section) error); ok { r0 = rf(ctx, _a1) @@ -84,6 +96,10 @@ func (_m *Plugin) InitConfig(_a0 config.Section) { func (_m *Plugin) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -103,6 +119,10 @@ func (_m *Plugin) SetHandler(namespace string, handler sharedstorage.Callbacks) func (_m *Plugin) UploadData(ctx context.Context, data io.Reader) (string, error) { ret := _m.Called(ctx, data) + if len(ret) == 0 { + panic("no return value specified for UploadData") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, io.Reader) (string, error)); ok { diff --git a/mocks/spieventsmocks/manager.go b/mocks/spieventsmocks/manager.go index c577914d4..7286e9b58 100644 --- a/mocks/spieventsmocks/manager.go +++ b/mocks/spieventsmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package spieventsmocks diff --git a/mocks/syncasyncmocks/bridge.go b/mocks/syncasyncmocks/bridge.go index 7936e1adc..57b9fcded 100644 --- a/mocks/syncasyncmocks/bridge.go +++ b/mocks/syncasyncmocks/bridge.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package syncasyncmocks @@ -29,6 +29,10 @@ func (_m *Bridge) Init(sysevents system.EventInterface) { func (_m *Bridge) WaitForDeployOperation(ctx context.Context, id *fftypes.UUID, send syncasync.SendFunction) (*core.Operation, error) { ret := _m.Called(ctx, id, send) + if len(ret) == 0 { + panic("no return value specified for WaitForDeployOperation") + } + var r0 *core.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, syncasync.SendFunction) (*core.Operation, error)); ok { @@ -55,6 +59,10 @@ func (_m *Bridge) WaitForDeployOperation(ctx context.Context, id *fftypes.UUID, func (_m *Bridge) WaitForIdentity(ctx context.Context, id *fftypes.UUID, send syncasync.SendFunction) (*core.Identity, error) { ret := _m.Called(ctx, id, send) + if len(ret) == 0 { + panic("no return value specified for WaitForIdentity") + } + var r0 *core.Identity var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, syncasync.SendFunction) (*core.Identity, error)); ok { @@ -81,6 +89,10 @@ func (_m *Bridge) WaitForIdentity(ctx context.Context, id *fftypes.UUID, send sy func (_m *Bridge) WaitForInvokeOperation(ctx context.Context, id *fftypes.UUID, send syncasync.SendFunction) (*core.Operation, error) { ret := _m.Called(ctx, id, send) + if len(ret) == 0 { + panic("no return value specified for WaitForInvokeOperation") + } + var r0 *core.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, syncasync.SendFunction) (*core.Operation, error)); ok { @@ -107,6 +119,10 @@ func (_m *Bridge) WaitForInvokeOperation(ctx context.Context, id *fftypes.UUID, func (_m *Bridge) WaitForMessage(ctx context.Context, id *fftypes.UUID, send syncasync.SendFunction) (*core.Message, error) { ret := _m.Called(ctx, id, send) + if len(ret) == 0 { + panic("no return value specified for WaitForMessage") + } + var r0 *core.Message var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, syncasync.SendFunction) (*core.Message, error)); ok { @@ -133,6 +149,10 @@ func (_m *Bridge) WaitForMessage(ctx context.Context, id *fftypes.UUID, send syn func (_m *Bridge) WaitForReply(ctx context.Context, id *fftypes.UUID, send syncasync.SendFunction) (*core.MessageInOut, error) { ret := _m.Called(ctx, id, send) + if len(ret) == 0 { + panic("no return value specified for WaitForReply") + } + var r0 *core.MessageInOut var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, syncasync.SendFunction) (*core.MessageInOut, error)); ok { @@ -159,6 +179,10 @@ func (_m *Bridge) WaitForReply(ctx context.Context, id *fftypes.UUID, send synca func (_m *Bridge) WaitForTokenApproval(ctx context.Context, id *fftypes.UUID, send syncasync.SendFunction) (*core.TokenApproval, error) { ret := _m.Called(ctx, id, send) + if len(ret) == 0 { + panic("no return value specified for WaitForTokenApproval") + } + var r0 *core.TokenApproval var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, syncasync.SendFunction) (*core.TokenApproval, error)); ok { @@ -185,6 +209,10 @@ func (_m *Bridge) WaitForTokenApproval(ctx context.Context, id *fftypes.UUID, se func (_m *Bridge) WaitForTokenPool(ctx context.Context, id *fftypes.UUID, send syncasync.SendFunction) (*core.TokenPool, error) { ret := _m.Called(ctx, id, send) + if len(ret) == 0 { + panic("no return value specified for WaitForTokenPool") + } + var r0 *core.TokenPool var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, syncasync.SendFunction) (*core.TokenPool, error)); ok { @@ -211,6 +239,10 @@ func (_m *Bridge) WaitForTokenPool(ctx context.Context, id *fftypes.UUID, send s func (_m *Bridge) WaitForTokenTransfer(ctx context.Context, id *fftypes.UUID, send syncasync.SendFunction) (*core.TokenTransfer, error) { ret := _m.Called(ctx, id, send) + if len(ret) == 0 { + panic("no return value specified for WaitForTokenTransfer") + } + var r0 *core.TokenTransfer var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, syncasync.SendFunction) (*core.TokenTransfer, error)); ok { diff --git a/mocks/syncasyncmocks/sender.go b/mocks/syncasyncmocks/sender.go index 694bd5746..8f68f26c9 100644 --- a/mocks/syncasyncmocks/sender.go +++ b/mocks/syncasyncmocks/sender.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package syncasyncmocks @@ -17,6 +17,10 @@ type Sender struct { func (_m *Sender) Prepare(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Prepare") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -31,6 +35,10 @@ func (_m *Sender) Prepare(ctx context.Context) error { func (_m *Sender) Send(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -45,6 +53,10 @@ func (_m *Sender) Send(ctx context.Context) error { func (_m *Sender) SendAndWait(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for SendAndWait") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) diff --git a/mocks/systemeventmocks/event_interface.go b/mocks/systemeventmocks/event_interface.go index 99c7cbc6e..23db5f205 100644 --- a/mocks/systemeventmocks/event_interface.go +++ b/mocks/systemeventmocks/event_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package systemeventmocks @@ -16,6 +16,10 @@ type EventInterface struct { func (_m *EventInterface) AddSystemEventListener(ns string, el system.EventListener) error { ret := _m.Called(ns, el) + if len(ret) == 0 { + panic("no return value specified for AddSystemEventListener") + } + var r0 error if rf, ok := ret.Get(0).(func(string, system.EventListener) error); ok { r0 = rf(ns, el) diff --git a/mocks/tokenmocks/callbacks.go b/mocks/tokenmocks/callbacks.go index d34dd7d3d..17104d652 100644 --- a/mocks/tokenmocks/callbacks.go +++ b/mocks/tokenmocks/callbacks.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package tokenmocks @@ -18,6 +18,10 @@ type Callbacks struct { func (_m *Callbacks) TokenPoolCreated(ctx context.Context, plugin tokens.Plugin, pool *tokens.TokenPool) error { ret := _m.Called(ctx, plugin, pool) + if len(ret) == 0 { + panic("no return value specified for TokenPoolCreated") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, tokens.Plugin, *tokens.TokenPool) error); ok { r0 = rf(ctx, plugin, pool) @@ -32,6 +36,10 @@ func (_m *Callbacks) TokenPoolCreated(ctx context.Context, plugin tokens.Plugin, func (_m *Callbacks) TokensApproved(plugin tokens.Plugin, approval *tokens.TokenApproval) error { ret := _m.Called(plugin, approval) + if len(ret) == 0 { + panic("no return value specified for TokensApproved") + } + var r0 error if rf, ok := ret.Get(0).(func(tokens.Plugin, *tokens.TokenApproval) error); ok { r0 = rf(plugin, approval) @@ -46,6 +54,10 @@ func (_m *Callbacks) TokensApproved(plugin tokens.Plugin, approval *tokens.Token func (_m *Callbacks) TokensTransferred(plugin tokens.Plugin, transfer *tokens.TokenTransfer) error { ret := _m.Called(plugin, transfer) + if len(ret) == 0 { + panic("no return value specified for TokensTransferred") + } + var r0 error if rf, ok := ret.Get(0).(func(tokens.Plugin, *tokens.TokenTransfer) error); ok { r0 = rf(plugin, transfer) diff --git a/mocks/tokenmocks/plugin.go b/mocks/tokenmocks/plugin.go index 50ff57f28..03a5e09cf 100644 --- a/mocks/tokenmocks/plugin.go +++ b/mocks/tokenmocks/plugin.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package tokenmocks @@ -25,6 +25,10 @@ type Plugin struct { func (_m *Plugin) ActivateTokenPool(ctx context.Context, pool *core.TokenPool) (core.OpPhase, error) { ret := _m.Called(ctx, pool) + if len(ret) == 0 { + panic("no return value specified for ActivateTokenPool") + } + var r0 core.OpPhase var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPool) (core.OpPhase, error)); ok { @@ -49,6 +53,10 @@ func (_m *Plugin) ActivateTokenPool(ctx context.Context, pool *core.TokenPool) ( func (_m *Plugin) BurnTokens(ctx context.Context, nsOpID string, poolLocator string, burn *core.TokenTransfer, methods *fftypes.JSONAny) error { ret := _m.Called(ctx, nsOpID, poolLocator, burn, methods) + if len(ret) == 0 { + panic("no return value specified for BurnTokens") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, *core.TokenTransfer, *fftypes.JSONAny) error); ok { r0 = rf(ctx, nsOpID, poolLocator, burn, methods) @@ -63,6 +71,10 @@ func (_m *Plugin) BurnTokens(ctx context.Context, nsOpID string, poolLocator str func (_m *Plugin) Capabilities() *tokens.Capabilities { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Capabilities") + } + var r0 *tokens.Capabilities if rf, ok := ret.Get(0).(func() *tokens.Capabilities); ok { r0 = rf() @@ -79,6 +91,10 @@ func (_m *Plugin) Capabilities() *tokens.Capabilities { func (_m *Plugin) CheckInterface(ctx context.Context, pool *core.TokenPool, methods []*fftypes.FFIMethod) (*fftypes.JSONAny, error) { ret := _m.Called(ctx, pool, methods) + if len(ret) == 0 { + panic("no return value specified for CheckInterface") + } + var r0 *fftypes.JSONAny var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPool, []*fftypes.FFIMethod) (*fftypes.JSONAny, error)); ok { @@ -105,6 +121,10 @@ func (_m *Plugin) CheckInterface(ctx context.Context, pool *core.TokenPool, meth func (_m *Plugin) CreateTokenPool(ctx context.Context, nsOpID string, pool *core.TokenPool) (core.OpPhase, error) { ret := _m.Called(ctx, nsOpID, pool) + if len(ret) == 0 { + panic("no return value specified for CreateTokenPool") + } + var r0 core.OpPhase var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, *core.TokenPool) (core.OpPhase, error)); ok { @@ -129,6 +149,10 @@ func (_m *Plugin) CreateTokenPool(ctx context.Context, nsOpID string, pool *core func (_m *Plugin) DeactivateTokenPool(ctx context.Context, pool *core.TokenPool) error { ret := _m.Called(ctx, pool) + if len(ret) == 0 { + panic("no return value specified for DeactivateTokenPool") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.TokenPool) error); ok { r0 = rf(ctx, pool) @@ -143,6 +167,10 @@ func (_m *Plugin) DeactivateTokenPool(ctx context.Context, pool *core.TokenPool) func (_m *Plugin) Init(ctx context.Context, cancelCtx context.CancelFunc, name string, _a3 config.Section) error { ret := _m.Called(ctx, cancelCtx, name, _a3) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, context.CancelFunc, string, config.Section) error); ok { r0 = rf(ctx, cancelCtx, name, _a3) @@ -162,6 +190,10 @@ func (_m *Plugin) InitConfig(_a0 config.Section) { func (_m *Plugin) MintTokens(ctx context.Context, nsOpID string, poolLocator string, mint *core.TokenTransfer, methods *fftypes.JSONAny) error { ret := _m.Called(ctx, nsOpID, poolLocator, mint, methods) + if len(ret) == 0 { + panic("no return value specified for MintTokens") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, *core.TokenTransfer, *fftypes.JSONAny) error); ok { r0 = rf(ctx, nsOpID, poolLocator, mint, methods) @@ -176,6 +208,10 @@ func (_m *Plugin) MintTokens(ctx context.Context, nsOpID string, poolLocator str func (_m *Plugin) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -200,6 +236,10 @@ func (_m *Plugin) SetOperationHandler(namespace string, handler core.OperationCa func (_m *Plugin) Start() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -214,6 +254,10 @@ func (_m *Plugin) Start() error { func (_m *Plugin) TokensApproval(ctx context.Context, nsOpID string, poolLocator string, approval *core.TokenApproval, methods *fftypes.JSONAny) error { ret := _m.Called(ctx, nsOpID, poolLocator, approval, methods) + if len(ret) == 0 { + panic("no return value specified for TokensApproval") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, *core.TokenApproval, *fftypes.JSONAny) error); ok { r0 = rf(ctx, nsOpID, poolLocator, approval, methods) @@ -228,6 +272,10 @@ func (_m *Plugin) TokensApproval(ctx context.Context, nsOpID string, poolLocator func (_m *Plugin) TransferTokens(ctx context.Context, nsOpID string, poolLocator string, transfer *core.TokenTransfer, methods *fftypes.JSONAny) error { ret := _m.Called(ctx, nsOpID, poolLocator, transfer, methods) + if len(ret) == 0 { + panic("no return value specified for TransferTokens") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, *core.TokenTransfer, *fftypes.JSONAny) error); ok { r0 = rf(ctx, nsOpID, poolLocator, transfer, methods) diff --git a/mocks/txcommonmocks/helper.go b/mocks/txcommonmocks/helper.go index 86037dc0d..083bf6c9b 100644 --- a/mocks/txcommonmocks/helper.go +++ b/mocks/txcommonmocks/helper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package txcommonmocks @@ -22,6 +22,10 @@ type Helper struct { func (_m *Helper) AddBlockchainTX(ctx context.Context, tx *core.Transaction, blockchainTXID string) error { ret := _m.Called(ctx, tx, blockchainTXID) + if len(ret) == 0 { + panic("no return value specified for AddBlockchainTX") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *core.Transaction, string) error); ok { r0 = rf(ctx, tx, blockchainTXID) @@ -36,6 +40,10 @@ func (_m *Helper) AddBlockchainTX(ctx context.Context, tx *core.Transaction, blo func (_m *Helper) FindOperationInTransaction(ctx context.Context, tx *fftypes.UUID, opType fftypes.FFEnum) (*core.Operation, error) { ret := _m.Called(ctx, tx, opType) + if len(ret) == 0 { + panic("no return value specified for FindOperationInTransaction") + } + var r0 *core.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, fftypes.FFEnum) (*core.Operation, error)); ok { @@ -62,6 +70,10 @@ func (_m *Helper) FindOperationInTransaction(ctx context.Context, tx *fftypes.UU func (_m *Helper) GetBlockchainEventByIDCached(ctx context.Context, id *fftypes.UUID) (*core.BlockchainEvent, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockchainEventByIDCached") + } + var r0 *core.BlockchainEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) (*core.BlockchainEvent, error)); ok { @@ -88,6 +100,10 @@ func (_m *Helper) GetBlockchainEventByIDCached(ctx context.Context, id *fftypes. func (_m *Helper) GetTransactionByIDCached(ctx context.Context, id *fftypes.UUID) (*core.Transaction, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetTransactionByIDCached") + } + var r0 *core.Transaction var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID) (*core.Transaction, error)); ok { @@ -114,6 +130,10 @@ func (_m *Helper) GetTransactionByIDCached(ctx context.Context, id *fftypes.UUID func (_m *Helper) InsertNewBlockchainEvents(ctx context.Context, events []*core.BlockchainEvent) ([]*core.BlockchainEvent, error) { ret := _m.Called(ctx, events) + if len(ret) == 0 { + panic("no return value specified for InsertNewBlockchainEvents") + } + var r0 []*core.BlockchainEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, []*core.BlockchainEvent) ([]*core.BlockchainEvent, error)); ok { @@ -140,6 +160,10 @@ func (_m *Helper) InsertNewBlockchainEvents(ctx context.Context, events []*core. func (_m *Helper) InsertOrGetBlockchainEvent(ctx context.Context, event *core.BlockchainEvent) (*core.BlockchainEvent, error) { ret := _m.Called(ctx, event) + if len(ret) == 0 { + panic("no return value specified for InsertOrGetBlockchainEvent") + } + var r0 *core.BlockchainEvent var r1 error if rf, ok := ret.Get(0).(func(context.Context, *core.BlockchainEvent) (*core.BlockchainEvent, error)); ok { @@ -166,6 +190,10 @@ func (_m *Helper) InsertOrGetBlockchainEvent(ctx context.Context, event *core.Bl func (_m *Helper) PersistTransaction(ctx context.Context, id *fftypes.UUID, txType fftypes.FFEnum, blockchainTXID string) (bool, error) { ret := _m.Called(ctx, id, txType, blockchainTXID) + if len(ret) == 0 { + panic("no return value specified for PersistTransaction") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, *fftypes.UUID, fftypes.FFEnum, string) (bool, error)); ok { @@ -190,6 +218,10 @@ func (_m *Helper) PersistTransaction(ctx context.Context, id *fftypes.UUID, txTy func (_m *Helper) SubmitNewTransaction(ctx context.Context, txType fftypes.FFEnum, idempotencyKey core.IdempotencyKey) (*fftypes.UUID, error) { ret := _m.Called(ctx, txType, idempotencyKey) + if len(ret) == 0 { + panic("no return value specified for SubmitNewTransaction") + } + var r0 *fftypes.UUID var r1 error if rf, ok := ret.Get(0).(func(context.Context, fftypes.FFEnum, core.IdempotencyKey) (*fftypes.UUID, error)); ok { @@ -216,6 +248,10 @@ func (_m *Helper) SubmitNewTransaction(ctx context.Context, txType fftypes.FFEnu func (_m *Helper) SubmitNewTransactionBatch(ctx context.Context, namespace string, batch []*txcommon.BatchedTransactionInsert) error { ret := _m.Called(ctx, namespace, batch) + if len(ret) == 0 { + panic("no return value specified for SubmitNewTransactionBatch") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, []*txcommon.BatchedTransactionInsert) error); ok { r0 = rf(ctx, namespace, batch) diff --git a/mocks/txwritermocks/writer.go b/mocks/txwritermocks/writer.go index ea8586c05..7facf76e6 100644 --- a/mocks/txwritermocks/writer.go +++ b/mocks/txwritermocks/writer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package txwritermocks @@ -37,6 +37,10 @@ func (_m *Writer) WriteTransactionAndOps(ctx context.Context, txType fftypes.FFE _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WriteTransactionAndOps") + } + var r0 *core.Transaction var r1 error if rf, ok := ret.Get(0).(func(context.Context, fftypes.FFEnum, core.IdempotencyKey, ...*core.Operation) (*core.Transaction, error)); ok { diff --git a/mocks/websocketsmocks/web_sockets_namespaced.go b/mocks/websocketsmocks/web_sockets_namespaced.go index 8d0651a98..9c1e94c04 100644 --- a/mocks/websocketsmocks/web_sockets_namespaced.go +++ b/mocks/websocketsmocks/web_sockets_namespaced.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.36.0. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package websocketsmocks diff --git a/mocks/wsmocks/ws_client.go b/mocks/wsmocks/ws_client.go index f7f440f0b..8e83c4927 100644 --- a/mocks/wsmocks/ws_client.go +++ b/mocks/wsmocks/ws_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.33.2. DO NOT EDIT. +// Code generated by mockery v2.38.0. DO NOT EDIT. package wsmocks @@ -23,6 +23,10 @@ func (_m *WSClient) Close() { func (_m *WSClient) Connect() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Connect") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -37,6 +41,10 @@ func (_m *WSClient) Connect() error { func (_m *WSClient) Receive() <-chan []byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Receive") + } + var r0 <-chan []byte if rf, ok := ret.Get(0).(func() <-chan []byte); ok { r0 = rf() @@ -53,6 +61,10 @@ func (_m *WSClient) Receive() <-chan []byte { func (_m *WSClient) ReceiveExt() <-chan *wsclient.WSPayload { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ReceiveExt") + } + var r0 <-chan *wsclient.WSPayload if rf, ok := ret.Get(0).(func() <-chan *wsclient.WSPayload); ok { r0 = rf() @@ -69,6 +81,10 @@ func (_m *WSClient) ReceiveExt() <-chan *wsclient.WSPayload { func (_m *WSClient) Send(ctx context.Context, message []byte) error { ret := _m.Called(ctx, message) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []byte) error); ok { r0 = rf(ctx, message) @@ -88,6 +104,10 @@ func (_m *WSClient) SetURL(url string) { func (_m *WSClient) URL() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for URL") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() diff --git a/pkg/blockchain/plugin.go b/pkg/blockchain/plugin.go index 5417368bd..cd576772a 100644 --- a/pkg/blockchain/plugin.go +++ b/pkg/blockchain/plugin.go @@ -78,7 +78,7 @@ type Plugin interface { SubmitNetworkAction(ctx context.Context, nsOpID, signingKey string, action core.NetworkActionType, location *fftypes.JSONAny) error // DeployContract submits a new transaction to deploy a new instance of a smart contract - DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) error + DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error) // ParseInterface processes an FFIMethod and FFIError array into a blockchain specific object, that will be // cached for this given interface, and passed back on all future invocations. @@ -88,7 +88,7 @@ type Plugin interface { ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error // InvokeContract submits a new transaction to be executed by custom on-chain logic - InvokeContract(ctx context.Context, nsOpID, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *BatchPin) error + InvokeContract(ctx context.Context, nsOpID, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *BatchPin) (submissionRejected bool, err error) // QueryContract executes a method via custom on-chain logic and returns the result QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error) From d67a3b7f14cdf12171181e764f54ea21ba972032 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 12:33:13 -0500 Subject: [PATCH 02/10] Add E2E test to verify behavior on revert Signed-off-by: Peter Broadhurst --- internal/blockchain/ethereum/ethereum.go | 2 +- test/data/contracts/reverter/reverter.json | 1 + test/data/contracts/reverter/reverter.sol | 9 ++ test/e2e/client/restclient.go | 5 ++ test/e2e/e2e.go | 14 ++++ test/e2e/gateway/ethereum_revert.go | 96 ++++++++++++++++++++++ test/e2e/gateway/ethereum_simplestorage.go | 33 +++++++- test/e2e/runners/ethereum_gateway_test.go | 1 + 8 files changed, 156 insertions(+), 5 deletions(-) create mode 100644 test/data/contracts/reverter/reverter.json create mode 100644 test/data/contracts/reverter/reverter.sol create mode 100644 test/e2e/gateway/ethereum_revert.go diff --git a/internal/blockchain/ethereum/ethereum.go b/internal/blockchain/ethereum/ethereum.go index df4190642..c2e4a7b79 100644 --- a/internal/blockchain/ethereum/ethereum.go +++ b/internal/blockchain/ethereum/ethereum.go @@ -1000,7 +1000,7 @@ func (e *Ethereum) GenerateFFI(ctx context.Context, generationRequest *fftypes.F if err != nil { return nil, i18n.WrapError(ctx, err, coremsgs.MsgFFIGenerationFailed, "unable to deserialize JSON as ABI") } - if len(*input.ABI) == 0 { + if input.ABI == nil || len(*input.ABI) == 0 { return nil, i18n.NewError(ctx, coremsgs.MsgFFIGenerationFailed, "ABI is empty") } return ffi2abi.ConvertABIToFFI(ctx, generationRequest.Namespace, generationRequest.Name, generationRequest.Version, generationRequest.Description, input.ABI) diff --git a/test/data/contracts/reverter/reverter.json b/test/data/contracts/reverter/reverter.json new file mode 100644 index 000000000..7084eb751 --- /dev/null +++ b/test/data/contracts/reverter/reverter.json @@ -0,0 +1 @@ +{"contracts":{"reverter.sol:Reverter":{"abi":[{"inputs":[],"name":"goBang","outputs":[],"stateMutability":"pure","type":"function"}],"bin":"608060405234801561001057600080fd5b5061011b806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063060846fb14602d575b600080fd5b60336035565b005b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040160659060c7565b60405180910390fd5b600082825260208201905092915050565b7f42616e6721000000000000000000000000000000000000000000000000000000600082015250565b600060b3600583606e565b915060bc82607f565b602082019050919050565b6000602082019050818103600083015260de8160a8565b905091905056fea26469706673582212204c5a121fa1ad563532a26d368380482d34f0eee629e860671f518ec7af2fc2c064736f6c63430008170033"}},"version":"0.8.23+commit.f704f362.Darwin.appleclang"} diff --git a/test/data/contracts/reverter/reverter.sol b/test/data/contracts/reverter/reverter.sol new file mode 100644 index 000000000..4628d5efb --- /dev/null +++ b/test/data/contracts/reverter/reverter.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity >=0.6.0 <0.9.0; + +contract Reverter { + function goBang() pure public { + revert("Bang!"); + } +} \ No newline at end of file diff --git a/test/e2e/client/restclient.go b/test/e2e/client/restclient.go index ac9499e54..abd5c368a 100644 --- a/test/e2e/client/restclient.go +++ b/test/e2e/client/restclient.go @@ -824,15 +824,20 @@ func (client *FireFlyClient) DeleteContractListener(t *testing.T, id *fftypes.UU func (client *FireFlyClient) InvokeContractMethod(t *testing.T, req *core.ContractCallRequest, expectedStatus ...int) (interface{}, error) { var res interface{} path := client.namespaced(urlContractInvoke) + var errResult fftypes.RESTError resp, err := client.Client.R(). SetBody(req). SetResult(&res). + SetError(&errResult). Post(path) require.NoError(t, err) if len(expectedStatus) == 0 { expectedStatus = []int{202} } require.Equal(t, expectedStatus[0], resp.StatusCode(), "POST %s [%d]: %s", path, resp.StatusCode(), resp.String()) + if err == nil && errResult.Error != "" { + return res, fmt.Errorf(errResult.Error) + } return res, err } diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index 04c45221d..c96928aef 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -256,3 +256,17 @@ func VerifyAllOperationsSucceeded(t *testing.T, clients []*client.FireFlyClient, assert.Fail(t, pending) } + +func VerifyOperationsAlreadyMarkedFailed(t *testing.T, clients []*client.FireFlyClient, startTime time.Time) { + // Note we do NOT wait in this function - use this function when failure should already have been recorded, + // and the work has been done in FF Core to ensure that is reflected in the operation cache. + pending := "" + for _, client := range clients { + for _, op := range client.GetOperations(t, startTime) { + if op.Status != core.OpStatusFailed { + pending += fmt.Sprintf("Operation '%s' (%s) on '%s' status=%s\n", op.ID, op.Type, client.Client.BaseURL, op.Status) + } + } + } + assert.Empty(t, pending, pending) +} diff --git a/test/e2e/gateway/ethereum_revert.go b/test/e2e/gateway/ethereum_revert.go new file mode 100644 index 000000000..199cb1d28 --- /dev/null +++ b/test/e2e/gateway/ethereum_revert.go @@ -0,0 +1,96 @@ +// Copyright © 2023 Kaleido, Inc. +// +// SPDX-License-Identifier: Apache-2.0 +// +// 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 gateway + +import ( + "encoding/json" + "fmt" + + "github.com/go-resty/resty/v2" + "github.com/hyperledger/firefly-common/pkg/fftypes" + "github.com/hyperledger/firefly/pkg/core" + "github.com/hyperledger/firefly/test/e2e" + "github.com/hyperledger/firefly/test/e2e/client" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +type EthereumRevertTestSuite struct { + suite.Suite + testState *testState + contractAddress string + ethClient *resty.Client + ethIdentity string + abi *fftypes.JSONAny +} + +func (suite *EthereumRevertTestSuite) SetupSuite() { + suite.testState = beforeE2ETest(suite.T()) + stack := e2e.ReadStack(suite.T()) + stackState := e2e.ReadStackState(suite.T()) + suite.ethClient = client.NewResty(suite.T()) + suite.ethClient.SetBaseURL(fmt.Sprintf("http://localhost:%d", stack.Members[0].ExposedConnectorPort)) + account := stackState.Accounts[0].(map[string]interface{}) + suite.ethIdentity = account["address"].(string) + suite.abi, suite.contractAddress = deployTestContractFromCompiledJSON(suite.T(), stack.Name, "reverter/reverter.json") +} + +func (suite *EthereumRevertTestSuite) BeforeTest(suiteName, testName string) { + suite.testState = beforeE2ETest(suite.T()) +} + +func (suite *EthereumRevertTestSuite) AfterTest(suiteName, testName string) { + // Important part of the test - the status of the operation must go to Failed - immediately. + // We should not encounter an "Initialized" status + e2e.VerifyOperationsAlreadyMarkedFailed(suite.T(), []*client.FireFlyClient{suite.testState.client1}, suite.testState.startTime) +} + +func (suite *EthereumRevertTestSuite) TestRevertTransitionsToFailed() { + defer suite.testState.Done() + + type generateInput struct { + ABI *fftypes.JSONAny `json:"abi"` + } + inputBytes, err := json.Marshal(&generateInput{ABI: suite.abi}) + assert.NoError(suite.T(), err) + + ffi := suite.testState.client1.GenerateFFIFromABI(suite.T(), &fftypes.FFIGenerationRequest{ + Input: fftypes.JSONAnyPtrBytes(inputBytes), + }) + assert.NoError(suite.T(), err) + var goBang *fftypes.FFIMethod + for _, m := range ffi.Methods { + if m.Name == "goBang" { + goBang = m + } + } + assert.NotNil(suite.T(), goBang) + + location := map[string]interface{}{ + "address": suite.contractAddress, + } + locationBytes, _ := json.Marshal(location) + invokeContractRequest := &core.ContractCallRequest{ + Location: fftypes.JSONAnyPtrBytes(locationBytes), + Method: goBang, + Input: map[string]interface{}{}, + } + + // Check we get the revert error all the way back through the API on the invoke, due to the gas estimation + _, err = suite.testState.client1.InvokeContractMethod(suite.T(), invokeContractRequest, 500) + assert.Regexp(suite.T(), "FF10111.*Bang!", err) +} diff --git a/test/e2e/gateway/ethereum_simplestorage.go b/test/e2e/gateway/ethereum_simplestorage.go index e1d277e1e..f691f4aba 100644 --- a/test/e2e/gateway/ethereum_simplestorage.go +++ b/test/e2e/gateway/ethereum_simplestorage.go @@ -19,6 +19,7 @@ package gateway import ( "encoding/json" "fmt" + "os" "os/exec" "testing" @@ -93,16 +94,40 @@ func simpleStorageFFIGet() *fftypes.FFIMethod { } } -func deploySimpleStorageContract(t *testing.T, stackName, contract string) string { +func deployTestContractFromCompiledJSON(t *testing.T, stackName, contract string) (*fftypes.JSONAny, string) { path := "../../data/contracts/" + contract out, err := exec.Command("ff", "deploy", "ethereum", stackName, path).Output() - require.NoError(t, err) + var stderr []byte + if err != nil { + stderr = err.(*exec.ExitError).Stderr + } + require.NoError(t, err, fmt.Sprintf("ff deploy failed: %s", stderr)) var output map[string]interface{} err = json.Unmarshal(out, &output) require.NoError(t, err) address := output["address"].(string) t.Logf("Contract address: %s", address) - return address + + type solcJSON struct { + Contracts map[string]struct { + ABI *fftypes.JSONAny `json:"abi"` + } `json:"contracts"` + } + b, err := os.ReadFile(path) + assert.NoError(t, err) + var contractJSON solcJSON + err = json.Unmarshal(b, &contractJSON) + assert.NoError(t, err) + + var abiBytes *fftypes.JSONAny + for _, contract := range contractJSON.Contracts { + abiBytes = contract.ABI + if abiBytes != nil { + break + } + } + assert.NotNil(t, abiBytes) + return abiBytes, address } type EthereumSimpleStorageTestSuite struct { @@ -122,7 +147,7 @@ func (suite *EthereumSimpleStorageTestSuite) SetupSuite() { suite.ethClient.SetBaseURL(fmt.Sprintf("http://localhost:%d", stack.Members[0].ExposedConnectorPort)) account := stackState.Accounts[0].(map[string]interface{}) suite.ethIdentity = account["address"].(string) - suite.contractAddress = deploySimpleStorageContract(suite.T(), stack.Name, "simplestorage/simple_storage.json") + _, suite.contractAddress = deployTestContractFromCompiledJSON(suite.T(), stack.Name, "simplestorage/simple_storage.json") res, err := suite.testState.client1.CreateFFI(suite.T(), simpleStorageFFI(), false) suite.interfaceID = res.ID diff --git a/test/e2e/runners/ethereum_gateway_test.go b/test/e2e/runners/ethereum_gateway_test.go index dc26864f2..9ee203ead 100644 --- a/test/e2e/runners/ethereum_gateway_test.go +++ b/test/e2e/runners/ethereum_gateway_test.go @@ -27,5 +27,6 @@ func TestEthereumGatewayE2ESuite(t *testing.T) { suite.Run(t, new(gateway.TokensTestSuite)) suite.Run(t, new(gateway.EthereumCouponTestSuite)) suite.Run(t, new(gateway.EthereumSimpleStorageTestSuite)) + suite.Run(t, new(gateway.EthereumRevertTestSuite)) suite.Run(t, new(gateway.TokensOnlyTestSuite)) } From 8092ea8af9ab8813f93f8cdafd5fab8f2957af7a Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 12:43:23 -0500 Subject: [PATCH 03/10] Lint Signed-off-by: Peter Broadhurst --- .golangci.yml | 1 + internal/coremsgs/en_config_descriptions.go | 77 +++++++++++---------- 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 4d4f59635..e5221806b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,6 +3,7 @@ run: skip-dirs: - "mocks" - "ffconfig" + - "test/e2e" linters-settings: golint: {} gocritic: diff --git a/internal/coremsgs/en_config_descriptions.go b/internal/coremsgs/en_config_descriptions.go index e03e89ac0..a148b5b2b 100644 --- a/internal/coremsgs/en_config_descriptions.go +++ b/internal/coremsgs/en_config_descriptions.go @@ -25,6 +25,9 @@ var ffc = func(key, translation, fieldType string) i18n.ConfigMessageKey { return i18n.FFC(language.AmericanEnglish, key, translation, fieldType) } +var urlStringType = "URL " + i18n.StringType +var addressStringType = "Address " + i18n.StringType + //revive:disable var ( ConfigGlobalMigrationsAuto = ffc("config.global.migrations.auto", "Enables automatic database migrations", i18n.BooleanType) @@ -41,7 +44,7 @@ var ( ConfigSPIAddress = ffc("config.spi.address", "The IP address on which the admin HTTP API should listen", "IP Address "+i18n.StringType) ConfigSPIEnabled = ffc("config.spi.enabled", "Enables the admin HTTP API", i18n.BooleanType) ConfigSPIPort = ffc("config.spi.port", "The port on which the admin HTTP API should listen", i18n.IntType) - ConfigSPIPublicURL = ffc("config.spi.publicURL", "The fully qualified public URL for the admin API. This is used for building URLs in HTTP responses and in OpenAPI Spec generation", "URL "+i18n.StringType) + ConfigSPIPublicURL = ffc("config.spi.publicURL", "The fully qualified public URL for the admin API. This is used for building URLs in HTTP responses and in OpenAPI Spec generation", urlStringType) ConfigSPIReadTimeout = ffc("config.spi.readTimeout", "The maximum time to wait when reading from an HTTP connection", i18n.TimeDurationType) ConfigSPIWriteTimeout = ffc("config.spi.writeTimeout", "The maximum time to wait when writing to an HTTP connection", i18n.TimeDurationType) @@ -75,17 +78,17 @@ var ( ConfigBlockchainEthereumAddressResolverRetainOriginal = ffc("config.blockchain.ethereum.addressResolver.retainOriginal", "When true the original pre-resolved string is retained after the lookup, and passed down to Ethconnect as the from address", i18n.BooleanType) ConfigBlockchainEthereumAddressResolverURL = ffc("config.blockchain.ethereum.addressResolver.url", "The URL of the Address Resolver", i18n.StringType) ConfigBlockchainEthereumAddressResolverURLTemplate = ffc("config.blockchain.ethereum.addressResolver.urlTemplate", "The URL Go template string to use when calling the Address Resolver. The template input contains '.Key' and '.Intent' string variables", i18n.GoTemplateType) - ConfigBlockchainEthereumAddressResolverProxyURL = ffc("config.blockchain.ethereum.addressResolver.proxy.url", "Optional HTTP proxy server to use when connecting to the Address Resolver", "URL "+i18n.StringType) + ConfigBlockchainEthereumAddressResolverProxyURL = ffc("config.blockchain.ethereum.addressResolver.proxy.url", "Optional HTTP proxy server to use when connecting to the Address Resolver", urlStringType) ConfigBlockchainEthereumEthconnectBatchSize = ffc("config.blockchain.ethereum.ethconnect.batchSize", "The number of events Ethconnect should batch together for delivery to FireFly core. Only applies when automatically creating a new event stream", i18n.IntType) ConfigBlockchainEthereumEthconnectBatchTimeout = ffc("config.blockchain.ethereum.ethconnect.batchTimeout", "How long Ethconnect should wait for new events to arrive and fill a batch, before sending the batch to FireFly core. Only applies when automatically creating a new event stream", i18n.TimeDurationType) - ConfigBlockchainEthereumEthconnectInstance = ffc("config.blockchain.ethereum.ethconnect.instance", "The Ethereum address of the FireFly BatchPin smart contract that has been deployed to the blockchain (deprecated - use namespaces.predefined[].multiparty.contract[].location.address)", "Address "+i18n.StringType) - ConfigBlockchainEthereumEthconnectFromBlock = ffc("config.blockchain.ethereum.ethconnect.fromBlock", "The first event this FireFly instance should listen to from the BatchPin smart contract. Default=0. Only affects initial creation of the event stream (deprecated - use namespaces.predefined[].multiparty.contract[].location.firstEvent)", "Address "+i18n.StringType) + ConfigBlockchainEthereumEthconnectInstance = ffc("config.blockchain.ethereum.ethconnect.instance", "The Ethereum address of the FireFly BatchPin smart contract that has been deployed to the blockchain (deprecated - use namespaces.predefined[].multiparty.contract[].location.address)", addressStringType) + ConfigBlockchainEthereumEthconnectFromBlock = ffc("config.blockchain.ethereum.ethconnect.fromBlock", "The first event this FireFly instance should listen to from the BatchPin smart contract. Default=0. Only affects initial creation of the event stream (deprecated - use namespaces.predefined[].multiparty.contract[].location.firstEvent)", addressStringType) ConfigBlockchainEthereumEthconnectPrefixLong = ffc("config.blockchain.ethereum.ethconnect.prefixLong", "The prefix that will be used for Ethconnect specific HTTP headers when FireFly makes requests to Ethconnect", i18n.StringType) ConfigBlockchainEthereumEthconnectPrefixShort = ffc("config.blockchain.ethereum.ethconnect.prefixShort", "The prefix that will be used for Ethconnect specific query parameters when FireFly makes requests to Ethconnect", i18n.StringType) ConfigBlockchainEthereumEthconnectTopic = ffc("config.blockchain.ethereum.ethconnect.topic", "The websocket listen topic that the node should register on, which is important if there are multiple nodes using a single ethconnect", i18n.StringType) - ConfigBlockchainEthereumEthconnectURL = ffc("config.blockchain.ethereum.ethconnect.url", "The URL of the Ethconnect instance", "URL "+i18n.StringType) - ConfigBlockchainEthereumEthconnectProxyURL = ffc("config.blockchain.ethereum.ethconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Ethconnect", "URL "+i18n.StringType) + ConfigBlockchainEthereumEthconnectURL = ffc("config.blockchain.ethereum.ethconnect.url", "The URL of the Ethconnect instance", urlStringType) + ConfigBlockchainEthereumEthconnectProxyURL = ffc("config.blockchain.ethereum.ethconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Ethconnect", urlStringType) ConfigBlockchainEthereumFFTMURL = ffc("config.blockchain.ethereum.fftm.url", "The URL of the FireFly Transaction Manager runtime, if enabled", i18n.StringType) ConfigBlockchainEthereumFFTMProxyURL = ffc("config.blockchain.ethereum.fftm.proxy.url", "Optional HTTP proxy server to use when connecting to the Transaction Manager", i18n.StringType) @@ -98,8 +101,8 @@ var ( ConfigBlockchainFabricFabconnectPrefixShort = ffc("config.blockchain.fabric.fabconnect.prefixShort", "The prefix that will be used for Fabconnect specific query parameters when FireFly makes requests to Fabconnect", i18n.StringType) ConfigBlockchainFabricFabconnectSigner = ffc("config.blockchain.fabric.fabconnect.signer", "The Fabric signing key to use when submitting transactions to Fabconnect", i18n.StringType) ConfigBlockchainFabricFabconnectTopic = ffc("config.blockchain.fabric.fabconnect.topic", "The websocket listen topic that the node should register on, which is important if there are multiple nodes using a single Fabconnect", i18n.StringType) - ConfigBlockchainFabricFabconnectURL = ffc("config.blockchain.fabric.fabconnect.url", "The URL of the Fabconnect instance", "URL "+i18n.StringType) - ConfigBlockchainFabricFabconnectProxyURL = ffc("config.blockchain.fabric.fabconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Fabconnect", "URL "+i18n.StringType) + ConfigBlockchainFabricFabconnectURL = ffc("config.blockchain.fabric.fabconnect.url", "The URL of the Fabconnect instance", urlStringType) + ConfigBlockchainFabricFabconnectProxyURL = ffc("config.blockchain.fabric.fabconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Fabconnect", urlStringType) ConfigCacheEnabled = ffc("config.cache.enabled", "Enables caching, defaults to true", i18n.BooleanType) @@ -166,7 +169,7 @@ var ( ConfigPluginBlockchainEthereumAddressResolverURL = ffc("config.plugins.blockchain[].ethereum.addressResolver.url", "The URL of the Address Resolver", i18n.StringType) ConfigPluginBlockchainEthereumAddressResolverURLTemplate = ffc("config.plugins.blockchain[].ethereum.addressResolver.urlTemplate", "The URL Go template string to use when calling the Address Resolver. The template input contains '.Key' and '.Intent' string variables.", i18n.GoTemplateType) - ConfigPluginBlockchainEthereumAddressResolverProxyURL = ffc("config.plugins.blockchain[].ethereum.addressResolver.proxy.url", "Optional HTTP proxy server to use when connecting to the Address Resolver", "URL "+i18n.StringType) + ConfigPluginBlockchainEthereumAddressResolverProxyURL = ffc("config.plugins.blockchain[].ethereum.addressResolver.proxy.url", "Optional HTTP proxy server to use when connecting to the Address Resolver", urlStringType) ConfigPluginBlockchainEthereumEthconnectBackgroundStart = ffc("config.plugins.blockchain[].ethereum.ethconnect.backgroundStart.enabled", "Start the Ethconnect plugin in the background and enter retry loop if failed to start", i18n.BooleanType) ConfigPluginBlockchainEthereumEthconnectBackgroundStartInitialDelay = ffc("config.plugins.blockchain[].ethereum.ethconnect.backgroundStart.initialDelay", "Delay between restarts in the case where we retry to restart the ethereum plugin", i18n.TimeDurationType) @@ -174,13 +177,13 @@ var ( ConfigPluginBlockchainEthereumEthconnectBackgroundStartFactor = ffc("config.plugins.blockchain[].ethereum.ethconnect.backgroundStart.factor", "Set the factor by which the delay increases when retrying", i18n.FloatType) ConfigPluginBlockchainEthereumEthconnectBatchSize = ffc("config.plugins.blockchain[].ethereum.ethconnect.batchSize", "The number of events Ethconnect should batch together for delivery to FireFly core. Only applies when automatically creating a new event stream", i18n.IntType) ConfigPluginBlockchainEthereumEthconnectBatchTimeout = ffc("config.plugins.blockchain[].ethereum.ethconnect.batchTimeout", "How long Ethconnect should wait for new events to arrive and fill a batch, before sending the batch to FireFly core. Only applies when automatically creating a new event stream", i18n.TimeDurationType) - ConfigPluginBlockchainEthereumEthconnectInstance = ffc("config.plugins.blockchain[].ethereum.ethconnect.instance", "The Ethereum address of the FireFly BatchPin smart contract that has been deployed to the blockchain", "Address "+i18n.StringType) - ConfigPluginBlockchainEthereumEthconnectFromBlock = ffc("config.plugins.blockchain[].ethereum.ethconnect.fromBlock", "The first event this FireFly instance should listen to from the BatchPin smart contract. Default=0. Only affects initial creation of the event stream", "Address "+i18n.StringType) + ConfigPluginBlockchainEthereumEthconnectInstance = ffc("config.plugins.blockchain[].ethereum.ethconnect.instance", "The Ethereum address of the FireFly BatchPin smart contract that has been deployed to the blockchain", addressStringType) + ConfigPluginBlockchainEthereumEthconnectFromBlock = ffc("config.plugins.blockchain[].ethereum.ethconnect.fromBlock", "The first event this FireFly instance should listen to from the BatchPin smart contract. Default=0. Only affects initial creation of the event stream", addressStringType) ConfigPluginBlockchainEthereumEthconnectPrefixLong = ffc("config.plugins.blockchain[].ethereum.ethconnect.prefixLong", "The prefix that will be used for Ethconnect specific HTTP headers when FireFly makes requests to Ethconnect", i18n.StringType) ConfigPluginBlockchainEthereumEthconnectPrefixShort = ffc("config.plugins.blockchain[].ethereum.ethconnect.prefixShort", "The prefix that will be used for Ethconnect specific query parameters when FireFly makes requests to Ethconnect", i18n.StringType) ConfigPluginBlockchainEthereumEthconnectTopic = ffc("config.plugins.blockchain[].ethereum.ethconnect.topic", "The websocket listen topic that the node should register on, which is important if there are multiple nodes using a single ethconnect", i18n.StringType) - ConfigPluginBlockchainEthereumEthconnectURL = ffc("config.plugins.blockchain[].ethereum.ethconnect.url", "The URL of the Ethconnect instance", "URL "+i18n.StringType) - ConfigPluginBlockchainEthereumEthconnectProxyURL = ffc("config.plugins.blockchain[].ethereum.ethconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Ethconnect", "URL "+i18n.StringType) + ConfigPluginBlockchainEthereumEthconnectURL = ffc("config.plugins.blockchain[].ethereum.ethconnect.url", "The URL of the Ethconnect instance", urlStringType) + ConfigPluginBlockchainEthereumEthconnectProxyURL = ffc("config.plugins.blockchain[].ethereum.ethconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Ethconnect", urlStringType) ConfigPluginBlockchainEthereumFFTMURL = ffc("config.plugins.blockchain[].ethereum.fftm.url", "The URL of the FireFly Transaction Manager runtime, if enabled", i18n.StringType) ConfigPluginBlockchainEthereumFFTMProxyURL = ffc("config.plugins.blockchain[].ethereum.fftm.proxy.url", "Optional HTTP proxy server to use when connecting to the Transaction Manager", i18n.StringType) @@ -198,13 +201,13 @@ var ( ConfigPluginBlockchainTezosTezosconnectBackgroundStartFactor = ffc("config.plugins.blockchain[].tezos.tezosconnect.backgroundStart.factor", "Set the factor by which the delay increases when retrying", i18n.FloatType) ConfigPluginBlockchainTezosTezosconnectBatchSize = ffc("config.plugins.blockchain[].tezos.tezosconnect.batchSize", "The number of events Tezosconnect should batch together for delivery to FireFly core. Only applies when automatically creating a new event stream", i18n.IntType) ConfigPluginBlockchainTezosTezosconnectBatchTimeout = ffc("config.plugins.blockchain[].tezos.tezosconnect.batchTimeout", "How long Tezosconnect should wait for new events to arrive and fill a batch, before sending the batch to FireFly core. Only applies when automatically creating a new event stream", i18n.TimeDurationType) - ConfigPluginBlockchainTezosTezosconnectInstance = ffc("config.plugins.blockchain[].tezos.tezosconnect.instance", "The Tezosconnect address of the FireFly BatchPin smart contract that has been deployed to the blockchain", "Address "+i18n.StringType) - ConfigPluginBlockchainTezosTezosconnectFromBlock = ffc("config.plugins.blockchain[].tezos.tezosconnect.fromBlock", "The first event this FireFly instance should listen to from the BatchPin smart contract. Default=0. Only affects initial creation of the event stream", "Address "+i18n.StringType) + ConfigPluginBlockchainTezosTezosconnectInstance = ffc("config.plugins.blockchain[].tezos.tezosconnect.instance", "The Tezosconnect address of the FireFly BatchPin smart contract that has been deployed to the blockchain", addressStringType) + ConfigPluginBlockchainTezosTezosconnectFromBlock = ffc("config.plugins.blockchain[].tezos.tezosconnect.fromBlock", "The first event this FireFly instance should listen to from the BatchPin smart contract. Default=0. Only affects initial creation of the event stream", addressStringType) ConfigPluginBlockchainTezosTezosconnectPrefixLong = ffc("config.plugins.blockchain[].tezos.tezosconnect.prefixLong", "The prefix that will be used for Tezosconnect specific HTTP headers when FireFly makes requests to Tezosconnect", i18n.StringType) ConfigPluginBlockchainTezosTezosconnectPrefixShort = ffc("config.plugins.blockchain[].tezos.tezosconnect.prefixShort", "The prefix that will be used for Tezosconnect specific query parameters when FireFly makes requests to Tezosconnect", i18n.StringType) ConfigPluginBlockchainTezosTezosconnectTopic = ffc("config.plugins.blockchain[].tezos.tezosconnect.topic", "The websocket listen topic that the node should register on, which is important if there are multiple nodes using a single tezosconnect", i18n.StringType) - ConfigPluginBlockchainTezosTezosconnectURL = ffc("config.plugins.blockchain[].tezos.tezosconnect.url", "The URL of the Tezosconnect instance", "URL "+i18n.StringType) - ConfigPluginBlockchainTezosTezosconnectProxyURL = ffc("config.plugins.blockchain[].tezos.tezosconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Tezosconnect", "URL "+i18n.StringType) + ConfigPluginBlockchainTezosTezosconnectURL = ffc("config.plugins.blockchain[].tezos.tezosconnect.url", "The URL of the Tezosconnect instance", urlStringType) + ConfigPluginBlockchainTezosTezosconnectProxyURL = ffc("config.plugins.blockchain[].tezos.tezosconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Tezosconnect", urlStringType) ConfigPluginBlockchainFabricFabconnectBackgroundStart = ffc("config.plugins.blockchain[].fabric.fabconnect.backgroundStart.enabled", "Start the fabric plugin in the background and enter retry loop if failed to start", i18n.BooleanType) ConfigPluginBlockchainFabricFabconnectBackgroundStartInitialDelay = ffc("config.plugins.blockchain[].fabric.fabconnect.backgroundStart.initialDelay", "Delay between restarts in the case where we retry to restart the fabric plugin", i18n.TimeDurationType) @@ -216,8 +219,8 @@ var ( ConfigPluginBlockchainFabricFabconnectPrefixShort = ffc("config.plugins.blockchain[].fabric.fabconnect.prefixShort", "The prefix that will be used for Fabconnect specific query parameters when FireFly makes requests to Fabconnect", i18n.StringType) ConfigPluginBlockchainFabricFabconnectSigner = ffc("config.plugins.blockchain[].fabric.fabconnect.signer", "The Fabric signing key to use when submitting transactions to Fabconnect", i18n.StringType) ConfigPluginBlockchainFabricFabconnectTopic = ffc("config.plugins.blockchain[].fabric.fabconnect.topic", "The websocket listen topic that the node should register on, which is important if there are multiple nodes using a single Fabconnect", i18n.StringType) - ConfigPluginBlockchainFabricFabconnectURL = ffc("config.plugins.blockchain[].fabric.fabconnect.url", "The URL of the Fabconnect instance", "URL "+i18n.StringType) - ConfigPluginBlockchainFabricFabconnectProxyURL = ffc("config.plugins.blockchain[].fabric.fabconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Fabconnect", "URL "+i18n.StringType) + ConfigPluginBlockchainFabricFabconnectURL = ffc("config.plugins.blockchain[].fabric.fabconnect.url", "The URL of the Fabconnect instance", urlStringType) + ConfigPluginBlockchainFabricFabconnectProxyURL = ffc("config.plugins.blockchain[].fabric.fabconnect.proxy.url", "Optional HTTP proxy server to use when connecting to Fabconnect", urlStringType) ConfigPluginBlockchainFabricFabconnectChaincode = ffc("config.plugins.blockchain[].fabric.fabconnect.chaincode", "The name of the Fabric chaincode that FireFly will use for BatchPin transactions (deprecated - use fireflyContract[].chaincode)", i18n.StringType) ConfigPluginBlockchainFabricFabconnectChannel = ffc("config.plugins.blockchain[].fabric.fabconnect.channel", "The Fabric channel that FireFly will use for BatchPin transactions", i18n.StringType) @@ -244,9 +247,9 @@ var ( ConfigDataexchangeFfdxInitEnabled = ffc("config.dataexchange.ffdx.initEnabled", "Instructs FireFly to always post all current nodes to the `/init` API before connecting or reconnecting to the connector", i18n.BooleanType) ConfigDataexchangeFfdxManifestEnabled = ffc("config.dataexchange.ffdx.manifestEnabled", "Determines whether to require+validate a manifest from other DX instances in the network. Must be supported by the connector", i18n.StringType) - ConfigDataexchangeFfdxURL = ffc("config.dataexchange.ffdx.url", "The URL of the Data Exchange instance", "URL "+i18n.StringType) + ConfigDataexchangeFfdxURL = ffc("config.dataexchange.ffdx.url", "The URL of the Data Exchange instance", urlStringType) - ConfigDataexchangeFfdxProxyURL = ffc("config.dataexchange.ffdx.proxy.url", "Optional HTTP proxy server to use when connecting to the Data Exchange", "URL "+i18n.StringType) + ConfigDataexchangeFfdxProxyURL = ffc("config.dataexchange.ffdx.proxy.url", "Optional HTTP proxy server to use when connecting to the Data Exchange", urlStringType) ConfigPluginDataexchange = ffc("config.plugins.dataexchange", "The array of configured Data Exchange plugins ", i18n.StringType) ConfigPluginDataexchangeType = ffc("config.plugins.dataexchange[].type", "The Data Exchange plugin to use", i18n.StringType) @@ -254,13 +257,13 @@ var ( ConfigPluginDataexchangeFfdxInitEnabled = ffc("config.plugins.dataexchange[].ffdx.initEnabled", "Instructs FireFly to always post all current nodes to the `/init` API before connecting or reconnecting to the connector", i18n.BooleanType) ConfigPluginDataexchangeFfdxManifestEnabled = ffc("config.plugins.dataexchange[].ffdx.manifestEnabled", "Determines whether to require+validate a manifest from other DX instances in the network. Must be supported by the connector", i18n.StringType) - ConfigPluginDataexchangeFfdxURL = ffc("config.plugins.dataexchange[].ffdx.url", "The URL of the Data Exchange instance", "URL "+i18n.StringType) + ConfigPluginDataexchangeFfdxURL = ffc("config.plugins.dataexchange[].ffdx.url", "The URL of the Data Exchange instance", urlStringType) ConfigPluginDataexchangeFfdxBackgroundStart = ffc("config.plugins.dataexchange[].ffdx.backgroundStart.enabled", "Start the data exchange plugin in the background and enter retry loop if failed to start", i18n.BooleanType) ConfigPluginDataexchangeFfdxBackgroundStartInitialDelay = ffc("config.plugins.dataexchange[].ffdx.backgroundStart.initialDelay", "Delay between restarts in the case where we retry to restart the data exchange plugin", i18n.TimeDurationType) ConfigPluginDataexchangeFfdxBackgroundStartMaxDelay = ffc("config.plugins.dataexchange[].ffdx.backgroundStart.maxDelay", "Max delay between restarts in the case where we retry to restart the data exchange plugin", i18n.TimeDurationType) ConfigPluginDataexchangeFfdxBackgroundStartFactor = ffc("config.plugins.dataexchange[].ffdx.backgroundStart.factor", "Set the factor by which the delay increases when retrying", i18n.FloatType) - ConfigPluginDataexchangeFfdxProxyURL = ffc("config.plugins.dataexchange[].ffdx.proxy.url", "Optional HTTP proxy server to use when connecting to the Data Exchange", "URL "+i18n.StringType) + ConfigPluginDataexchangeFfdxProxyURL = ffc("config.plugins.dataexchange[].ffdx.proxy.url", "Optional HTTP proxy server to use when connecting to the Data Exchange", urlStringType) ConfigDebugPort = ffc("config.debug.port", "An HTTP port on which to enable the go debugger", i18n.IntType) ConfigDebugAddress = ffc("config.debug.address", "The HTTP interface the go debugger binds to", i18n.StringType) @@ -288,7 +291,7 @@ var ( ConfigHTTPAddress = ffc("config.http.address", "The IP address on which the HTTP API should listen", "IP Address "+i18n.StringType) ConfigHTTPPort = ffc("config.http.port", "The port on which the HTTP API should listen", i18n.IntType) - ConfigHTTPPublicURL = ffc("config.http.publicURL", "The fully qualified public URL for the API. This is used for building URLs in HTTP responses and in OpenAPI Spec generation", "URL "+i18n.StringType) + ConfigHTTPPublicURL = ffc("config.http.publicURL", "The fully qualified public URL for the API. This is used for building URLs in HTTP responses and in OpenAPI Spec generation", urlStringType) ConfigHTTPReadTimeout = ffc("config.http.readTimeout", "The maximum time to wait when reading from an HTTP connection", i18n.TimeDurationType) ConfigHTTPWriteTimeout = ffc("config.http.writeTimeout", "The maximum time to wait when writing to an HTTP connection", i18n.TimeDurationType) @@ -321,7 +324,7 @@ var ( ConfigMetricsEnabled = ffc("config.metrics.enabled", "Enables the metrics API", i18n.BooleanType) ConfigMetricsPath = ffc("config.metrics.path", "The path from which to serve the Prometheus metrics", i18n.StringType) ConfigMetricsPort = ffc("config.metrics.port", "The port on which the metrics HTTP API should listen", i18n.IntType) - ConfigMetricsPublicURL = ffc("config.metrics.publicURL", "The fully qualified public URL for the metrics API. This is used for building URLs in HTTP responses and in OpenAPI Spec generation", "URL "+i18n.StringType) + ConfigMetricsPublicURL = ffc("config.metrics.publicURL", "The fully qualified public URL for the metrics API. This is used for building URLs in HTTP responses and in OpenAPI Spec generation", urlStringType) ConfigMetricsReadTimeout = ffc("config.metrics.readTimeout", "The maximum time to wait when reading from an HTTP connection", i18n.TimeDurationType) ConfigMetricsWriteTimeout = ffc("config.metrics.writeTimeout", "The maximum time to wait when writing to an HTTP connection", i18n.TimeDurationType) @@ -367,33 +370,33 @@ var ( ConfigPrivatemessagingBatchTimeout = ffc("config.privatemessaging.batch.timeout", "The timeout to wait for a batch to fill, before sending", i18n.TimeDurationType) ConfigSharedstorageType = ffc("config.sharedstorage.type", "The Shared Storage plugin to use", i18n.StringType) - ConfigSharedstorageIpfsAPIURL = ffc("config.sharedstorage.ipfs.api.url", "The URL for the IPFS API", "URL "+i18n.StringType) - ConfigSharedstorageIpfsAPIProxyURL = ffc("config.sharedstorage.ipfs.api.proxy.url", "Optional HTTP proxy server to use when connecting to the IPFS API", "URL "+i18n.StringType) - ConfigSharedstorageIpfsGatewayURL = ffc("config.sharedstorage.ipfs.gateway.url", "The URL for the IPFS Gateway", "URL "+i18n.StringType) - ConfigSharedstorageIpfsGatewayProxyURL = ffc("config.sharedstorage.ipfs.gateway.proxy.url", "Optional HTTP proxy server to use when connecting to the IPFS Gateway", "URL "+i18n.StringType) + ConfigSharedstorageIpfsAPIURL = ffc("config.sharedstorage.ipfs.api.url", "The URL for the IPFS API", urlStringType) + ConfigSharedstorageIpfsAPIProxyURL = ffc("config.sharedstorage.ipfs.api.proxy.url", "Optional HTTP proxy server to use when connecting to the IPFS API", urlStringType) + ConfigSharedstorageIpfsGatewayURL = ffc("config.sharedstorage.ipfs.gateway.url", "The URL for the IPFS Gateway", urlStringType) + ConfigSharedstorageIpfsGatewayProxyURL = ffc("config.sharedstorage.ipfs.gateway.proxy.url", "Optional HTTP proxy server to use when connecting to the IPFS Gateway", urlStringType) ConfigPluginSharedstorage = ffc("config.plugins.sharedstorage", "The list of configured Shared Storage plugins", i18n.StringType) ConfigPluginSharedstorageName = ffc("config.plugins.sharedstorage[].name", "The name of the Shared Storage plugin to use", i18n.StringType) ConfigPluginSharedstorageType = ffc("config.plugins.sharedstorage[].type", "The Shared Storage plugin to use", i18n.StringType) - ConfigPluginSharedstorageIpfsAPIURL = ffc("config.plugins.sharedstorage[].ipfs.api.url", "The URL for the IPFS API", "URL "+i18n.StringType) - ConfigPluginSharedstorageIpfsAPIProxyURL = ffc("config.plugins.sharedstorage[].ipfs.api.proxy.url", "Optional HTTP proxy server to use when connecting to the IPFS API", "URL "+i18n.StringType) - ConfigPluginSharedstorageIpfsGatewayURL = ffc("config.plugins.sharedstorage[].ipfs.gateway.url", "The URL for the IPFS Gateway", "URL "+i18n.StringType) - ConfigPluginSharedstorageIpfsGatewayProxyURL = ffc("config.plugins.sharedstorage[].ipfs.gateway.proxy.url", "Optional HTTP proxy server to use when connecting to the IPFS Gateway", "URL "+i18n.StringType) + ConfigPluginSharedstorageIpfsAPIURL = ffc("config.plugins.sharedstorage[].ipfs.api.url", "The URL for the IPFS API", urlStringType) + ConfigPluginSharedstorageIpfsAPIProxyURL = ffc("config.plugins.sharedstorage[].ipfs.api.proxy.url", "Optional HTTP proxy server to use when connecting to the IPFS API", urlStringType) + ConfigPluginSharedstorageIpfsGatewayURL = ffc("config.plugins.sharedstorage[].ipfs.gateway.url", "The URL for the IPFS Gateway", urlStringType) + ConfigPluginSharedstorageIpfsGatewayProxyURL = ffc("config.plugins.sharedstorage[].ipfs.gateway.proxy.url", "Optional HTTP proxy server to use when connecting to the IPFS Gateway", urlStringType) ConfigSubscriptionMax = ffc("config.subscription.max", "The maximum number of pre-defined subscriptions that can exist (note for high fan-out consider connecting a dedicated pub/sub broker to the dispatcher)", i18n.IntType) ConfigSubscriptionDefaultsBatchSize = ffc("config.subscription.defaults.batchSize", "Default read ahead to enable for subscriptions that do not explicitly configure readahead", i18n.IntType) ConfigTokensName = ffc("config.tokens[].name", "A name to identify this token plugin", i18n.StringType) ConfigTokensPlugin = ffc("config.tokens[].plugin", "The type of the token plugin to use", i18n.StringType) - ConfigTokensURL = ffc("config.tokens[].url", "The URL of the token connector", "URL "+i18n.StringType) - ConfigTokensProxyURL = ffc("config.tokens[].proxy.url", "Optional HTTP proxy server to use when connecting to the token connector", "URL "+i18n.StringType) + ConfigTokensURL = ffc("config.tokens[].url", "The URL of the token connector", urlStringType) + ConfigTokensProxyURL = ffc("config.tokens[].proxy.url", "Optional HTTP proxy server to use when connecting to the token connector", urlStringType) ConfigPluginTokens = ffc("config.plugins.tokens", "The token plugin configurations", i18n.StringType) ConfigPluginTokensName = ffc("config.plugins.tokens[].name", "A name to identify this token plugin", i18n.StringType) ConfigPluginTokensBroadcastName = ffc("config.plugins.tokens[].broadcastName", "The name to be used in broadcast messages related to this token plugin, if it differs from the local plugin name", i18n.StringType) ConfigPluginTokensType = ffc("config.plugins.tokens[].type", "The type of the token plugin to use", i18n.StringType) - ConfigPluginTokensURL = ffc("config.plugins.tokens[].fftokens.url", "The URL of the token connector", "URL "+i18n.StringType) - ConfigPluginTokensProxyURL = ffc("config.plugins.tokens[].fftokens.proxy.url", "Optional HTTP proxy server to use when connecting to the token connector", "URL "+i18n.StringType) + ConfigPluginTokensURL = ffc("config.plugins.tokens[].fftokens.url", "The URL of the token connector", urlStringType) + ConfigPluginTokensProxyURL = ffc("config.plugins.tokens[].fftokens.proxy.url", "Optional HTTP proxy server to use when connecting to the token connector", urlStringType) ConfigPluginTokensBackgroundStart = ffc("config.plugins.tokens[].fftokens.backgroundStart.enabled", "Start the tokens plugin in the background and enter retry loop if failed to start", i18n.BooleanType) ConfigPluginTokensBackgroundStartInitialDelay = ffc("config.plugins.tokens[].fftokens.backgroundStart.initialDelay", "Delay between restarts in the case where we retry to restart the token plugin", i18n.TimeDurationType) ConfigPluginTokensBackgroundStartMaxDelay = ffc("config.plugins.tokens[].fftokens.backgroundStart.maxDelay", "Max delay between restarts in the case where we retry to restart the token plugin", i18n.TimeDurationType) From 04c20d9150bce9fdb8a07cca79a75bca0ac82915 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 12:47:44 -0500 Subject: [PATCH 04/10] Update E2E to account for utility function returning err data Signed-off-by: Peter Broadhurst --- test/e2e/multiparty/ethereum_contracts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/multiparty/ethereum_contracts.go b/test/e2e/multiparty/ethereum_contracts.go index 0cd68972d..934c8f8ff 100644 --- a/test/e2e/multiparty/ethereum_contracts.go +++ b/test/e2e/multiparty/ethereum_contracts.go @@ -233,7 +233,7 @@ func (suite *EthereumContractTestSuite) TestFFIInvokeMethod() { // Idempotency check _, err = suite.testState.client1.InvokeContractMethod(suite.T(), invokeContractRequest, 409) - assert.NoError(suite.T(), err) + assert.Regexp(suite.T(), "FF10431", err) match := map[string]interface{}{ "info": map[string]interface{}{ From b923bbdb0973e4c6bfcee88e597ff8c7f7df8b76 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 13:08:12 -0500 Subject: [PATCH 05/10] Use idempotencyKey in test Signed-off-by: Peter Broadhurst --- internal/contracts/operations.go | 25 ++++++++++++++----------- test/e2e/gateway/ethereum_revert.go | 7 ++++--- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/internal/contracts/operations.go b/internal/contracts/operations.go index a57f9aa0e..c308aa51a 100644 --- a/internal/contracts/operations.go +++ b/internal/contracts/operations.go @@ -22,10 +22,10 @@ import ( "github.com/hyperledger/firefly-common/pkg/fftypes" "github.com/hyperledger/firefly-common/pkg/i18n" + "github.com/hyperledger/firefly-common/pkg/log" "github.com/hyperledger/firefly/internal/batch" "github.com/hyperledger/firefly/internal/coremsgs" "github.com/hyperledger/firefly/internal/data" - "github.com/hyperledger/firefly/internal/operations" "github.com/hyperledger/firefly/internal/txcommon" "github.com/hyperledger/firefly/pkg/blockchain" "github.com/hyperledger/firefly/pkg/core" @@ -131,25 +131,28 @@ func (cm *contractManager) RunOperation(ctx context.Context, op *core.PreparedOp if err != nil { return nil, core.OpPhaseInitializing, err } - errPhase := core.OpPhaseInitializing submissionRejected, err := cm.blockchain.InvokeContract(ctx, op.NamespacedIDString(), req.Key, req.Location, bcParsedMethod, req.Input, req.Options, batchPin) - if submissionRejected { - errPhase = core.OpPhaseComplete // immediately transition to failed - } - return nil, operations.ErrTernary(err, errPhase, core.OpPhasePending), err + return nil, submissionPhase(ctx, submissionRejected, err), err case blockchainContractDeployData: req := data.Request submissionRejected, err := cm.blockchain.DeployContract(ctx, op.NamespacedIDString(), req.Key, req.Definition, req.Contract, req.Input, req.Options) - errPhase := core.OpPhaseInitializing - if submissionRejected { - errPhase = core.OpPhaseComplete // immediately transition to failed - } - return nil, operations.ErrTernary(err, errPhase, core.OpPhasePending), err + return nil, submissionPhase(ctx, submissionRejected, err), err default: return nil, core.OpPhaseInitializing, i18n.NewError(ctx, coremsgs.MsgOperationDataIncorrect, op.Data) } } +func submissionPhase(ctx context.Context, submissionRejected bool, err error) core.OpPhase { + if err == nil { + return core.OpPhasePending + } + log.L(ctx).Errorf("Transaction submission failed [submissionRejected=%t]: %s", submissionRejected, err) + if submissionRejected { + return core.OpPhaseComplete + } + return core.OpPhaseInitializing +} + func (cm *contractManager) OnOperationUpdate(ctx context.Context, op *core.Operation, update *core.OperationUpdate) error { // Special handling for blockchain operations, which writes an event when it succeeds or fails switch op.Type { diff --git a/test/e2e/gateway/ethereum_revert.go b/test/e2e/gateway/ethereum_revert.go index 199cb1d28..f5f72034b 100644 --- a/test/e2e/gateway/ethereum_revert.go +++ b/test/e2e/gateway/ethereum_revert.go @@ -85,9 +85,10 @@ func (suite *EthereumRevertTestSuite) TestRevertTransitionsToFailed() { } locationBytes, _ := json.Marshal(location) invokeContractRequest := &core.ContractCallRequest{ - Location: fftypes.JSONAnyPtrBytes(locationBytes), - Method: goBang, - Input: map[string]interface{}{}, + IdempotencyKey: core.IdempotencyKey(fftypes.NewUUID().String()), + Location: fftypes.JSONAnyPtrBytes(locationBytes), + Method: goBang, + Input: map[string]interface{}{}, } // Check we get the revert error all the way back through the API on the invoke, due to the gas estimation From 0638746fcd3e5603ae4fdcc7d4e03fd51ed89d6f Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 13:44:28 -0500 Subject: [PATCH 06/10] Name var everywhere Signed-off-by: Peter Broadhurst --- internal/blockchain/ethereum/ethereum.go | 6 +++--- internal/blockchain/fabric/fabric.go | 4 ++-- internal/blockchain/tezos/tezos.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/blockchain/ethereum/ethereum.go b/internal/blockchain/ethereum/ethereum.go index c2e4a7b79..7cca630fd 100644 --- a/internal/blockchain/ethereum/ethereum.go +++ b/internal/blockchain/ethereum/ethereum.go @@ -607,7 +607,7 @@ func (e *Ethereum) applyOptions(ctx context.Context, body, options map[string]in return body, nil } -func (e *Ethereum) invokeContractMethod(ctx context.Context, address, signingKey string, abi *abi.Entry, requestID string, input []interface{}, errors []*abi.Entry, options map[string]interface{}) (bool, error) { +func (e *Ethereum) invokeContractMethod(ctx context.Context, address, signingKey string, abi *abi.Entry, requestID string, input []interface{}, errors []*abi.Entry, options map[string]interface{}) (submissionRejected bool, err error) { if e.metrics.IsMetricsEnabled() { e.metrics.BlockchainTransaction(address, abi.Name) } @@ -736,7 +736,7 @@ func (e *Ethereum) SubmitNetworkAction(ctx context.Context, nsOpID string, signi return err } -func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (bool, error) { +func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error) { if e.metrics.IsMetricsEnabled() { e.metrics.BlockchainContractDeployment() } @@ -754,7 +754,7 @@ func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string if signingKey != "" { body["from"] = signingKey } - body, err := e.applyOptions(ctx, body, options) + body, err = e.applyOptions(ctx, body, options) if err != nil { return true, err } diff --git a/internal/blockchain/fabric/fabric.go b/internal/blockchain/fabric/fabric.go index d9dee31b2..03b3fca8e 100644 --- a/internal/blockchain/fabric/fabric.go +++ b/internal/blockchain/fabric/fabric.go @@ -598,7 +598,7 @@ func (f *Fabric) ResolveSigningKey(ctx context.Context, signingKeyInput string, return signingKeyInput, nil } -func (f *Fabric) invokeContractMethod(ctx context.Context, channel, chaincode, methodName, signingKey, requestID string, prefixItems []*PrefixItem, input map[string]interface{}, options map[string]interface{}) (bool, error) { +func (f *Fabric) invokeContractMethod(ctx context.Context, channel, chaincode, methodName, signingKey, requestID string, prefixItems []*PrefixItem, input map[string]interface{}, options map[string]interface{}) (submissionRejected bool, err error) { body, err := f.buildFabconnectRequestBody(ctx, channel, chaincode, methodName, signingKey, requestID, prefixItems, input, options) if err != nil { return true, err @@ -770,7 +770,7 @@ func (f *Fabric) buildFabconnectRequestBody(ctx context.Context, channel, chainc return body, nil } -func (f *Fabric) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (bool, error) { +func (f *Fabric) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error) { return true, i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) } diff --git a/internal/blockchain/tezos/tezos.go b/internal/blockchain/tezos/tezos.go index e791b5c54..f5dd984d4 100644 --- a/internal/blockchain/tezos/tezos.go +++ b/internal/blockchain/tezos/tezos.go @@ -300,7 +300,7 @@ func (t *Tezos) SubmitNetworkAction(ctx context.Context, nsOpID string, signingK return nil } -func (t *Tezos) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (bool, error) { +func (t *Tezos) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error) { return true, i18n.NewError(ctx, coremsgs.MsgNotSupportedByBlockchainPlugin) } @@ -516,7 +516,7 @@ func (t *Tezos) recoverFFI(ctx context.Context, parsedMethod interface{}) (*ffty return methodInfo.method, methodInfo.errors, nil } -func (t *Tezos) invokeContractMethod(ctx context.Context, address, methodName, signingKey, requestID string, michelsonInput micheline.Parameters, options map[string]interface{}) (bool, error) { +func (t *Tezos) invokeContractMethod(ctx context.Context, address, methodName, signingKey, requestID string, michelsonInput micheline.Parameters, options map[string]interface{}) (submissionRejected bool, err error) { if t.metrics.IsMetricsEnabled() { t.metrics.BlockchainTransaction(address, methodName) } From 99111a8a1e85a8f4c02a1111c24662cc85d08979 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 15:02:50 -0500 Subject: [PATCH 07/10] Update to latest releases Signed-off-by: Peter Broadhurst --- manifest.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest.json b/manifest.json index fecfa30e5..9f1fa785d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,18 +6,18 @@ }, "evmconnect": { "image": "ghcr.io/hyperledger/firefly-evmconnect", - "tag": "v1.3.0", - "sha": "cddfbe3a67a660e72a35e79af931625fdc1a285c2ea97faef68ad0408aa0d8c3" + "tag": "v1.3.2", + "sha": "9752a2c8b9c6cbd3f2b7327a309609a6b33ec80973004aed37e193b4e7f4a7c4" }, "fabconnect": { "image": "ghcr.io/hyperledger/firefly-fabconnect", - "tag": "v0.9.17", - "sha": "7d4aa158f9dff31f200ae7a04f68665f32930f7739156b25a0da80e5353f3245" + "tag": "v0.9.18", + "sha": "683b4ef1373b3d9decd591906298878561218489a6279c3f4f208e2e1c7ace3f" }, "tezosconnect": { "image": "ghcr.io/hyperledger/firefly-tezosconnect", - "tag": "v0.1.0", - "sha": "2c20731765f9203fceca6e28a5fa443e4ce5c3a9eb1de7710ed46f8e24db1c00" + "tag": "v0.1.2", + "sha": "5a57993ea3611b0605db14f53aedbb203c285b63240add0835c595be77dec175" }, "dataexchange-https": { "image": "ghcr.io/hyperledger/firefly-dataexchange-https", @@ -36,8 +36,8 @@ }, "signer": { "image": "ghcr.io/hyperledger/firefly-signer", - "tag": "v1.1.9", - "sha": "515271ea722e6bf9601524880e7280a1fc052453733338d6ed474f85d6618aa1" + "tag": "v1.1.11", + "sha": "bf4b33be20338b229ce451bc61bd4c3ff6a11e7cbd5513d72267807483a1e024" }, "build": { "firefly-builder": { From 09351d21b2247a7ad8f74bda49dc610b7581ce15 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 15:24:04 -0500 Subject: [PATCH 08/10] Allow one of two error codes Signed-off-by: Peter Broadhurst --- test/e2e/multiparty/ethereum_contracts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/multiparty/ethereum_contracts.go b/test/e2e/multiparty/ethereum_contracts.go index 934c8f8ff..06a605395 100644 --- a/test/e2e/multiparty/ethereum_contracts.go +++ b/test/e2e/multiparty/ethereum_contracts.go @@ -233,7 +233,7 @@ func (suite *EthereumContractTestSuite) TestFFIInvokeMethod() { // Idempotency check _, err = suite.testState.client1.InvokeContractMethod(suite.T(), invokeContractRequest, 409) - assert.Regexp(suite.T(), "FF10431", err) + assert.Regexp(suite.T(), "FF10431|FF10458" /* idempotency check could come from FF or blockchain connector, depending on the operation update that is async */, err) match := map[string]interface{}{ "info": map[string]interface{}{ From 508492641328ef1f445fe3d4c970188c328805a2 Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 15:29:16 -0500 Subject: [PATCH 09/10] Only update EVMConnect in this PR Signed-off-by: Peter Broadhurst --- manifest.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/manifest.json b/manifest.json index 9f1fa785d..d8c0a98d9 100644 --- a/manifest.json +++ b/manifest.json @@ -11,13 +11,13 @@ }, "fabconnect": { "image": "ghcr.io/hyperledger/firefly-fabconnect", - "tag": "v0.9.18", - "sha": "683b4ef1373b3d9decd591906298878561218489a6279c3f4f208e2e1c7ace3f" + "tag": "v0.9.17", + "sha": "7d4aa158f9dff31f200ae7a04f68665f32930f7739156b25a0da80e5353f3245" }, "tezosconnect": { "image": "ghcr.io/hyperledger/firefly-tezosconnect", - "tag": "v0.1.2", - "sha": "5a57993ea3611b0605db14f53aedbb203c285b63240add0835c595be77dec175" + "tag": "v0.1.0", + "sha": "2c20731765f9203fceca6e28a5fa443e4ce5c3a9eb1de7710ed46f8e24db1c00" }, "dataexchange-https": { "image": "ghcr.io/hyperledger/firefly-dataexchange-https", @@ -36,8 +36,8 @@ }, "signer": { "image": "ghcr.io/hyperledger/firefly-signer", - "tag": "v1.1.11", - "sha": "bf4b33be20338b229ce451bc61bd4c3ff6a11e7cbd5513d72267807483a1e024" + "tag": "v1.1.9", + "sha": "515271ea722e6bf9601524880e7280a1fc052453733338d6ed474f85d6618aa1" }, "build": { "firefly-builder": { @@ -61,4 +61,4 @@ "cli": { "tag": "v1.2.1" } -} +} \ No newline at end of file From fd554b73fc61171ffb5ff8192aaa7ece63f49aff Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Thu, 21 Dec 2023 15:48:26 -0500 Subject: [PATCH 10/10] EthConnect test cannot support the new revert test Signed-off-by: Peter Broadhurst --- .github/workflows/go.yml | 2 +- test/e2e/runners/ethereum_gateway_test.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d8aee6f2f..5d5a3cf76 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -117,7 +117,7 @@ jobs: - stack-type: ethereum blockchain-connector: ethconnect - test-suite: TestEthereumGatewayE2ESuite + test-suite: TestEthereumGatewayLegacyEthE2ESuite database-type: sqlite3 token-provider: erc1155 multiparty-enabled: false diff --git a/test/e2e/runners/ethereum_gateway_test.go b/test/e2e/runners/ethereum_gateway_test.go index 9ee203ead..00aca2d4c 100644 --- a/test/e2e/runners/ethereum_gateway_test.go +++ b/test/e2e/runners/ethereum_gateway_test.go @@ -30,3 +30,12 @@ func TestEthereumGatewayE2ESuite(t *testing.T) { suite.Run(t, new(gateway.EthereumRevertTestSuite)) suite.Run(t, new(gateway.TokensOnlyTestSuite)) } + +func TestEthereumGatewayLegacyEthE2ESuite(t *testing.T) { + // Note EthereumRevertTestSuite does not work with legacy EthConnect, as the + // submissionRejected boolean is only supported by the EVMConnect (FFTM) generation. + suite.Run(t, new(gateway.TokensTestSuite)) + suite.Run(t, new(gateway.EthereumCouponTestSuite)) + suite.Run(t, new(gateway.EthereumSimpleStorageTestSuite)) + suite.Run(t, new(gateway.TokensOnlyTestSuite)) +}