diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e8bf24f..7146d38 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.21' + go-version: '1.22.2' - name: Build and Test run: make diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index c992151..b33ad97 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: '1.21' + go-version: '1.22.2' cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/Dockerfile b/Dockerfile index a5b6155..900ed14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21-alpine3.19 AS builder +FROM golang:1.22.2-alpine AS builder RUN apk add make ARG BUILD_VERSION ENV BUILD_VERSION=${BUILD_VERSION} diff --git a/go.mod b/go.mod index 7424a64..dba4109 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/hyperledger/firefly-tezosconnect -go 1.21 +go 1.22.2 require ( blockwatch.cc/tzgo v1.17.1 diff --git a/mocks/fftmmocks/manager.go b/mocks/fftmmocks/manager.go index b62616c..766ed43 100644 --- a/mocks/fftmmocks/manager.go +++ b/mocks/fftmmocks/manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.43.0. DO NOT EDIT. package fftmmocks @@ -18,6 +18,10 @@ func (_m *Manager) Close() { 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() @@ -28,13 +32,12 @@ func (_m *Manager) Start() error { return r0 } -type mockConstructorTestingTNewManager interface { +// NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewManager(t interface { mock.TestingT Cleanup(func()) -} - -// NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewManager(t mockConstructorTestingTNewManager) *Manager { +}) *Manager { mock := &Manager{} mock.Mock.Test(t) diff --git a/mocks/tzrpcbackendmocks/rpc_client.go b/mocks/tzrpcbackendmocks/rpc_client.go index a720f79..2f61766 100644 --- a/mocks/tzrpcbackendmocks/rpc_client.go +++ b/mocks/tzrpcbackendmocks/rpc_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.23.2. DO NOT EDIT. +// Code generated by mockery v2.43.0. DO NOT EDIT. package tzrpcbackendmocks @@ -29,6 +29,10 @@ type RpcClient struct { func (_m *RpcClient) BanNetworkPeer(ctx context.Context, peerID string) error { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for BanNetworkPeer") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, peerID) @@ -43,6 +47,10 @@ func (_m *RpcClient) BanNetworkPeer(ctx context.Context, peerID string) error { func (_m *RpcClient) BanNetworkPoint(ctx context.Context, address string) error { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for BanNetworkPoint") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, address) @@ -57,6 +65,10 @@ func (_m *RpcClient) BanNetworkPoint(ctx context.Context, address string) error func (_m *RpcClient) Broadcast(ctx context.Context, o *codec.Op) (tezos.OpHash, error) { ret := _m.Called(ctx, o) + if len(ret) == 0 { + panic("no return value specified for Broadcast") + } + var r0 tezos.OpHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, *codec.Op) (tezos.OpHash, error)); ok { @@ -83,6 +95,10 @@ func (_m *RpcClient) Broadcast(ctx context.Context, o *codec.Op) (tezos.OpHash, func (_m *RpcClient) BroadcastOperation(ctx context.Context, body []byte) (tezos.OpHash, error) { ret := _m.Called(ctx, body) + if len(ret) == 0 { + panic("no return value specified for BroadcastOperation") + } + var r0 tezos.OpHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, []byte) (tezos.OpHash, error)); ok { @@ -109,6 +125,10 @@ func (_m *RpcClient) BroadcastOperation(ctx context.Context, body []byte) (tezos func (_m *RpcClient) Client() *http.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Client") + } + var r0 *http.Client if rf, ok := ret.Get(0).(func() *http.Client); ok { r0 = rf() @@ -130,6 +150,10 @@ func (_m *RpcClient) Close() { func (_m *RpcClient) Complete(ctx context.Context, o *codec.Op, key tezos.Key) error { ret := _m.Called(ctx, o, key) + if len(ret) == 0 { + panic("no return value specified for Complete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *codec.Op, tezos.Key) error); ok { r0 = rf(ctx, o, key) @@ -144,6 +168,10 @@ func (_m *RpcClient) Complete(ctx context.Context, o *codec.Op, key tezos.Key) e func (_m *RpcClient) ConnectToNetworkPoint(ctx context.Context, address string, timeout time.Duration) error { ret := _m.Called(ctx, address, timeout) + if len(ret) == 0 { + panic("no return value specified for ConnectToNetworkPoint") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration) error); ok { r0 = rf(ctx, address, timeout) @@ -158,6 +186,10 @@ func (_m *RpcClient) ConnectToNetworkPoint(ctx context.Context, address string, func (_m *RpcClient) Do(req *http.Request, v interface{}) error { ret := _m.Called(req, v) + if len(ret) == 0 { + panic("no return value specified for Do") + } + var r0 error if rf, ok := ret.Get(0).(func(*http.Request, interface{}) error); ok { r0 = rf(req, v) @@ -172,6 +204,10 @@ func (_m *RpcClient) Do(req *http.Request, v interface{}) error { func (_m *RpcClient) DoAsync(req *http.Request, mon rpc.Monitor) error { ret := _m.Called(req, mon) + if len(ret) == 0 { + panic("no return value specified for DoAsync") + } + var r0 error if rf, ok := ret.Get(0).(func(*http.Request, rpc.Monitor) error); ok { r0 = rf(req, mon) @@ -186,6 +222,10 @@ func (_m *RpcClient) DoAsync(req *http.Request, mon rpc.Monitor) error { func (_m *RpcClient) ForgeOperation(ctx context.Context, id rpc.BlockID, body interface{}, resp interface{}) error { ret := _m.Called(ctx, id, body, resp) + if len(ret) == 0 { + panic("no return value specified for ForgeOperation") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, interface{}, interface{}) error); ok { r0 = rf(ctx, id, body, resp) @@ -200,6 +240,10 @@ func (_m *RpcClient) ForgeOperation(ctx context.Context, id rpc.BlockID, body in func (_m *RpcClient) Get(ctx context.Context, urlpath string, result interface{}) error { ret := _m.Called(ctx, urlpath, result) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, interface{}) error); ok { r0 = rf(ctx, urlpath, result) @@ -214,6 +258,10 @@ func (_m *RpcClient) Get(ctx context.Context, urlpath string, result interface{} func (_m *RpcClient) GetActiveBigmapInfo(ctx context.Context, bigmap int64) (*rpc.BigmapInfo, error) { ret := _m.Called(ctx, bigmap) + if len(ret) == 0 { + panic("no return value specified for GetActiveBigmapInfo") + } + var r0 *rpc.BigmapInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64) (*rpc.BigmapInfo, error)); ok { @@ -240,6 +288,10 @@ func (_m *RpcClient) GetActiveBigmapInfo(ctx context.Context, bigmap int64) (*rp func (_m *RpcClient) GetActiveBigmapValue(ctx context.Context, bigmap int64, hash tezos.ExprHash) (micheline.Prim, error) { ret := _m.Called(ctx, bigmap, hash) + if len(ret) == 0 { + panic("no return value specified for GetActiveBigmapValue") + } + var r0 micheline.Prim var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, tezos.ExprHash) (micheline.Prim, error)); ok { @@ -264,6 +316,10 @@ func (_m *RpcClient) GetActiveBigmapValue(ctx context.Context, bigmap int64, has func (_m *RpcClient) GetAsync(ctx context.Context, urlpath string, mon rpc.Monitor) error { ret := _m.Called(ctx, urlpath, mon) + if len(ret) == 0 { + panic("no return value specified for GetAsync") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, rpc.Monitor) error); ok { r0 = rf(ctx, urlpath, mon) @@ -278,6 +334,10 @@ func (_m *RpcClient) GetAsync(ctx context.Context, urlpath string, mon rpc.Monit func (_m *RpcClient) GetBigmapInfo(ctx context.Context, bigmap int64, id rpc.BlockID) (*rpc.BigmapInfo, error) { ret := _m.Called(ctx, bigmap, id) + if len(ret) == 0 { + panic("no return value specified for GetBigmapInfo") + } + var r0 *rpc.BigmapInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, rpc.BlockID) (*rpc.BigmapInfo, error)); ok { @@ -304,6 +364,10 @@ func (_m *RpcClient) GetBigmapInfo(ctx context.Context, bigmap int64, id rpc.Blo func (_m *RpcClient) GetBigmapValue(ctx context.Context, bigmap int64, hash tezos.ExprHash, id rpc.BlockID) (micheline.Prim, error) { ret := _m.Called(ctx, bigmap, hash, id) + if len(ret) == 0 { + panic("no return value specified for GetBigmapValue") + } + var r0 micheline.Prim var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, tezos.ExprHash, rpc.BlockID) (micheline.Prim, error)); ok { @@ -328,6 +392,10 @@ func (_m *RpcClient) GetBigmapValue(ctx context.Context, bigmap int64, hash tezo func (_m *RpcClient) GetBlock(ctx context.Context, id rpc.BlockID) (*rpc.Block, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlock") + } + var r0 *rpc.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (*rpc.Block, error)); ok { @@ -354,6 +422,10 @@ func (_m *RpcClient) GetBlock(ctx context.Context, id rpc.BlockID) (*rpc.Block, func (_m *RpcClient) GetBlockHash(ctx context.Context, id rpc.BlockID) (tezos.BlockHash, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockHash") + } + var r0 tezos.BlockHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (tezos.BlockHash, error)); ok { @@ -380,6 +452,10 @@ func (_m *RpcClient) GetBlockHash(ctx context.Context, id rpc.BlockID) (tezos.Bl func (_m *RpcClient) GetBlockHeader(ctx context.Context, id rpc.BlockID) (*rpc.BlockHeader, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeader") + } + var r0 *rpc.BlockHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (*rpc.BlockHeader, error)); ok { @@ -406,6 +482,10 @@ func (_m *RpcClient) GetBlockHeader(ctx context.Context, id rpc.BlockID) (*rpc.B func (_m *RpcClient) GetBlockHeight(ctx context.Context, height int64) (*rpc.Block, error) { ret := _m.Called(ctx, height) + if len(ret) == 0 { + panic("no return value specified for GetBlockHeight") + } + var r0 *rpc.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64) (*rpc.Block, error)); ok { @@ -432,6 +512,10 @@ func (_m *RpcClient) GetBlockHeight(ctx context.Context, height int64) (*rpc.Blo func (_m *RpcClient) GetBlockMetadata(ctx context.Context, id rpc.BlockID) (*rpc.BlockMetadata, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockMetadata") + } + var r0 *rpc.BlockMetadata var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (*rpc.BlockMetadata, error)); ok { @@ -458,6 +542,10 @@ func (_m *RpcClient) GetBlockMetadata(ctx context.Context, id rpc.BlockID) (*rpc func (_m *RpcClient) GetBlockOperation(ctx context.Context, id rpc.BlockID, l int, n int) (*rpc.Operation, error) { ret := _m.Called(ctx, id, l, n) + if len(ret) == 0 { + panic("no return value specified for GetBlockOperation") + } + var r0 *rpc.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int, int) (*rpc.Operation, error)); ok { @@ -484,6 +572,10 @@ func (_m *RpcClient) GetBlockOperation(ctx context.Context, id rpc.BlockID, l in func (_m *RpcClient) GetBlockOperationHash(ctx context.Context, id rpc.BlockID, l int, n int) (tezos.OpHash, error) { ret := _m.Called(ctx, id, l, n) + if len(ret) == 0 { + panic("no return value specified for GetBlockOperationHash") + } + var r0 tezos.OpHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int, int) (tezos.OpHash, error)); ok { @@ -510,6 +602,10 @@ func (_m *RpcClient) GetBlockOperationHash(ctx context.Context, id rpc.BlockID, func (_m *RpcClient) GetBlockOperationHashes(ctx context.Context, id rpc.BlockID) ([][]tezos.OpHash, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockOperationHashes") + } + var r0 [][]tezos.OpHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) ([][]tezos.OpHash, error)); ok { @@ -536,6 +632,10 @@ func (_m *RpcClient) GetBlockOperationHashes(ctx context.Context, id rpc.BlockID func (_m *RpcClient) GetBlockOperationList(ctx context.Context, id rpc.BlockID, l int) ([]rpc.Operation, error) { ret := _m.Called(ctx, id, l) + if len(ret) == 0 { + panic("no return value specified for GetBlockOperationList") + } + var r0 []rpc.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int) ([]rpc.Operation, error)); ok { @@ -562,6 +662,10 @@ func (_m *RpcClient) GetBlockOperationList(ctx context.Context, id rpc.BlockID, func (_m *RpcClient) GetBlockOperationListHashes(ctx context.Context, id rpc.BlockID, l int) ([]tezos.OpHash, error) { ret := _m.Called(ctx, id, l) + if len(ret) == 0 { + panic("no return value specified for GetBlockOperationListHashes") + } + var r0 []tezos.OpHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int) ([]tezos.OpHash, error)); ok { @@ -588,6 +692,10 @@ func (_m *RpcClient) GetBlockOperationListHashes(ctx context.Context, id rpc.Blo func (_m *RpcClient) GetBlockOperations(ctx context.Context, id rpc.BlockID) ([][]rpc.Operation, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetBlockOperations") + } + var r0 [][]rpc.Operation var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) ([][]rpc.Operation, error)); ok { @@ -614,6 +722,10 @@ func (_m *RpcClient) GetBlockOperations(ctx context.Context, id rpc.BlockID) ([] func (_m *RpcClient) GetBlockPredHashes(ctx context.Context, hash tezos.BlockHash, count int) ([]tezos.BlockHash, error) { ret := _m.Called(ctx, hash, count) + if len(ret) == 0 { + panic("no return value specified for GetBlockPredHashes") + } + var r0 []tezos.BlockHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.BlockHash, int) ([]tezos.BlockHash, error)); ok { @@ -640,6 +752,10 @@ func (_m *RpcClient) GetBlockPredHashes(ctx context.Context, hash tezos.BlockHas func (_m *RpcClient) GetChainId(ctx context.Context) (tezos.ChainIdHash, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetChainId") + } + var r0 tezos.ChainIdHash var r1 error if rf, ok := ret.Get(0).(func(context.Context) (tezos.ChainIdHash, error)); ok { @@ -666,6 +782,10 @@ func (_m *RpcClient) GetChainId(ctx context.Context) (tezos.ChainIdHash, error) func (_m *RpcClient) GetConstants(ctx context.Context, id rpc.BlockID) (rpc.Constants, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetConstants") + } + var r0 rpc.Constants var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (rpc.Constants, error)); ok { @@ -690,6 +810,10 @@ func (_m *RpcClient) GetConstants(ctx context.Context, id rpc.BlockID) (rpc.Cons func (_m *RpcClient) GetContract(ctx context.Context, addr tezos.Address, id rpc.BlockID) (*rpc.ContractInfo, error) { ret := _m.Called(ctx, addr, id) + if len(ret) == 0 { + panic("no return value specified for GetContract") + } + var r0 *rpc.ContractInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.BlockID) (*rpc.ContractInfo, error)); ok { @@ -716,6 +840,10 @@ func (_m *RpcClient) GetContract(ctx context.Context, addr tezos.Address, id rpc func (_m *RpcClient) GetContractBalance(ctx context.Context, addr tezos.Address, id rpc.BlockID) (tezos.Z, error) { ret := _m.Called(ctx, addr, id) + if len(ret) == 0 { + panic("no return value specified for GetContractBalance") + } + var r0 tezos.Z var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.BlockID) (tezos.Z, error)); ok { @@ -740,6 +868,10 @@ func (_m *RpcClient) GetContractBalance(ctx context.Context, addr tezos.Address, func (_m *RpcClient) GetContractEntrypoints(ctx context.Context, addr tezos.Address) (map[string]micheline.Type, error) { ret := _m.Called(ctx, addr) + if len(ret) == 0 { + panic("no return value specified for GetContractEntrypoints") + } + var r0 map[string]micheline.Type var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address) (map[string]micheline.Type, error)); ok { @@ -766,6 +898,10 @@ func (_m *RpcClient) GetContractEntrypoints(ctx context.Context, addr tezos.Addr func (_m *RpcClient) GetContractExt(ctx context.Context, addr tezos.Address, id rpc.BlockID) (*rpc.ContractInfo, error) { ret := _m.Called(ctx, addr, id) + if len(ret) == 0 { + panic("no return value specified for GetContractExt") + } + var r0 *rpc.ContractInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.BlockID) (*rpc.ContractInfo, error)); ok { @@ -792,6 +928,10 @@ func (_m *RpcClient) GetContractExt(ctx context.Context, addr tezos.Address, id func (_m *RpcClient) GetContractScript(ctx context.Context, addr tezos.Address) (*micheline.Script, error) { ret := _m.Called(ctx, addr) + if len(ret) == 0 { + panic("no return value specified for GetContractScript") + } + var r0 *micheline.Script var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address) (*micheline.Script, error)); ok { @@ -818,6 +958,10 @@ func (_m *RpcClient) GetContractScript(ctx context.Context, addr tezos.Address) func (_m *RpcClient) GetContractStorage(ctx context.Context, addr tezos.Address, id rpc.BlockID) (micheline.Prim, error) { ret := _m.Called(ctx, addr, id) + if len(ret) == 0 { + panic("no return value specified for GetContractStorage") + } + var r0 micheline.Prim var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.BlockID) (micheline.Prim, error)); ok { @@ -842,6 +986,10 @@ func (_m *RpcClient) GetContractStorage(ctx context.Context, addr tezos.Address, func (_m *RpcClient) GetContractStorageNormalized(ctx context.Context, addr tezos.Address, id rpc.BlockID, mode rpc.UnparsingMode) (micheline.Prim, error) { ret := _m.Called(ctx, addr, id, mode) + if len(ret) == 0 { + panic("no return value specified for GetContractStorageNormalized") + } + var r0 micheline.Prim var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.BlockID, rpc.UnparsingMode) (micheline.Prim, error)); ok { @@ -866,6 +1014,10 @@ func (_m *RpcClient) GetContractStorageNormalized(ctx context.Context, addr tezo func (_m *RpcClient) GetCustomConstants(ctx context.Context, id rpc.BlockID, resp interface{}) error { ret := _m.Called(ctx, id, resp) + if len(ret) == 0 { + panic("no return value specified for GetCustomConstants") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, interface{}) error); ok { r0 = rf(ctx, id, resp) @@ -880,6 +1032,10 @@ func (_m *RpcClient) GetCustomConstants(ctx context.Context, id rpc.BlockID, res func (_m *RpcClient) GetDelegate(ctx context.Context, addr tezos.Address, id rpc.BlockID) (*rpc.Delegate, error) { ret := _m.Called(ctx, addr, id) + if len(ret) == 0 { + panic("no return value specified for GetDelegate") + } + var r0 *rpc.Delegate var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.BlockID) (*rpc.Delegate, error)); ok { @@ -906,6 +1062,10 @@ func (_m *RpcClient) GetDelegate(ctx context.Context, addr tezos.Address, id rpc func (_m *RpcClient) GetDelegateBalance(ctx context.Context, addr tezos.Address, id rpc.BlockID) (int64, error) { ret := _m.Called(ctx, addr, id) + if len(ret) == 0 { + panic("no return value specified for GetDelegateBalance") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.BlockID) (int64, error)); ok { @@ -930,6 +1090,10 @@ func (_m *RpcClient) GetDelegateBalance(ctx context.Context, addr tezos.Address, func (_m *RpcClient) GetGenesisBlock(ctx context.Context) (*rpc.Block, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetGenesisBlock") + } + var r0 *rpc.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*rpc.Block, error)); ok { @@ -956,6 +1120,10 @@ func (_m *RpcClient) GetGenesisBlock(ctx context.Context) (*rpc.Block, error) { func (_m *RpcClient) GetHeadBlock(ctx context.Context) (*rpc.Block, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetHeadBlock") + } + var r0 *rpc.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*rpc.Block, error)); ok { @@ -982,6 +1150,10 @@ func (_m *RpcClient) GetHeadBlock(ctx context.Context) (*rpc.Block, error) { func (_m *RpcClient) GetInvalidBlock(ctx context.Context, blockID tezos.BlockHash) (*rpc.InvalidBlock, error) { ret := _m.Called(ctx, blockID) + if len(ret) == 0 { + panic("no return value specified for GetInvalidBlock") + } + var r0 *rpc.InvalidBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.BlockHash) (*rpc.InvalidBlock, error)); ok { @@ -1008,6 +1180,10 @@ func (_m *RpcClient) GetInvalidBlock(ctx context.Context, blockID tezos.BlockHas func (_m *RpcClient) GetInvalidBlocks(ctx context.Context) ([]*rpc.InvalidBlock, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetInvalidBlocks") + } + var r0 []*rpc.InvalidBlock var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]*rpc.InvalidBlock, error)); ok { @@ -1034,6 +1210,10 @@ func (_m *RpcClient) GetInvalidBlocks(ctx context.Context) ([]*rpc.InvalidBlock, func (_m *RpcClient) GetManagerKey(ctx context.Context, addr tezos.Address, id rpc.BlockID) (tezos.Key, error) { ret := _m.Called(ctx, addr, id) + if len(ret) == 0 { + panic("no return value specified for GetManagerKey") + } + var r0 tezos.Key var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.BlockID) (tezos.Key, error)); ok { @@ -1058,6 +1238,10 @@ func (_m *RpcClient) GetManagerKey(ctx context.Context, addr tezos.Address, id r func (_m *RpcClient) GetMempool(ctx context.Context) (*rpc.Mempool, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetMempool") + } + var r0 *rpc.Mempool var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*rpc.Mempool, error)); ok { @@ -1084,6 +1268,10 @@ func (_m *RpcClient) GetMempool(ctx context.Context) (*rpc.Mempool, error) { func (_m *RpcClient) GetNetworkConnections(ctx context.Context) ([]*rpc.NetworkConnection, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNetworkConnections") + } + var r0 []*rpc.NetworkConnection var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]*rpc.NetworkConnection, error)); ok { @@ -1110,6 +1298,10 @@ func (_m *RpcClient) GetNetworkConnections(ctx context.Context) ([]*rpc.NetworkC func (_m *RpcClient) GetNetworkPeer(ctx context.Context, peerID string) (*rpc.NetworkPeer, error) { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for GetNetworkPeer") + } + var r0 *rpc.NetworkPeer var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*rpc.NetworkPeer, error)); ok { @@ -1136,6 +1328,10 @@ func (_m *RpcClient) GetNetworkPeer(ctx context.Context, peerID string) (*rpc.Ne func (_m *RpcClient) GetNetworkPeerBanned(ctx context.Context, peerID string) (bool, error) { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for GetNetworkPeerBanned") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { @@ -1160,6 +1356,10 @@ func (_m *RpcClient) GetNetworkPeerBanned(ctx context.Context, peerID string) (b func (_m *RpcClient) GetNetworkPeerLog(ctx context.Context, peerID string) ([]*rpc.NetworkPeerLogEntry, error) { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for GetNetworkPeerLog") + } + var r0 []*rpc.NetworkPeerLogEntry var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]*rpc.NetworkPeerLogEntry, error)); ok { @@ -1186,6 +1386,10 @@ func (_m *RpcClient) GetNetworkPeerLog(ctx context.Context, peerID string) ([]*r func (_m *RpcClient) GetNetworkPeers(ctx context.Context, filter string) ([]*rpc.NetworkPeer, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetNetworkPeers") + } + var r0 []*rpc.NetworkPeer var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]*rpc.NetworkPeer, error)); ok { @@ -1212,6 +1416,10 @@ func (_m *RpcClient) GetNetworkPeers(ctx context.Context, filter string) ([]*rpc func (_m *RpcClient) GetNetworkPoint(ctx context.Context, address string) (*rpc.NetworkPoint, error) { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for GetNetworkPoint") + } + var r0 *rpc.NetworkPoint var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*rpc.NetworkPoint, error)); ok { @@ -1238,6 +1446,10 @@ func (_m *RpcClient) GetNetworkPoint(ctx context.Context, address string) (*rpc. func (_m *RpcClient) GetNetworkPointBanned(ctx context.Context, address string) (bool, error) { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for GetNetworkPointBanned") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { @@ -1262,6 +1474,10 @@ func (_m *RpcClient) GetNetworkPointBanned(ctx context.Context, address string) func (_m *RpcClient) GetNetworkPointLog(ctx context.Context, address string) ([]*rpc.NetworkPointLogEntry, error) { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for GetNetworkPointLog") + } + var r0 []*rpc.NetworkPointLogEntry var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]*rpc.NetworkPointLogEntry, error)); ok { @@ -1288,6 +1504,10 @@ func (_m *RpcClient) GetNetworkPointLog(ctx context.Context, address string) ([] func (_m *RpcClient) GetNetworkPoints(ctx context.Context, filter string) ([]*rpc.NetworkPoint, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for GetNetworkPoints") + } + var r0 []*rpc.NetworkPoint var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]*rpc.NetworkPoint, error)); ok { @@ -1314,6 +1534,10 @@ func (_m *RpcClient) GetNetworkPoints(ctx context.Context, filter string) ([]*rp func (_m *RpcClient) GetNetworkStats(ctx context.Context) (*rpc.NetworkStats, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNetworkStats") + } + var r0 *rpc.NetworkStats var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*rpc.NetworkStats, error)); ok { @@ -1340,6 +1564,10 @@ func (_m *RpcClient) GetNetworkStats(ctx context.Context) (*rpc.NetworkStats, er func (_m *RpcClient) GetNormalizedScript(ctx context.Context, addr tezos.Address, mode rpc.UnparsingMode) (*micheline.Script, error) { ret := _m.Called(ctx, addr, mode) + if len(ret) == 0 { + panic("no return value specified for GetNormalizedScript") + } + var r0 *micheline.Script var r1 error if rf, ok := ret.Get(0).(func(context.Context, tezos.Address, rpc.UnparsingMode) (*micheline.Script, error)); ok { @@ -1366,6 +1594,10 @@ func (_m *RpcClient) GetNormalizedScript(ctx context.Context, addr tezos.Address func (_m *RpcClient) GetParams(ctx context.Context, id rpc.BlockID) (*tezos.Params, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetParams") + } + var r0 *tezos.Params var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (*tezos.Params, error)); ok { @@ -1392,6 +1624,10 @@ func (_m *RpcClient) GetParams(ctx context.Context, id rpc.BlockID) (*tezos.Para func (_m *RpcClient) GetRollSnapshotInfoCycle(ctx context.Context, id rpc.BlockID, cycle int64) (*rpc.RollSnapshotInfo, error) { ret := _m.Called(ctx, id, cycle) + if len(ret) == 0 { + panic("no return value specified for GetRollSnapshotInfoCycle") + } + var r0 *rpc.RollSnapshotInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int64) (*rpc.RollSnapshotInfo, error)); ok { @@ -1418,6 +1654,10 @@ func (_m *RpcClient) GetRollSnapshotInfoCycle(ctx context.Context, id rpc.BlockI func (_m *RpcClient) GetSnapshotIndexCycle(ctx context.Context, id rpc.BlockID, cycle int64) (*rpc.SnapshotIndex, error) { ret := _m.Called(ctx, id, cycle) + if len(ret) == 0 { + panic("no return value specified for GetSnapshotIndexCycle") + } + var r0 *rpc.SnapshotIndex var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int64) (*rpc.SnapshotIndex, error)); ok { @@ -1444,6 +1684,10 @@ func (_m *RpcClient) GetSnapshotIndexCycle(ctx context.Context, id rpc.BlockID, func (_m *RpcClient) GetStakingSnapshotInfoCycle(ctx context.Context, id rpc.BlockID, cycle int64) (*rpc.StakingSnapshotInfo, error) { ret := _m.Called(ctx, id, cycle) + if len(ret) == 0 { + panic("no return value specified for GetStakingSnapshotInfoCycle") + } + var r0 *rpc.StakingSnapshotInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int64) (*rpc.StakingSnapshotInfo, error)); ok { @@ -1470,6 +1714,10 @@ func (_m *RpcClient) GetStakingSnapshotInfoCycle(ctx context.Context, id rpc.Blo func (_m *RpcClient) GetStatus(ctx context.Context) (rpc.Status, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetStatus") + } + var r0 rpc.Status var r1 error if rf, ok := ret.Get(0).(func(context.Context) (rpc.Status, error)); ok { @@ -1494,6 +1742,10 @@ func (_m *RpcClient) GetStatus(ctx context.Context) (rpc.Status, error) { func (_m *RpcClient) GetTipHeader(ctx context.Context) (*rpc.BlockHeader, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetTipHeader") + } + var r0 *rpc.BlockHeader var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*rpc.BlockHeader, error)); ok { @@ -1520,6 +1772,10 @@ func (_m *RpcClient) GetTipHeader(ctx context.Context) (*rpc.BlockHeader, error) func (_m *RpcClient) GetTips(ctx context.Context, depth int, head tezos.BlockHash) ([][]tezos.BlockHash, error) { ret := _m.Called(ctx, depth, head) + if len(ret) == 0 { + panic("no return value specified for GetTips") + } + var r0 [][]tezos.BlockHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, int, tezos.BlockHash) ([][]tezos.BlockHash, error)); ok { @@ -1546,6 +1802,10 @@ func (_m *RpcClient) GetTips(ctx context.Context, depth int, head tezos.BlockHas func (_m *RpcClient) GetVersionInfo(ctx context.Context) (rpc.VersionInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetVersionInfo") + } + var r0 rpc.VersionInfo var r1 error if rf, ok := ret.Get(0).(func(context.Context) (rpc.VersionInfo, error)); ok { @@ -1570,6 +1830,10 @@ func (_m *RpcClient) GetVersionInfo(ctx context.Context) (rpc.VersionInfo, error func (_m *RpcClient) GetVoteProposal(ctx context.Context, id rpc.BlockID) (tezos.ProtocolHash, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetVoteProposal") + } + var r0 tezos.ProtocolHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (tezos.ProtocolHash, error)); ok { @@ -1596,6 +1860,10 @@ func (_m *RpcClient) GetVoteProposal(ctx context.Context, id rpc.BlockID) (tezos func (_m *RpcClient) GetVoteQuorum(ctx context.Context, id rpc.BlockID) (int, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetVoteQuorum") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (int, error)); ok { @@ -1620,6 +1888,10 @@ func (_m *RpcClient) GetVoteQuorum(ctx context.Context, id rpc.BlockID) (int, er func (_m *RpcClient) GetVoteResult(ctx context.Context, id rpc.BlockID) (rpc.BallotSummary, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetVoteResult") + } + var r0 rpc.BallotSummary var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (rpc.BallotSummary, error)); ok { @@ -1644,6 +1916,10 @@ func (_m *RpcClient) GetVoteResult(ctx context.Context, id rpc.BlockID) (rpc.Bal func (_m *RpcClient) Init(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -1658,6 +1934,10 @@ func (_m *RpcClient) Init(ctx context.Context) error { func (_m *RpcClient) ListActiveBigmapKeys(ctx context.Context, bigmap int64) ([]tezos.ExprHash, error) { ret := _m.Called(ctx, bigmap) + if len(ret) == 0 { + panic("no return value specified for ListActiveBigmapKeys") + } + var r0 []tezos.ExprHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64) ([]tezos.ExprHash, error)); ok { @@ -1684,6 +1964,10 @@ func (_m *RpcClient) ListActiveBigmapKeys(ctx context.Context, bigmap int64) ([] func (_m *RpcClient) ListActiveBigmapValues(ctx context.Context, bigmap int64, id rpc.BlockID) ([]micheline.Prim, error) { ret := _m.Called(ctx, bigmap, id) + if len(ret) == 0 { + panic("no return value specified for ListActiveBigmapValues") + } + var r0 []micheline.Prim var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, rpc.BlockID) ([]micheline.Prim, error)); ok { @@ -1710,6 +1994,10 @@ func (_m *RpcClient) ListActiveBigmapValues(ctx context.Context, bigmap int64, i func (_m *RpcClient) ListActiveDelegates(ctx context.Context, id rpc.BlockID) (rpc.DelegateList, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for ListActiveDelegates") + } + var r0 rpc.DelegateList var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (rpc.DelegateList, error)); ok { @@ -1736,6 +2024,10 @@ func (_m *RpcClient) ListActiveDelegates(ctx context.Context, id rpc.BlockID) (r func (_m *RpcClient) ListBakingRights(ctx context.Context, id rpc.BlockID, max int) ([]rpc.BakingRight, error) { ret := _m.Called(ctx, id, max) + if len(ret) == 0 { + panic("no return value specified for ListBakingRights") + } + var r0 []rpc.BakingRight var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int) ([]rpc.BakingRight, error)); ok { @@ -1762,6 +2054,10 @@ func (_m *RpcClient) ListBakingRights(ctx context.Context, id rpc.BlockID, max i func (_m *RpcClient) ListBakingRightsCycle(ctx context.Context, id rpc.BlockID, cycle int64, max int) ([]rpc.BakingRight, error) { ret := _m.Called(ctx, id, cycle, max) + if len(ret) == 0 { + panic("no return value specified for ListBakingRightsCycle") + } + var r0 []rpc.BakingRight var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int64, int) ([]rpc.BakingRight, error)); ok { @@ -1788,6 +2084,10 @@ func (_m *RpcClient) ListBakingRightsCycle(ctx context.Context, id rpc.BlockID, func (_m *RpcClient) ListBallots(ctx context.Context, id rpc.BlockID) (rpc.BallotList, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for ListBallots") + } + var r0 rpc.BallotList var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (rpc.BallotList, error)); ok { @@ -1814,6 +2114,10 @@ func (_m *RpcClient) ListBallots(ctx context.Context, id rpc.BlockID) (rpc.Ballo func (_m *RpcClient) ListBigmapKeys(ctx context.Context, bigmap int64, id rpc.BlockID) ([]tezos.ExprHash, error) { ret := _m.Called(ctx, bigmap, id) + if len(ret) == 0 { + panic("no return value specified for ListBigmapKeys") + } + var r0 []tezos.ExprHash var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, rpc.BlockID) ([]tezos.ExprHash, error)); ok { @@ -1840,6 +2144,10 @@ func (_m *RpcClient) ListBigmapKeys(ctx context.Context, bigmap int64, id rpc.Bl func (_m *RpcClient) ListBigmapValues(ctx context.Context, bigmap int64, id rpc.BlockID) ([]micheline.Prim, error) { ret := _m.Called(ctx, bigmap, id) + if len(ret) == 0 { + panic("no return value specified for ListBigmapValues") + } + var r0 []micheline.Prim var r1 error if rf, ok := ret.Get(0).(func(context.Context, int64, rpc.BlockID) ([]micheline.Prim, error)); ok { @@ -1866,6 +2174,10 @@ func (_m *RpcClient) ListBigmapValues(ctx context.Context, bigmap int64, id rpc. func (_m *RpcClient) ListContracts(ctx context.Context, id rpc.BlockID) (rpc.Contracts, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for ListContracts") + } + var r0 rpc.Contracts var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (rpc.Contracts, error)); ok { @@ -1892,6 +2204,10 @@ func (_m *RpcClient) ListContracts(ctx context.Context, id rpc.BlockID) (rpc.Con func (_m *RpcClient) ListEndorsingRights(ctx context.Context, id rpc.BlockID) ([]rpc.EndorsingRight, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for ListEndorsingRights") + } + var r0 []rpc.EndorsingRight var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) ([]rpc.EndorsingRight, error)); ok { @@ -1918,6 +2234,10 @@ func (_m *RpcClient) ListEndorsingRights(ctx context.Context, id rpc.BlockID) ([ func (_m *RpcClient) ListEndorsingRightsCycle(ctx context.Context, id rpc.BlockID, cycle int64) ([]rpc.EndorsingRight, error) { ret := _m.Called(ctx, id, cycle) + if len(ret) == 0 { + panic("no return value specified for ListEndorsingRightsCycle") + } + var r0 []rpc.EndorsingRight var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int64) ([]rpc.EndorsingRight, error)); ok { @@ -1944,6 +2264,10 @@ func (_m *RpcClient) ListEndorsingRightsCycle(ctx context.Context, id rpc.BlockI func (_m *RpcClient) ListProposals(ctx context.Context, id rpc.BlockID) (rpc.ProposalList, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for ListProposals") + } + var r0 rpc.ProposalList var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (rpc.ProposalList, error)); ok { @@ -1970,6 +2294,10 @@ func (_m *RpcClient) ListProposals(ctx context.Context, id rpc.BlockID) (rpc.Pro func (_m *RpcClient) ListSnapshotRollOwners(ctx context.Context, id rpc.BlockID, cycle int64, index int64) (*rpc.SnapshotOwners, error) { ret := _m.Called(ctx, id, cycle, index) + if len(ret) == 0 { + panic("no return value specified for ListSnapshotRollOwners") + } + var r0 *rpc.SnapshotOwners var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, int64, int64) (*rpc.SnapshotOwners, error)); ok { @@ -1996,6 +2324,10 @@ func (_m *RpcClient) ListSnapshotRollOwners(ctx context.Context, id rpc.BlockID, func (_m *RpcClient) ListVoters(ctx context.Context, id rpc.BlockID) (rpc.VoterList, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for ListVoters") + } + var r0 rpc.VoterList var r1 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID) (rpc.VoterList, error)); ok { @@ -2027,6 +2359,10 @@ func (_m *RpcClient) Listen() { func (_m *RpcClient) MonitorBlockHeader(ctx context.Context, monitor *rpc.BlockHeaderMonitor) error { ret := _m.Called(ctx, monitor) + if len(ret) == 0 { + panic("no return value specified for MonitorBlockHeader") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *rpc.BlockHeaderMonitor) error); ok { r0 = rf(ctx, monitor) @@ -2041,6 +2377,10 @@ func (_m *RpcClient) MonitorBlockHeader(ctx context.Context, monitor *rpc.BlockH func (_m *RpcClient) MonitorBootstrapped(ctx context.Context, monitor *rpc.BootstrapMonitor) error { ret := _m.Called(ctx, monitor) + if len(ret) == 0 { + panic("no return value specified for MonitorBootstrapped") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *rpc.BootstrapMonitor) error); ok { r0 = rf(ctx, monitor) @@ -2055,6 +2395,10 @@ func (_m *RpcClient) MonitorBootstrapped(ctx context.Context, monitor *rpc.Boots func (_m *RpcClient) MonitorMempool(ctx context.Context, monitor *rpc.MempoolMonitor) error { ret := _m.Called(ctx, monitor) + if len(ret) == 0 { + panic("no return value specified for MonitorMempool") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *rpc.MempoolMonitor) error); ok { r0 = rf(ctx, monitor) @@ -2069,6 +2413,10 @@ func (_m *RpcClient) MonitorMempool(ctx context.Context, monitor *rpc.MempoolMon func (_m *RpcClient) MonitorNetworkPeerLog(ctx context.Context, peerID string, monitor *rpc.NetworkPeerMonitor) error { ret := _m.Called(ctx, peerID, monitor) + if len(ret) == 0 { + panic("no return value specified for MonitorNetworkPeerLog") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *rpc.NetworkPeerMonitor) error); ok { r0 = rf(ctx, peerID, monitor) @@ -2083,6 +2431,10 @@ func (_m *RpcClient) MonitorNetworkPeerLog(ctx context.Context, peerID string, m func (_m *RpcClient) MonitorNetworkPointLog(ctx context.Context, address string, monitor *rpc.NetworkPointMonitor) error { ret := _m.Called(ctx, address, monitor) + if len(ret) == 0 { + panic("no return value specified for MonitorNetworkPointLog") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, *rpc.NetworkPointMonitor) error); ok { r0 = rf(ctx, address, monitor) @@ -2097,6 +2449,10 @@ func (_m *RpcClient) MonitorNetworkPointLog(ctx context.Context, address string, func (_m *RpcClient) NewRequest(ctx context.Context, method string, urlStr string, body interface{}) (*http.Request, error) { ret := _m.Called(ctx, method, urlStr, body) + if len(ret) == 0 { + panic("no return value specified for NewRequest") + } + var r0 *http.Request var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, interface{}) (*http.Request, error)); ok { @@ -2123,6 +2479,10 @@ func (_m *RpcClient) NewRequest(ctx context.Context, method string, urlStr strin func (_m *RpcClient) Post(ctx context.Context, urlpath string, body interface{}, result interface{}) error { ret := _m.Called(ctx, urlpath, body, result) + if len(ret) == 0 { + panic("no return value specified for Post") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, interface{}, interface{}) error); ok { r0 = rf(ctx, urlpath, body, result) @@ -2137,6 +2497,10 @@ func (_m *RpcClient) Post(ctx context.Context, urlpath string, body interface{}, func (_m *RpcClient) Put(ctx context.Context, urlpath string, body interface{}, result interface{}) error { ret := _m.Called(ctx, urlpath, body, result) + if len(ret) == 0 { + panic("no return value specified for Put") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, interface{}, interface{}) error); ok { r0 = rf(ctx, urlpath, body, result) @@ -2151,6 +2515,10 @@ func (_m *RpcClient) Put(ctx context.Context, urlpath string, body interface{}, func (_m *RpcClient) ResolveChainConfig(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for ResolveChainConfig") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -2165,6 +2533,10 @@ func (_m *RpcClient) ResolveChainConfig(ctx context.Context) error { func (_m *RpcClient) RunCallback(ctx context.Context, id rpc.BlockID, body interface{}, resp interface{}) error { ret := _m.Called(ctx, id, body, resp) + if len(ret) == 0 { + panic("no return value specified for RunCallback") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, interface{}, interface{}) error); ok { r0 = rf(ctx, id, body, resp) @@ -2179,6 +2551,10 @@ func (_m *RpcClient) RunCallback(ctx context.Context, id rpc.BlockID, body inter func (_m *RpcClient) RunCode(ctx context.Context, id rpc.BlockID, body interface{}, resp interface{}) error { ret := _m.Called(ctx, id, body, resp) + if len(ret) == 0 { + panic("no return value specified for RunCode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, interface{}, interface{}) error); ok { r0 = rf(ctx, id, body, resp) @@ -2193,6 +2569,10 @@ func (_m *RpcClient) RunCode(ctx context.Context, id rpc.BlockID, body interface func (_m *RpcClient) RunOperation(ctx context.Context, id rpc.BlockID, body interface{}, resp interface{}) error { ret := _m.Called(ctx, id, body, resp) + if len(ret) == 0 { + panic("no return value specified for RunOperation") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, interface{}, interface{}) error); ok { r0 = rf(ctx, id, body, resp) @@ -2207,6 +2587,10 @@ func (_m *RpcClient) RunOperation(ctx context.Context, id rpc.BlockID, body inte func (_m *RpcClient) RunView(ctx context.Context, id rpc.BlockID, body interface{}, resp interface{}) error { ret := _m.Called(ctx, id, body, resp) + if len(ret) == 0 { + panic("no return value specified for RunView") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, interface{}, interface{}) error); ok { r0 = rf(ctx, id, body, resp) @@ -2221,6 +2605,10 @@ func (_m *RpcClient) RunView(ctx context.Context, id rpc.BlockID, body interface func (_m *RpcClient) Send(ctx context.Context, op *codec.Op, opts *rpc.CallOptions) (*rpc.Receipt, error) { ret := _m.Called(ctx, op, opts) + if len(ret) == 0 { + panic("no return value specified for Send") + } + var r0 *rpc.Receipt var r1 error if rf, ok := ret.Get(0).(func(context.Context, *codec.Op, *rpc.CallOptions) (*rpc.Receipt, error)); ok { @@ -2247,6 +2635,10 @@ func (_m *RpcClient) Send(ctx context.Context, op *codec.Op, opts *rpc.CallOptio func (_m *RpcClient) Simulate(ctx context.Context, o *codec.Op, opts *rpc.CallOptions) (*rpc.Receipt, error) { ret := _m.Called(ctx, o, opts) + if len(ret) == 0 { + panic("no return value specified for Simulate") + } + var r0 *rpc.Receipt var r1 error if rf, ok := ret.Get(0).(func(context.Context, *codec.Op, *rpc.CallOptions) (*rpc.Receipt, error)); ok { @@ -2273,6 +2665,10 @@ func (_m *RpcClient) Simulate(ctx context.Context, o *codec.Op, opts *rpc.CallOp func (_m *RpcClient) TraceCode(ctx context.Context, id rpc.BlockID, body interface{}, resp interface{}) error { ret := _m.Called(ctx, id, body, resp) + if len(ret) == 0 { + panic("no return value specified for TraceCode") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, rpc.BlockID, interface{}, interface{}) error); ok { r0 = rf(ctx, id, body, resp) @@ -2287,6 +2683,10 @@ func (_m *RpcClient) TraceCode(ctx context.Context, id rpc.BlockID, body interfa func (_m *RpcClient) TrustNetworkPeer(ctx context.Context, peerID string) error { ret := _m.Called(ctx, peerID) + if len(ret) == 0 { + panic("no return value specified for TrustNetworkPeer") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, peerID) @@ -2301,6 +2701,10 @@ func (_m *RpcClient) TrustNetworkPeer(ctx context.Context, peerID string) error func (_m *RpcClient) TrustNetworkPoint(ctx context.Context, address string) error { ret := _m.Called(ctx, address) + if len(ret) == 0 { + panic("no return value specified for TrustNetworkPoint") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, address) @@ -2315,6 +2719,10 @@ func (_m *RpcClient) TrustNetworkPoint(ctx context.Context, address string) erro func (_m *RpcClient) UseIpfsUrl(uri string) error { ret := _m.Called(uri) + if len(ret) == 0 { + panic("no return value specified for UseIpfsUrl") + } + var r0 error if rf, ok := ret.Get(0).(func(string) error); ok { r0 = rf(uri) @@ -2329,6 +2737,10 @@ func (_m *RpcClient) UseIpfsUrl(uri string) error { func (_m *RpcClient) Validate(ctx context.Context, o *codec.Op) error { ret := _m.Called(ctx, o) + if len(ret) == 0 { + panic("no return value specified for Validate") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *codec.Op) error); ok { r0 = rf(ctx, o) @@ -2339,13 +2751,12 @@ func (_m *RpcClient) Validate(ctx context.Context, o *codec.Op) error { return r0 } -type mockConstructorTestingTNewRpcClient interface { +// NewRpcClient creates a new instance of RpcClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewRpcClient(t interface { mock.TestingT Cleanup(func()) -} - -// NewRpcClient creates a new instance of RpcClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -func NewRpcClient(t mockConstructorTestingTNewRpcClient) *RpcClient { +}) *RpcClient { mock := &RpcClient{} mock.Mock.Test(t)