From aae750d14fc1cbc6089f39606176b3f5cbe5f502 Mon Sep 17 00:00:00 2001 From: Artem Date: Wed, 28 Aug 2024 16:09:08 +0300 Subject: [PATCH] Feature: dusk-10 support --- .github/workflows/test.yml | 6 +- .golangci.yml | 1 - build/api/Dockerfile | 2 +- build/indexer/Dockerfile | 2 +- cmd/api/handler/responses/action.go | 23 +- go.mod | 6 +- go.sum | 9 +- internal/storage/action.go | 1 + internal/storage/fee.go | 37 + internal/storage/generic.go | 3 + internal/storage/mock/action.go | 158 ++-- internal/storage/mock/address.go | 130 ++-- internal/storage/mock/balance.go | 102 ++- internal/storage/mock/balance_update.go | 102 ++- internal/storage/mock/block.go | 186 +++-- internal/storage/mock/block_signature.go | 116 ++- internal/storage/mock/block_stats.go | 18 +- internal/storage/mock/bridge.go | 144 ++-- internal/storage/mock/constant.go | 60 +- internal/storage/mock/generic.go | 841 +++++++++++---------- internal/storage/mock/rollup.go | 214 +++--- internal/storage/mock/state.go | 116 ++- internal/storage/mock/stats.go | 60 +- internal/storage/mock/tx.go | 158 ++-- internal/storage/mock/validator.go | 102 ++- internal/storage/postgres/action.go | 19 +- internal/storage/postgres/action_test.go | 4 + internal/storage/postgres/core.go | 2 + internal/storage/postgres/fee.go | 22 + internal/storage/postgres/index.go | 29 + internal/storage/postgres/transaction.go | 17 + internal/storage/rollup.go | 3 +- internal/storage/types/action_type_enum.go | 3 - internal/storage/types/module_enum.go | 3 - internal/storage/types/status_enum.go | 3 - pkg/indexer/decode/actions.go | 55 +- pkg/indexer/decode/context.go | 7 + pkg/indexer/genesis/constant.go | 14 +- pkg/indexer/genesis/genesis_test.go | 41 +- pkg/indexer/parser/parse.go | 11 +- pkg/indexer/parser/parseEvents.go | 58 ++ pkg/indexer/parser/parseTxs.go | 4 + pkg/indexer/parser/parseTxs_test.go | 18 +- pkg/indexer/rollback/rollback.go | 4 + pkg/indexer/rollback/rollback_test.go | 6 + pkg/indexer/storage/action.go | 17 + pkg/indexer/storage/storage.go | 2 +- pkg/node/mock/api.go | 102 ++- pkg/node/types/genesis.go | 36 +- test/data/fee.yml | 8 + test/json/genesis.json | 76 +- 51 files changed, 1787 insertions(+), 1374 deletions(-) create mode 100644 internal/storage/fee.go create mode 100644 internal/storage/postgres/fee.go create mode 100644 pkg/indexer/parser/parseEvents.go create mode 100644 test/data/fee.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0b73e7e..86d81b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,12 +12,12 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.22.4' + go-version: '1.23' cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.57.2 + version: v1.60.3 args: --timeout=5m test: name: Test @@ -29,7 +29,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: 1.22.x + go-version: 1.23.x - name: Golang tests env: GO111MODULE: on diff --git a/.golangci.yml b/.golangci.yml index f8cee7e..a8e6abd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,7 +16,6 @@ linters: - tagalign - zerologlint - copyloopvar - - gosec - misspell - noctx - prealloc diff --git a/build/api/Dockerfile b/build/api/Dockerfile index 18c7f23..0c2bb1d 100644 --- a/build/api/Dockerfile +++ b/build/api/Dockerfile @@ -1,7 +1,7 @@ # --------------------------------------------------------------------- # The first stage container, for building the application # --------------------------------------------------------------------- -FROM golang:1.22.4-alpine as builder +FROM golang:1.23-alpine as builder ENV CGO_ENABLED=0 ENV GO111MODULE=on diff --git a/build/indexer/Dockerfile b/build/indexer/Dockerfile index bc655b5..d0142b9 100644 --- a/build/indexer/Dockerfile +++ b/build/indexer/Dockerfile @@ -1,7 +1,7 @@ # --------------------------------------------------------------------- # The first stage container, for building the application # --------------------------------------------------------------------- -FROM golang:1.22.4-alpine as builder +FROM golang:1.23-alpine as builder ENV CGO_ENABLED=0 ENV GO111MODULE=on diff --git a/cmd/api/handler/responses/action.go b/cmd/api/handler/responses/action.go index f1d116a..d27abe5 100644 --- a/cmd/api/handler/responses/action.go +++ b/cmd/api/handler/responses/action.go @@ -20,18 +20,37 @@ type Action struct { Type types.ActionType `example:"sequence" format:"string" json:"type" swaggertype:"string"` TxHash string `example:"652452A670018D629CC116E510BA88C1CABE061336661B1F3D206D248BD558AF" format:"binary" json:"tx_hash,omitempty" swaggertype:"string"` + Fee *Fee `json:"fee,omitempty"` Data map[string]any `json:"data"` } +type Fee struct { + Amount string `example:"1000" format:"string" json:"amount" swaggertype:"string"` + Asset string `example:"nria" format:"string" json:"asset" swaggertype:"string"` +} + +func NewFee(fee *storage.Fee) *Fee { + if fee == nil { + return nil + } + return &Fee{ + Amount: fee.Amount.String(), + Asset: fee.Asset, + } +} + func NewAction(action storage.Action) Action { - return Action{ + result := Action{ Id: action.Id, Height: action.Height, Time: action.Time, Position: action.Position, Type: action.Type, Data: action.Data, + Fee: NewFee(action.Fee), } + + return result } func NewActionWithTx(action storage.ActionWithTx) Action { @@ -42,6 +61,7 @@ func NewActionWithTx(action storage.ActionWithTx) Action { Position: action.Position, Type: action.Type, Data: action.Data, + Fee: NewFee(action.Fee), } if action.Tx != nil { @@ -65,6 +85,7 @@ func NewAddressAction(action storage.AddressAction) Action { if action.Action != nil { result.Data = action.Action.Data result.Position = action.Action.Position + result.Fee = NewFee(action.Action.Fee) } return result diff --git a/go.mod b/go.mod index c55174b..a194219 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/celenium-io/astria-indexer -go 1.22.4 +go 1.23 require ( buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240626163506-691883836b9e.2 @@ -15,7 +15,7 @@ require ( github.com/go-testfixtures/testfixtures/v3 v3.9.0 github.com/goccy/go-json v0.10.2 github.com/gorilla/websocket v1.5.1 - github.com/grafana/pyroscope-go v1.1.1 + github.com/grafana/pyroscope-go v1.1.2 github.com/json-iterator/go v1.1.12 github.com/labstack/echo-contrib v0.15.0 github.com/labstack/echo/v4 v4.11.4 @@ -85,7 +85,7 @@ require ( github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grafana/pyroscope-go/godeltaprof v0.1.6 // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect diff --git a/go.sum b/go.sum index 39ac60f..d451e11 100644 --- a/go.sum +++ b/go.sum @@ -181,10 +181,10 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= -github.com/grafana/pyroscope-go v1.1.1 h1:PQoUU9oWtO3ve/fgIiklYuGilvsm8qaGhlY4Vw6MAcQ= -github.com/grafana/pyroscope-go v1.1.1/go.mod h1:Mw26jU7jsL/KStNSGGuuVYdUq7Qghem5P8aXYXSXG88= -github.com/grafana/pyroscope-go/godeltaprof v0.1.6 h1:nEdZ8louGAplSvIJi1HVp7kWvFvdiiYg3COLlTwJiFo= -github.com/grafana/pyroscope-go/godeltaprof v0.1.6/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= +github.com/grafana/pyroscope-go v1.1.2 h1:7vCfdORYQMCxIzI3NlYAs3FcBP760+gWuYWOyiVyYx8= +github.com/grafana/pyroscope-go v1.1.2/go.mod h1:HSSmHo2KRn6FasBA4vK7BMiQqyQq8KSuBKvrhkXxYPU= +github.com/grafana/pyroscope-go/godeltaprof v0.1.8 h1:iwOtYXeeVSAeYefJNaxDytgjKtUuKQbJqgAIjlnicKg= +github.com/grafana/pyroscope-go/godeltaprof v0.1.8/go.mod h1:2+l7K7twW49Ct4wFluZD3tZ6e0SjanjcUUBPVD/UuGU= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -223,7 +223,6 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= diff --git a/internal/storage/action.go b/internal/storage/action.go index 1dfffb3..8d6ac92 100644 --- a/internal/storage/action.go +++ b/internal/storage/action.go @@ -54,6 +54,7 @@ type Action struct { Addresses []*AddressAction `bun:"-"` BalanceUpdates []BalanceUpdate `bun:"-"` RollupAction *RollupAction `bun:"-"` + Fee *Fee `bun:"rel:has-one,join:id=action_id"` } // TableName - diff --git a/internal/storage/fee.go b/internal/storage/fee.go new file mode 100644 index 0000000..24817ee --- /dev/null +++ b/internal/storage/fee.go @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + +package storage + +import ( + "time" + + pkgTypes "github.com/celenium-io/astria-indexer/pkg/types" + "github.com/dipdup-net/indexer-sdk/pkg/storage" + "github.com/shopspring/decimal" + "github.com/uptrace/bun" +) + +type IFee interface { + storage.Table[*Fee] +} + +type Fee struct { + bun.BaseModel `bun:"table:fee" comment:"Table with fees"` + + Id uint64 `bun:"id,pk,notnull,autoincrement" comment:"Unique internal identity"` + Height pkgTypes.Level `bun:"height,notnull" comment:"The number (height) of this block"` + Time time.Time `bun:"time,pk,notnull" comment:"The time of block"` + Asset string `bun:"asset" comment:"Fee asset"` + Amount decimal.Decimal `bun:"amount,type:numeric" comment:"Fee amount"` + ActionId uint64 `bun:"action_id" comment:"Connected action id"` + TxId uint64 `bun:"tx_id" comment:"Connected transaction id"` + PayerId uint64 `bun:"payer_id" comment:"Who paid fee"` + + ActionType string `bun:"-"` + Payer *Address `bun:"rel:belongs-to"` +} + +func (Fee) TableName() string { + return "fee" +} diff --git a/internal/storage/generic.go b/internal/storage/generic.go index 03b08a8..3e363f0 100644 --- a/internal/storage/generic.go +++ b/internal/storage/generic.go @@ -35,6 +35,7 @@ var Models = []any{ &AddressAction{}, &BlockSignature{}, &Bridge{}, + &Fee{}, } //go:generate mockgen -source=$GOFILE -destination=mock/$GOFILE -package=mock -typed @@ -54,6 +55,7 @@ type Transaction interface { SaveRollups(ctx context.Context, rollups ...*Rollup) (int64, error) SaveTransactions(ctx context.Context, txs ...*Tx) error SaveValidators(ctx context.Context, validators ...*Validator) error + SaveFees(ctx context.Context, fees ...*Fee) error RetentionBlockSignatures(ctx context.Context, height types.Level) error RollbackActions(ctx context.Context, height types.Level) (actions []Action, err error) @@ -70,6 +72,7 @@ type Transaction interface { RollbackRollups(ctx context.Context, height types.Level) ([]Rollup, error) RollbackTxs(ctx context.Context, height types.Level) (txs []Tx, err error) RollbackValidators(ctx context.Context, height types.Level) (err error) + RollbackFees(ctx context.Context, height types.Level) (err error) UpdateAddresses(ctx context.Context, address ...*Address) error UpdateConstants(ctx context.Context, constants ...*Constant) error UpdateRollups(ctx context.Context, rollups ...*Rollup) error diff --git a/internal/storage/mock/action.go b/internal/storage/mock/action.go index fc104b6..9268159 100644 --- a/internal/storage/mock/action.go +++ b/internal/storage/mock/action.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: action.go // @@ -8,6 +5,7 @@ // // mockgen -source=action.go -destination=mock/action.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -54,31 +52,31 @@ func (m *MockIAction) ByAddress(ctx context.Context, addressId uint64, filters s } // ByAddress indicates an expected call of ByAddress. -func (mr *MockIActionMockRecorder) ByAddress(ctx, addressId, filters any) *IActionByAddressCall { +func (mr *MockIActionMockRecorder) ByAddress(ctx, addressId, filters any) *MockIActionByAddressCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByAddress", reflect.TypeOf((*MockIAction)(nil).ByAddress), ctx, addressId, filters) - return &IActionByAddressCall{Call: call} + return &MockIActionByAddressCall{Call: call} } -// IActionByAddressCall wrap *gomock.Call -type IActionByAddressCall struct { +// MockIActionByAddressCall wrap *gomock.Call +type MockIActionByAddressCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionByAddressCall) Return(arg0 []storage.AddressAction, arg1 error) *IActionByAddressCall { +func (c *MockIActionByAddressCall) Return(arg0 []storage.AddressAction, arg1 error) *MockIActionByAddressCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IActionByAddressCall) Do(f func(context.Context, uint64, storage.AddressActionsFilter) ([]storage.AddressAction, error)) *IActionByAddressCall { +func (c *MockIActionByAddressCall) Do(f func(context.Context, uint64, storage.AddressActionsFilter) ([]storage.AddressAction, error)) *MockIActionByAddressCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionByAddressCall) DoAndReturn(f func(context.Context, uint64, storage.AddressActionsFilter) ([]storage.AddressAction, error)) *IActionByAddressCall { +func (c *MockIActionByAddressCall) DoAndReturn(f func(context.Context, uint64, storage.AddressActionsFilter) ([]storage.AddressAction, error)) *MockIActionByAddressCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -93,31 +91,31 @@ func (m *MockIAction) ByBlock(ctx context.Context, height types.Level, limit, of } // ByBlock indicates an expected call of ByBlock. -func (mr *MockIActionMockRecorder) ByBlock(ctx, height, limit, offset any) *IActionByBlockCall { +func (mr *MockIActionMockRecorder) ByBlock(ctx, height, limit, offset any) *MockIActionByBlockCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlock", reflect.TypeOf((*MockIAction)(nil).ByBlock), ctx, height, limit, offset) - return &IActionByBlockCall{Call: call} + return &MockIActionByBlockCall{Call: call} } -// IActionByBlockCall wrap *gomock.Call -type IActionByBlockCall struct { +// MockIActionByBlockCall wrap *gomock.Call +type MockIActionByBlockCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionByBlockCall) Return(arg0 []storage.ActionWithTx, arg1 error) *IActionByBlockCall { +func (c *MockIActionByBlockCall) Return(arg0 []storage.ActionWithTx, arg1 error) *MockIActionByBlockCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IActionByBlockCall) Do(f func(context.Context, types.Level, int, int) ([]storage.ActionWithTx, error)) *IActionByBlockCall { +func (c *MockIActionByBlockCall) Do(f func(context.Context, types.Level, int, int) ([]storage.ActionWithTx, error)) *MockIActionByBlockCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionByBlockCall) DoAndReturn(f func(context.Context, types.Level, int, int) ([]storage.ActionWithTx, error)) *IActionByBlockCall { +func (c *MockIActionByBlockCall) DoAndReturn(f func(context.Context, types.Level, int, int) ([]storage.ActionWithTx, error)) *MockIActionByBlockCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -132,31 +130,31 @@ func (m *MockIAction) ByRollup(ctx context.Context, rollupId uint64, limit, offs } // ByRollup indicates an expected call of ByRollup. -func (mr *MockIActionMockRecorder) ByRollup(ctx, rollupId, limit, offset, sort any) *IActionByRollupCall { +func (mr *MockIActionMockRecorder) ByRollup(ctx, rollupId, limit, offset, sort any) *MockIActionByRollupCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByRollup", reflect.TypeOf((*MockIAction)(nil).ByRollup), ctx, rollupId, limit, offset, sort) - return &IActionByRollupCall{Call: call} + return &MockIActionByRollupCall{Call: call} } -// IActionByRollupCall wrap *gomock.Call -type IActionByRollupCall struct { +// MockIActionByRollupCall wrap *gomock.Call +type MockIActionByRollupCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionByRollupCall) Return(arg0 []storage.RollupAction, arg1 error) *IActionByRollupCall { +func (c *MockIActionByRollupCall) Return(arg0 []storage.RollupAction, arg1 error) *MockIActionByRollupCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IActionByRollupCall) Do(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAction, error)) *IActionByRollupCall { +func (c *MockIActionByRollupCall) Do(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAction, error)) *MockIActionByRollupCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionByRollupCall) DoAndReturn(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAction, error)) *IActionByRollupCall { +func (c *MockIActionByRollupCall) DoAndReturn(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAction, error)) *MockIActionByRollupCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -171,31 +169,31 @@ func (m *MockIAction) ByTxId(ctx context.Context, txId uint64, limit, offset int } // ByTxId indicates an expected call of ByTxId. -func (mr *MockIActionMockRecorder) ByTxId(ctx, txId, limit, offset any) *IActionByTxIdCall { +func (mr *MockIActionMockRecorder) ByTxId(ctx, txId, limit, offset any) *MockIActionByTxIdCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByTxId", reflect.TypeOf((*MockIAction)(nil).ByTxId), ctx, txId, limit, offset) - return &IActionByTxIdCall{Call: call} + return &MockIActionByTxIdCall{Call: call} } -// IActionByTxIdCall wrap *gomock.Call -type IActionByTxIdCall struct { +// MockIActionByTxIdCall wrap *gomock.Call +type MockIActionByTxIdCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionByTxIdCall) Return(arg0 []storage.Action, arg1 error) *IActionByTxIdCall { +func (c *MockIActionByTxIdCall) Return(arg0 []storage.Action, arg1 error) *MockIActionByTxIdCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IActionByTxIdCall) Do(f func(context.Context, uint64, int, int) ([]storage.Action, error)) *IActionByTxIdCall { +func (c *MockIActionByTxIdCall) Do(f func(context.Context, uint64, int, int) ([]storage.Action, error)) *MockIActionByTxIdCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionByTxIdCall) DoAndReturn(f func(context.Context, uint64, int, int) ([]storage.Action, error)) *IActionByTxIdCall { +func (c *MockIActionByTxIdCall) DoAndReturn(f func(context.Context, uint64, int, int) ([]storage.Action, error)) *MockIActionByTxIdCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -210,31 +208,31 @@ func (m *MockIAction) CursorList(ctx context.Context, id, limit uint64, order st } // CursorList indicates an expected call of CursorList. -func (mr *MockIActionMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IActionCursorListCall { +func (mr *MockIActionMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIActionCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIAction)(nil).CursorList), ctx, id, limit, order, cmp) - return &IActionCursorListCall{Call: call} + return &MockIActionCursorListCall{Call: call} } -// IActionCursorListCall wrap *gomock.Call -type IActionCursorListCall struct { +// MockIActionCursorListCall wrap *gomock.Call +type MockIActionCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionCursorListCall) Return(arg0 []*storage.Action, arg1 error) *IActionCursorListCall { +func (c *MockIActionCursorListCall) Return(arg0 []*storage.Action, arg1 error) *MockIActionCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IActionCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Action, error)) *IActionCursorListCall { +func (c *MockIActionCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Action, error)) *MockIActionCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Action, error)) *IActionCursorListCall { +func (c *MockIActionCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Action, error)) *MockIActionCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -249,31 +247,31 @@ func (m *MockIAction) GetByID(ctx context.Context, id uint64) (*storage.Action, } // GetByID indicates an expected call of GetByID. -func (mr *MockIActionMockRecorder) GetByID(ctx, id any) *IActionGetByIDCall { +func (mr *MockIActionMockRecorder) GetByID(ctx, id any) *MockIActionGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIAction)(nil).GetByID), ctx, id) - return &IActionGetByIDCall{Call: call} + return &MockIActionGetByIDCall{Call: call} } -// IActionGetByIDCall wrap *gomock.Call -type IActionGetByIDCall struct { +// MockIActionGetByIDCall wrap *gomock.Call +type MockIActionGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionGetByIDCall) Return(arg0 *storage.Action, arg1 error) *IActionGetByIDCall { +func (c *MockIActionGetByIDCall) Return(arg0 *storage.Action, arg1 error) *MockIActionGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IActionGetByIDCall) Do(f func(context.Context, uint64) (*storage.Action, error)) *IActionGetByIDCall { +func (c *MockIActionGetByIDCall) Do(f func(context.Context, uint64) (*storage.Action, error)) *MockIActionGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Action, error)) *IActionGetByIDCall { +func (c *MockIActionGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Action, error)) *MockIActionGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -287,31 +285,31 @@ func (m *MockIAction) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIActionMockRecorder) IsNoRows(err any) *IActionIsNoRowsCall { +func (mr *MockIActionMockRecorder) IsNoRows(err any) *MockIActionIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIAction)(nil).IsNoRows), err) - return &IActionIsNoRowsCall{Call: call} + return &MockIActionIsNoRowsCall{Call: call} } -// IActionIsNoRowsCall wrap *gomock.Call -type IActionIsNoRowsCall struct { +// MockIActionIsNoRowsCall wrap *gomock.Call +type MockIActionIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionIsNoRowsCall) Return(arg0 bool) *IActionIsNoRowsCall { +func (c *MockIActionIsNoRowsCall) Return(arg0 bool) *MockIActionIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IActionIsNoRowsCall) Do(f func(error) bool) *IActionIsNoRowsCall { +func (c *MockIActionIsNoRowsCall) Do(f func(error) bool) *MockIActionIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionIsNoRowsCall) DoAndReturn(f func(error) bool) *IActionIsNoRowsCall { +func (c *MockIActionIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIActionIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -326,31 +324,31 @@ func (m *MockIAction) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIActionMockRecorder) LastID(ctx any) *IActionLastIDCall { +func (mr *MockIActionMockRecorder) LastID(ctx any) *MockIActionLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIAction)(nil).LastID), ctx) - return &IActionLastIDCall{Call: call} + return &MockIActionLastIDCall{Call: call} } -// IActionLastIDCall wrap *gomock.Call -type IActionLastIDCall struct { +// MockIActionLastIDCall wrap *gomock.Call +type MockIActionLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionLastIDCall) Return(arg0 uint64, arg1 error) *IActionLastIDCall { +func (c *MockIActionLastIDCall) Return(arg0 uint64, arg1 error) *MockIActionLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IActionLastIDCall) Do(f func(context.Context) (uint64, error)) *IActionLastIDCall { +func (c *MockIActionLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIActionLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IActionLastIDCall { +func (c *MockIActionLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIActionLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -365,31 +363,31 @@ func (m *MockIAction) List(ctx context.Context, limit, offset uint64, order stor } // List indicates an expected call of List. -func (mr *MockIActionMockRecorder) List(ctx, limit, offset, order any) *IActionListCall { +func (mr *MockIActionMockRecorder) List(ctx, limit, offset, order any) *MockIActionListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIAction)(nil).List), ctx, limit, offset, order) - return &IActionListCall{Call: call} + return &MockIActionListCall{Call: call} } -// IActionListCall wrap *gomock.Call -type IActionListCall struct { +// MockIActionListCall wrap *gomock.Call +type MockIActionListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionListCall) Return(arg0 []*storage.Action, arg1 error) *IActionListCall { +func (c *MockIActionListCall) Return(arg0 []*storage.Action, arg1 error) *MockIActionListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IActionListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Action, error)) *IActionListCall { +func (c *MockIActionListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Action, error)) *MockIActionListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Action, error)) *IActionListCall { +func (c *MockIActionListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Action, error)) *MockIActionListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -403,31 +401,31 @@ func (m_2 *MockIAction) Save(ctx context.Context, m *storage.Action) error { } // Save indicates an expected call of Save. -func (mr *MockIActionMockRecorder) Save(ctx, m any) *IActionSaveCall { +func (mr *MockIActionMockRecorder) Save(ctx, m any) *MockIActionSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIAction)(nil).Save), ctx, m) - return &IActionSaveCall{Call: call} + return &MockIActionSaveCall{Call: call} } -// IActionSaveCall wrap *gomock.Call -type IActionSaveCall struct { +// MockIActionSaveCall wrap *gomock.Call +type MockIActionSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionSaveCall) Return(arg0 error) *IActionSaveCall { +func (c *MockIActionSaveCall) Return(arg0 error) *MockIActionSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IActionSaveCall) Do(f func(context.Context, *storage.Action) error) *IActionSaveCall { +func (c *MockIActionSaveCall) Do(f func(context.Context, *storage.Action) error) *MockIActionSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionSaveCall) DoAndReturn(f func(context.Context, *storage.Action) error) *IActionSaveCall { +func (c *MockIActionSaveCall) DoAndReturn(f func(context.Context, *storage.Action) error) *MockIActionSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -441,31 +439,31 @@ func (m_2 *MockIAction) Update(ctx context.Context, m *storage.Action) error { } // Update indicates an expected call of Update. -func (mr *MockIActionMockRecorder) Update(ctx, m any) *IActionUpdateCall { +func (mr *MockIActionMockRecorder) Update(ctx, m any) *MockIActionUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIAction)(nil).Update), ctx, m) - return &IActionUpdateCall{Call: call} + return &MockIActionUpdateCall{Call: call} } -// IActionUpdateCall wrap *gomock.Call -type IActionUpdateCall struct { +// MockIActionUpdateCall wrap *gomock.Call +type MockIActionUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IActionUpdateCall) Return(arg0 error) *IActionUpdateCall { +func (c *MockIActionUpdateCall) Return(arg0 error) *MockIActionUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IActionUpdateCall) Do(f func(context.Context, *storage.Action) error) *IActionUpdateCall { +func (c *MockIActionUpdateCall) Do(f func(context.Context, *storage.Action) error) *MockIActionUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IActionUpdateCall) DoAndReturn(f func(context.Context, *storage.Action) error) *IActionUpdateCall { +func (c *MockIActionUpdateCall) DoAndReturn(f func(context.Context, *storage.Action) error) *MockIActionUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/address.go b/internal/storage/mock/address.go index 63494bf..db9d8f3 100644 --- a/internal/storage/mock/address.go +++ b/internal/storage/mock/address.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: address.go // @@ -8,6 +5,7 @@ // // mockgen -source=address.go -destination=mock/address.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockIAddress) ByHash(ctx context.Context, hash string) (storage.Address } // ByHash indicates an expected call of ByHash. -func (mr *MockIAddressMockRecorder) ByHash(ctx, hash any) *IAddressByHashCall { +func (mr *MockIAddressMockRecorder) ByHash(ctx, hash any) *MockIAddressByHashCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHash", reflect.TypeOf((*MockIAddress)(nil).ByHash), ctx, hash) - return &IAddressByHashCall{Call: call} + return &MockIAddressByHashCall{Call: call} } -// IAddressByHashCall wrap *gomock.Call -type IAddressByHashCall struct { +// MockIAddressByHashCall wrap *gomock.Call +type MockIAddressByHashCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressByHashCall) Return(arg0 storage.Address, arg1 error) *IAddressByHashCall { +func (c *MockIAddressByHashCall) Return(arg0 storage.Address, arg1 error) *MockIAddressByHashCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressByHashCall) Do(f func(context.Context, string) (storage.Address, error)) *IAddressByHashCall { +func (c *MockIAddressByHashCall) Do(f func(context.Context, string) (storage.Address, error)) *MockIAddressByHashCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressByHashCall) DoAndReturn(f func(context.Context, string) (storage.Address, error)) *IAddressByHashCall { +func (c *MockIAddressByHashCall) DoAndReturn(f func(context.Context, string) (storage.Address, error)) *MockIAddressByHashCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +90,31 @@ func (m *MockIAddress) CursorList(ctx context.Context, id, limit uint64, order s } // CursorList indicates an expected call of CursorList. -func (mr *MockIAddressMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IAddressCursorListCall { +func (mr *MockIAddressMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIAddressCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIAddress)(nil).CursorList), ctx, id, limit, order, cmp) - return &IAddressCursorListCall{Call: call} + return &MockIAddressCursorListCall{Call: call} } -// IAddressCursorListCall wrap *gomock.Call -type IAddressCursorListCall struct { +// MockIAddressCursorListCall wrap *gomock.Call +type MockIAddressCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressCursorListCall) Return(arg0 []*storage.Address, arg1 error) *IAddressCursorListCall { +func (c *MockIAddressCursorListCall) Return(arg0 []*storage.Address, arg1 error) *MockIAddressCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Address, error)) *IAddressCursorListCall { +func (c *MockIAddressCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Address, error)) *MockIAddressCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Address, error)) *IAddressCursorListCall { +func (c *MockIAddressCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Address, error)) *MockIAddressCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,31 +129,31 @@ func (m *MockIAddress) GetByID(ctx context.Context, id uint64) (*storage.Address } // GetByID indicates an expected call of GetByID. -func (mr *MockIAddressMockRecorder) GetByID(ctx, id any) *IAddressGetByIDCall { +func (mr *MockIAddressMockRecorder) GetByID(ctx, id any) *MockIAddressGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIAddress)(nil).GetByID), ctx, id) - return &IAddressGetByIDCall{Call: call} + return &MockIAddressGetByIDCall{Call: call} } -// IAddressGetByIDCall wrap *gomock.Call -type IAddressGetByIDCall struct { +// MockIAddressGetByIDCall wrap *gomock.Call +type MockIAddressGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressGetByIDCall) Return(arg0 *storage.Address, arg1 error) *IAddressGetByIDCall { +func (c *MockIAddressGetByIDCall) Return(arg0 *storage.Address, arg1 error) *MockIAddressGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressGetByIDCall) Do(f func(context.Context, uint64) (*storage.Address, error)) *IAddressGetByIDCall { +func (c *MockIAddressGetByIDCall) Do(f func(context.Context, uint64) (*storage.Address, error)) *MockIAddressGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Address, error)) *IAddressGetByIDCall { +func (c *MockIAddressGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Address, error)) *MockIAddressGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +167,31 @@ func (m *MockIAddress) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIAddressMockRecorder) IsNoRows(err any) *IAddressIsNoRowsCall { +func (mr *MockIAddressMockRecorder) IsNoRows(err any) *MockIAddressIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIAddress)(nil).IsNoRows), err) - return &IAddressIsNoRowsCall{Call: call} + return &MockIAddressIsNoRowsCall{Call: call} } -// IAddressIsNoRowsCall wrap *gomock.Call -type IAddressIsNoRowsCall struct { +// MockIAddressIsNoRowsCall wrap *gomock.Call +type MockIAddressIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressIsNoRowsCall) Return(arg0 bool) *IAddressIsNoRowsCall { +func (c *MockIAddressIsNoRowsCall) Return(arg0 bool) *MockIAddressIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressIsNoRowsCall) Do(f func(error) bool) *IAddressIsNoRowsCall { +func (c *MockIAddressIsNoRowsCall) Do(f func(error) bool) *MockIAddressIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressIsNoRowsCall) DoAndReturn(f func(error) bool) *IAddressIsNoRowsCall { +func (c *MockIAddressIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIAddressIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -208,31 +206,31 @@ func (m *MockIAddress) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIAddressMockRecorder) LastID(ctx any) *IAddressLastIDCall { +func (mr *MockIAddressMockRecorder) LastID(ctx any) *MockIAddressLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIAddress)(nil).LastID), ctx) - return &IAddressLastIDCall{Call: call} + return &MockIAddressLastIDCall{Call: call} } -// IAddressLastIDCall wrap *gomock.Call -type IAddressLastIDCall struct { +// MockIAddressLastIDCall wrap *gomock.Call +type MockIAddressLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressLastIDCall) Return(arg0 uint64, arg1 error) *IAddressLastIDCall { +func (c *MockIAddressLastIDCall) Return(arg0 uint64, arg1 error) *MockIAddressLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressLastIDCall) Do(f func(context.Context) (uint64, error)) *IAddressLastIDCall { +func (c *MockIAddressLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIAddressLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IAddressLastIDCall { +func (c *MockIAddressLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIAddressLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -247,31 +245,31 @@ func (m *MockIAddress) List(ctx context.Context, limit, offset uint64, order sto } // List indicates an expected call of List. -func (mr *MockIAddressMockRecorder) List(ctx, limit, offset, order any) *IAddressListCall { +func (mr *MockIAddressMockRecorder) List(ctx, limit, offset, order any) *MockIAddressListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIAddress)(nil).List), ctx, limit, offset, order) - return &IAddressListCall{Call: call} + return &MockIAddressListCall{Call: call} } -// IAddressListCall wrap *gomock.Call -type IAddressListCall struct { +// MockIAddressListCall wrap *gomock.Call +type MockIAddressListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressListCall) Return(arg0 []*storage.Address, arg1 error) *IAddressListCall { +func (c *MockIAddressListCall) Return(arg0 []*storage.Address, arg1 error) *MockIAddressListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Address, error)) *IAddressListCall { +func (c *MockIAddressListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Address, error)) *MockIAddressListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Address, error)) *IAddressListCall { +func (c *MockIAddressListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Address, error)) *MockIAddressListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -286,31 +284,31 @@ func (m *MockIAddress) ListWithBalance(ctx context.Context, fltrs storage.Addres } // ListWithBalance indicates an expected call of ListWithBalance. -func (mr *MockIAddressMockRecorder) ListWithBalance(ctx, fltrs any) *IAddressListWithBalanceCall { +func (mr *MockIAddressMockRecorder) ListWithBalance(ctx, fltrs any) *MockIAddressListWithBalanceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListWithBalance", reflect.TypeOf((*MockIAddress)(nil).ListWithBalance), ctx, fltrs) - return &IAddressListWithBalanceCall{Call: call} + return &MockIAddressListWithBalanceCall{Call: call} } -// IAddressListWithBalanceCall wrap *gomock.Call -type IAddressListWithBalanceCall struct { +// MockIAddressListWithBalanceCall wrap *gomock.Call +type MockIAddressListWithBalanceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressListWithBalanceCall) Return(arg0 []storage.Address, arg1 error) *IAddressListWithBalanceCall { +func (c *MockIAddressListWithBalanceCall) Return(arg0 []storage.Address, arg1 error) *MockIAddressListWithBalanceCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressListWithBalanceCall) Do(f func(context.Context, storage.AddressListFilter) ([]storage.Address, error)) *IAddressListWithBalanceCall { +func (c *MockIAddressListWithBalanceCall) Do(f func(context.Context, storage.AddressListFilter) ([]storage.Address, error)) *MockIAddressListWithBalanceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressListWithBalanceCall) DoAndReturn(f func(context.Context, storage.AddressListFilter) ([]storage.Address, error)) *IAddressListWithBalanceCall { +func (c *MockIAddressListWithBalanceCall) DoAndReturn(f func(context.Context, storage.AddressListFilter) ([]storage.Address, error)) *MockIAddressListWithBalanceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -324,31 +322,31 @@ func (m_2 *MockIAddress) Save(ctx context.Context, m *storage.Address) error { } // Save indicates an expected call of Save. -func (mr *MockIAddressMockRecorder) Save(ctx, m any) *IAddressSaveCall { +func (mr *MockIAddressMockRecorder) Save(ctx, m any) *MockIAddressSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIAddress)(nil).Save), ctx, m) - return &IAddressSaveCall{Call: call} + return &MockIAddressSaveCall{Call: call} } -// IAddressSaveCall wrap *gomock.Call -type IAddressSaveCall struct { +// MockIAddressSaveCall wrap *gomock.Call +type MockIAddressSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressSaveCall) Return(arg0 error) *IAddressSaveCall { +func (c *MockIAddressSaveCall) Return(arg0 error) *MockIAddressSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressSaveCall) Do(f func(context.Context, *storage.Address) error) *IAddressSaveCall { +func (c *MockIAddressSaveCall) Do(f func(context.Context, *storage.Address) error) *MockIAddressSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressSaveCall) DoAndReturn(f func(context.Context, *storage.Address) error) *IAddressSaveCall { +func (c *MockIAddressSaveCall) DoAndReturn(f func(context.Context, *storage.Address) error) *MockIAddressSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -362,31 +360,31 @@ func (m_2 *MockIAddress) Update(ctx context.Context, m *storage.Address) error { } // Update indicates an expected call of Update. -func (mr *MockIAddressMockRecorder) Update(ctx, m any) *IAddressUpdateCall { +func (mr *MockIAddressMockRecorder) Update(ctx, m any) *MockIAddressUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIAddress)(nil).Update), ctx, m) - return &IAddressUpdateCall{Call: call} + return &MockIAddressUpdateCall{Call: call} } -// IAddressUpdateCall wrap *gomock.Call -type IAddressUpdateCall struct { +// MockIAddressUpdateCall wrap *gomock.Call +type MockIAddressUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IAddressUpdateCall) Return(arg0 error) *IAddressUpdateCall { +func (c *MockIAddressUpdateCall) Return(arg0 error) *MockIAddressUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IAddressUpdateCall) Do(f func(context.Context, *storage.Address) error) *IAddressUpdateCall { +func (c *MockIAddressUpdateCall) Do(f func(context.Context, *storage.Address) error) *MockIAddressUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IAddressUpdateCall) DoAndReturn(f func(context.Context, *storage.Address) error) *IAddressUpdateCall { +func (c *MockIAddressUpdateCall) DoAndReturn(f func(context.Context, *storage.Address) error) *MockIAddressUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/balance.go b/internal/storage/mock/balance.go index 7476455..6fbec96 100644 --- a/internal/storage/mock/balance.go +++ b/internal/storage/mock/balance.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: balance.go // @@ -8,6 +5,7 @@ // // mockgen -source=balance.go -destination=mock/balance.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockIBalance) CursorList(ctx context.Context, id, limit uint64, order s } // CursorList indicates an expected call of CursorList. -func (mr *MockIBalanceMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IBalanceCursorListCall { +func (mr *MockIBalanceMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIBalanceCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIBalance)(nil).CursorList), ctx, id, limit, order, cmp) - return &IBalanceCursorListCall{Call: call} + return &MockIBalanceCursorListCall{Call: call} } -// IBalanceCursorListCall wrap *gomock.Call -type IBalanceCursorListCall struct { +// MockIBalanceCursorListCall wrap *gomock.Call +type MockIBalanceCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceCursorListCall) Return(arg0 []*storage.Balance, arg1 error) *IBalanceCursorListCall { +func (c *MockIBalanceCursorListCall) Return(arg0 []*storage.Balance, arg1 error) *MockIBalanceCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Balance, error)) *IBalanceCursorListCall { +func (c *MockIBalanceCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Balance, error)) *MockIBalanceCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Balance, error)) *IBalanceCursorListCall { +func (c *MockIBalanceCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Balance, error)) *MockIBalanceCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +90,31 @@ func (m *MockIBalance) GetByID(ctx context.Context, id uint64) (*storage.Balance } // GetByID indicates an expected call of GetByID. -func (mr *MockIBalanceMockRecorder) GetByID(ctx, id any) *IBalanceGetByIDCall { +func (mr *MockIBalanceMockRecorder) GetByID(ctx, id any) *MockIBalanceGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIBalance)(nil).GetByID), ctx, id) - return &IBalanceGetByIDCall{Call: call} + return &MockIBalanceGetByIDCall{Call: call} } -// IBalanceGetByIDCall wrap *gomock.Call -type IBalanceGetByIDCall struct { +// MockIBalanceGetByIDCall wrap *gomock.Call +type MockIBalanceGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceGetByIDCall) Return(arg0 *storage.Balance, arg1 error) *IBalanceGetByIDCall { +func (c *MockIBalanceGetByIDCall) Return(arg0 *storage.Balance, arg1 error) *MockIBalanceGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceGetByIDCall) Do(f func(context.Context, uint64) (*storage.Balance, error)) *IBalanceGetByIDCall { +func (c *MockIBalanceGetByIDCall) Do(f func(context.Context, uint64) (*storage.Balance, error)) *MockIBalanceGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Balance, error)) *IBalanceGetByIDCall { +func (c *MockIBalanceGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Balance, error)) *MockIBalanceGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -130,31 +128,31 @@ func (m *MockIBalance) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIBalanceMockRecorder) IsNoRows(err any) *IBalanceIsNoRowsCall { +func (mr *MockIBalanceMockRecorder) IsNoRows(err any) *MockIBalanceIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIBalance)(nil).IsNoRows), err) - return &IBalanceIsNoRowsCall{Call: call} + return &MockIBalanceIsNoRowsCall{Call: call} } -// IBalanceIsNoRowsCall wrap *gomock.Call -type IBalanceIsNoRowsCall struct { +// MockIBalanceIsNoRowsCall wrap *gomock.Call +type MockIBalanceIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceIsNoRowsCall) Return(arg0 bool) *IBalanceIsNoRowsCall { +func (c *MockIBalanceIsNoRowsCall) Return(arg0 bool) *MockIBalanceIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceIsNoRowsCall) Do(f func(error) bool) *IBalanceIsNoRowsCall { +func (c *MockIBalanceIsNoRowsCall) Do(f func(error) bool) *MockIBalanceIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceIsNoRowsCall) DoAndReturn(f func(error) bool) *IBalanceIsNoRowsCall { +func (c *MockIBalanceIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIBalanceIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +167,31 @@ func (m *MockIBalance) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIBalanceMockRecorder) LastID(ctx any) *IBalanceLastIDCall { +func (mr *MockIBalanceMockRecorder) LastID(ctx any) *MockIBalanceLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIBalance)(nil).LastID), ctx) - return &IBalanceLastIDCall{Call: call} + return &MockIBalanceLastIDCall{Call: call} } -// IBalanceLastIDCall wrap *gomock.Call -type IBalanceLastIDCall struct { +// MockIBalanceLastIDCall wrap *gomock.Call +type MockIBalanceLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceLastIDCall) Return(arg0 uint64, arg1 error) *IBalanceLastIDCall { +func (c *MockIBalanceLastIDCall) Return(arg0 uint64, arg1 error) *MockIBalanceLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceLastIDCall) Do(f func(context.Context) (uint64, error)) *IBalanceLastIDCall { +func (c *MockIBalanceLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIBalanceLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IBalanceLastIDCall { +func (c *MockIBalanceLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIBalanceLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -208,31 +206,31 @@ func (m *MockIBalance) List(ctx context.Context, limit, offset uint64, order sto } // List indicates an expected call of List. -func (mr *MockIBalanceMockRecorder) List(ctx, limit, offset, order any) *IBalanceListCall { +func (mr *MockIBalanceMockRecorder) List(ctx, limit, offset, order any) *MockIBalanceListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIBalance)(nil).List), ctx, limit, offset, order) - return &IBalanceListCall{Call: call} + return &MockIBalanceListCall{Call: call} } -// IBalanceListCall wrap *gomock.Call -type IBalanceListCall struct { +// MockIBalanceListCall wrap *gomock.Call +type MockIBalanceListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceListCall) Return(arg0 []*storage.Balance, arg1 error) *IBalanceListCall { +func (c *MockIBalanceListCall) Return(arg0 []*storage.Balance, arg1 error) *MockIBalanceListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Balance, error)) *IBalanceListCall { +func (c *MockIBalanceListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Balance, error)) *MockIBalanceListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Balance, error)) *IBalanceListCall { +func (c *MockIBalanceListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Balance, error)) *MockIBalanceListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -246,31 +244,31 @@ func (m_2 *MockIBalance) Save(ctx context.Context, m *storage.Balance) error { } // Save indicates an expected call of Save. -func (mr *MockIBalanceMockRecorder) Save(ctx, m any) *IBalanceSaveCall { +func (mr *MockIBalanceMockRecorder) Save(ctx, m any) *MockIBalanceSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIBalance)(nil).Save), ctx, m) - return &IBalanceSaveCall{Call: call} + return &MockIBalanceSaveCall{Call: call} } -// IBalanceSaveCall wrap *gomock.Call -type IBalanceSaveCall struct { +// MockIBalanceSaveCall wrap *gomock.Call +type MockIBalanceSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceSaveCall) Return(arg0 error) *IBalanceSaveCall { +func (c *MockIBalanceSaveCall) Return(arg0 error) *MockIBalanceSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceSaveCall) Do(f func(context.Context, *storage.Balance) error) *IBalanceSaveCall { +func (c *MockIBalanceSaveCall) Do(f func(context.Context, *storage.Balance) error) *MockIBalanceSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceSaveCall) DoAndReturn(f func(context.Context, *storage.Balance) error) *IBalanceSaveCall { +func (c *MockIBalanceSaveCall) DoAndReturn(f func(context.Context, *storage.Balance) error) *MockIBalanceSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -284,31 +282,31 @@ func (m_2 *MockIBalance) Update(ctx context.Context, m *storage.Balance) error { } // Update indicates an expected call of Update. -func (mr *MockIBalanceMockRecorder) Update(ctx, m any) *IBalanceUpdateCall { +func (mr *MockIBalanceMockRecorder) Update(ctx, m any) *MockIBalanceUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIBalance)(nil).Update), ctx, m) - return &IBalanceUpdateCall{Call: call} + return &MockIBalanceUpdateCall{Call: call} } -// IBalanceUpdateCall wrap *gomock.Call -type IBalanceUpdateCall struct { +// MockIBalanceUpdateCall wrap *gomock.Call +type MockIBalanceUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceUpdateCall) Return(arg0 error) *IBalanceUpdateCall { +func (c *MockIBalanceUpdateCall) Return(arg0 error) *MockIBalanceUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceUpdateCall) Do(f func(context.Context, *storage.Balance) error) *IBalanceUpdateCall { +func (c *MockIBalanceUpdateCall) Do(f func(context.Context, *storage.Balance) error) *MockIBalanceUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceUpdateCall) DoAndReturn(f func(context.Context, *storage.Balance) error) *IBalanceUpdateCall { +func (c *MockIBalanceUpdateCall) DoAndReturn(f func(context.Context, *storage.Balance) error) *MockIBalanceUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/balance_update.go b/internal/storage/mock/balance_update.go index a1a23d0..3164271 100644 --- a/internal/storage/mock/balance_update.go +++ b/internal/storage/mock/balance_update.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: balance_update.go // @@ -8,6 +5,7 @@ // // mockgen -source=balance_update.go -destination=mock/balance_update.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockIBalanceUpdate) CursorList(ctx context.Context, id, limit uint64, o } // CursorList indicates an expected call of CursorList. -func (mr *MockIBalanceUpdateMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IBalanceUpdateCursorListCall { +func (mr *MockIBalanceUpdateMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIBalanceUpdateCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIBalanceUpdate)(nil).CursorList), ctx, id, limit, order, cmp) - return &IBalanceUpdateCursorListCall{Call: call} + return &MockIBalanceUpdateCursorListCall{Call: call} } -// IBalanceUpdateCursorListCall wrap *gomock.Call -type IBalanceUpdateCursorListCall struct { +// MockIBalanceUpdateCursorListCall wrap *gomock.Call +type MockIBalanceUpdateCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceUpdateCursorListCall) Return(arg0 []*storage.BalanceUpdate, arg1 error) *IBalanceUpdateCursorListCall { +func (c *MockIBalanceUpdateCursorListCall) Return(arg0 []*storage.BalanceUpdate, arg1 error) *MockIBalanceUpdateCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceUpdateCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.BalanceUpdate, error)) *IBalanceUpdateCursorListCall { +func (c *MockIBalanceUpdateCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.BalanceUpdate, error)) *MockIBalanceUpdateCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceUpdateCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.BalanceUpdate, error)) *IBalanceUpdateCursorListCall { +func (c *MockIBalanceUpdateCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.BalanceUpdate, error)) *MockIBalanceUpdateCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +90,31 @@ func (m *MockIBalanceUpdate) GetByID(ctx context.Context, id uint64) (*storage.B } // GetByID indicates an expected call of GetByID. -func (mr *MockIBalanceUpdateMockRecorder) GetByID(ctx, id any) *IBalanceUpdateGetByIDCall { +func (mr *MockIBalanceUpdateMockRecorder) GetByID(ctx, id any) *MockIBalanceUpdateGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIBalanceUpdate)(nil).GetByID), ctx, id) - return &IBalanceUpdateGetByIDCall{Call: call} + return &MockIBalanceUpdateGetByIDCall{Call: call} } -// IBalanceUpdateGetByIDCall wrap *gomock.Call -type IBalanceUpdateGetByIDCall struct { +// MockIBalanceUpdateGetByIDCall wrap *gomock.Call +type MockIBalanceUpdateGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceUpdateGetByIDCall) Return(arg0 *storage.BalanceUpdate, arg1 error) *IBalanceUpdateGetByIDCall { +func (c *MockIBalanceUpdateGetByIDCall) Return(arg0 *storage.BalanceUpdate, arg1 error) *MockIBalanceUpdateGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceUpdateGetByIDCall) Do(f func(context.Context, uint64) (*storage.BalanceUpdate, error)) *IBalanceUpdateGetByIDCall { +func (c *MockIBalanceUpdateGetByIDCall) Do(f func(context.Context, uint64) (*storage.BalanceUpdate, error)) *MockIBalanceUpdateGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceUpdateGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.BalanceUpdate, error)) *IBalanceUpdateGetByIDCall { +func (c *MockIBalanceUpdateGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.BalanceUpdate, error)) *MockIBalanceUpdateGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -130,31 +128,31 @@ func (m *MockIBalanceUpdate) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIBalanceUpdateMockRecorder) IsNoRows(err any) *IBalanceUpdateIsNoRowsCall { +func (mr *MockIBalanceUpdateMockRecorder) IsNoRows(err any) *MockIBalanceUpdateIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIBalanceUpdate)(nil).IsNoRows), err) - return &IBalanceUpdateIsNoRowsCall{Call: call} + return &MockIBalanceUpdateIsNoRowsCall{Call: call} } -// IBalanceUpdateIsNoRowsCall wrap *gomock.Call -type IBalanceUpdateIsNoRowsCall struct { +// MockIBalanceUpdateIsNoRowsCall wrap *gomock.Call +type MockIBalanceUpdateIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceUpdateIsNoRowsCall) Return(arg0 bool) *IBalanceUpdateIsNoRowsCall { +func (c *MockIBalanceUpdateIsNoRowsCall) Return(arg0 bool) *MockIBalanceUpdateIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceUpdateIsNoRowsCall) Do(f func(error) bool) *IBalanceUpdateIsNoRowsCall { +func (c *MockIBalanceUpdateIsNoRowsCall) Do(f func(error) bool) *MockIBalanceUpdateIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceUpdateIsNoRowsCall) DoAndReturn(f func(error) bool) *IBalanceUpdateIsNoRowsCall { +func (c *MockIBalanceUpdateIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIBalanceUpdateIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +167,31 @@ func (m *MockIBalanceUpdate) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIBalanceUpdateMockRecorder) LastID(ctx any) *IBalanceUpdateLastIDCall { +func (mr *MockIBalanceUpdateMockRecorder) LastID(ctx any) *MockIBalanceUpdateLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIBalanceUpdate)(nil).LastID), ctx) - return &IBalanceUpdateLastIDCall{Call: call} + return &MockIBalanceUpdateLastIDCall{Call: call} } -// IBalanceUpdateLastIDCall wrap *gomock.Call -type IBalanceUpdateLastIDCall struct { +// MockIBalanceUpdateLastIDCall wrap *gomock.Call +type MockIBalanceUpdateLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceUpdateLastIDCall) Return(arg0 uint64, arg1 error) *IBalanceUpdateLastIDCall { +func (c *MockIBalanceUpdateLastIDCall) Return(arg0 uint64, arg1 error) *MockIBalanceUpdateLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceUpdateLastIDCall) Do(f func(context.Context) (uint64, error)) *IBalanceUpdateLastIDCall { +func (c *MockIBalanceUpdateLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIBalanceUpdateLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceUpdateLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IBalanceUpdateLastIDCall { +func (c *MockIBalanceUpdateLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIBalanceUpdateLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -208,31 +206,31 @@ func (m *MockIBalanceUpdate) List(ctx context.Context, limit, offset uint64, ord } // List indicates an expected call of List. -func (mr *MockIBalanceUpdateMockRecorder) List(ctx, limit, offset, order any) *IBalanceUpdateListCall { +func (mr *MockIBalanceUpdateMockRecorder) List(ctx, limit, offset, order any) *MockIBalanceUpdateListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIBalanceUpdate)(nil).List), ctx, limit, offset, order) - return &IBalanceUpdateListCall{Call: call} + return &MockIBalanceUpdateListCall{Call: call} } -// IBalanceUpdateListCall wrap *gomock.Call -type IBalanceUpdateListCall struct { +// MockIBalanceUpdateListCall wrap *gomock.Call +type MockIBalanceUpdateListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceUpdateListCall) Return(arg0 []*storage.BalanceUpdate, arg1 error) *IBalanceUpdateListCall { +func (c *MockIBalanceUpdateListCall) Return(arg0 []*storage.BalanceUpdate, arg1 error) *MockIBalanceUpdateListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceUpdateListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.BalanceUpdate, error)) *IBalanceUpdateListCall { +func (c *MockIBalanceUpdateListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.BalanceUpdate, error)) *MockIBalanceUpdateListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceUpdateListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.BalanceUpdate, error)) *IBalanceUpdateListCall { +func (c *MockIBalanceUpdateListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.BalanceUpdate, error)) *MockIBalanceUpdateListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -246,31 +244,31 @@ func (m_2 *MockIBalanceUpdate) Save(ctx context.Context, m *storage.BalanceUpdat } // Save indicates an expected call of Save. -func (mr *MockIBalanceUpdateMockRecorder) Save(ctx, m any) *IBalanceUpdateSaveCall { +func (mr *MockIBalanceUpdateMockRecorder) Save(ctx, m any) *MockIBalanceUpdateSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIBalanceUpdate)(nil).Save), ctx, m) - return &IBalanceUpdateSaveCall{Call: call} + return &MockIBalanceUpdateSaveCall{Call: call} } -// IBalanceUpdateSaveCall wrap *gomock.Call -type IBalanceUpdateSaveCall struct { +// MockIBalanceUpdateSaveCall wrap *gomock.Call +type MockIBalanceUpdateSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceUpdateSaveCall) Return(arg0 error) *IBalanceUpdateSaveCall { +func (c *MockIBalanceUpdateSaveCall) Return(arg0 error) *MockIBalanceUpdateSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceUpdateSaveCall) Do(f func(context.Context, *storage.BalanceUpdate) error) *IBalanceUpdateSaveCall { +func (c *MockIBalanceUpdateSaveCall) Do(f func(context.Context, *storage.BalanceUpdate) error) *MockIBalanceUpdateSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceUpdateSaveCall) DoAndReturn(f func(context.Context, *storage.BalanceUpdate) error) *IBalanceUpdateSaveCall { +func (c *MockIBalanceUpdateSaveCall) DoAndReturn(f func(context.Context, *storage.BalanceUpdate) error) *MockIBalanceUpdateSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -284,31 +282,31 @@ func (m_2 *MockIBalanceUpdate) Update(ctx context.Context, m *storage.BalanceUpd } // Update indicates an expected call of Update. -func (mr *MockIBalanceUpdateMockRecorder) Update(ctx, m any) *IBalanceUpdateUpdateCall { +func (mr *MockIBalanceUpdateMockRecorder) Update(ctx, m any) *MockIBalanceUpdateUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIBalanceUpdate)(nil).Update), ctx, m) - return &IBalanceUpdateUpdateCall{Call: call} + return &MockIBalanceUpdateUpdateCall{Call: call} } -// IBalanceUpdateUpdateCall wrap *gomock.Call -type IBalanceUpdateUpdateCall struct { +// MockIBalanceUpdateUpdateCall wrap *gomock.Call +type MockIBalanceUpdateUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBalanceUpdateUpdateCall) Return(arg0 error) *IBalanceUpdateUpdateCall { +func (c *MockIBalanceUpdateUpdateCall) Return(arg0 error) *MockIBalanceUpdateUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBalanceUpdateUpdateCall) Do(f func(context.Context, *storage.BalanceUpdate) error) *IBalanceUpdateUpdateCall { +func (c *MockIBalanceUpdateUpdateCall) Do(f func(context.Context, *storage.BalanceUpdate) error) *MockIBalanceUpdateUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBalanceUpdateUpdateCall) DoAndReturn(f func(context.Context, *storage.BalanceUpdate) error) *IBalanceUpdateUpdateCall { +func (c *MockIBalanceUpdateUpdateCall) DoAndReturn(f func(context.Context, *storage.BalanceUpdate) error) *MockIBalanceUpdateUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/block.go b/internal/storage/mock/block.go index 032cc20..b6f02b0 100644 --- a/internal/storage/mock/block.go +++ b/internal/storage/mock/block.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: block.go // @@ -8,6 +5,7 @@ // // mockgen -source=block.go -destination=mock/block.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -54,31 +52,31 @@ func (m *MockIBlock) ByHash(ctx context.Context, hash []byte) (storage.Block, er } // ByHash indicates an expected call of ByHash. -func (mr *MockIBlockMockRecorder) ByHash(ctx, hash any) *IBlockByHashCall { +func (mr *MockIBlockMockRecorder) ByHash(ctx, hash any) *MockIBlockByHashCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHash", reflect.TypeOf((*MockIBlock)(nil).ByHash), ctx, hash) - return &IBlockByHashCall{Call: call} + return &MockIBlockByHashCall{Call: call} } -// IBlockByHashCall wrap *gomock.Call -type IBlockByHashCall struct { +// MockIBlockByHashCall wrap *gomock.Call +type MockIBlockByHashCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockByHashCall) Return(arg0 storage.Block, arg1 error) *IBlockByHashCall { +func (c *MockIBlockByHashCall) Return(arg0 storage.Block, arg1 error) *MockIBlockByHashCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockByHashCall) Do(f func(context.Context, []byte) (storage.Block, error)) *IBlockByHashCall { +func (c *MockIBlockByHashCall) Do(f func(context.Context, []byte) (storage.Block, error)) *MockIBlockByHashCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockByHashCall) DoAndReturn(f func(context.Context, []byte) (storage.Block, error)) *IBlockByHashCall { +func (c *MockIBlockByHashCall) DoAndReturn(f func(context.Context, []byte) (storage.Block, error)) *MockIBlockByHashCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -93,31 +91,31 @@ func (m *MockIBlock) ByHeight(ctx context.Context, height types.Level, withStats } // ByHeight indicates an expected call of ByHeight. -func (mr *MockIBlockMockRecorder) ByHeight(ctx, height, withStats any) *IBlockByHeightCall { +func (mr *MockIBlockMockRecorder) ByHeight(ctx, height, withStats any) *MockIBlockByHeightCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHeight", reflect.TypeOf((*MockIBlock)(nil).ByHeight), ctx, height, withStats) - return &IBlockByHeightCall{Call: call} + return &MockIBlockByHeightCall{Call: call} } -// IBlockByHeightCall wrap *gomock.Call -type IBlockByHeightCall struct { +// MockIBlockByHeightCall wrap *gomock.Call +type MockIBlockByHeightCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockByHeightCall) Return(arg0 storage.Block, arg1 error) *IBlockByHeightCall { +func (c *MockIBlockByHeightCall) Return(arg0 storage.Block, arg1 error) *MockIBlockByHeightCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockByHeightCall) Do(f func(context.Context, types.Level, bool) (storage.Block, error)) *IBlockByHeightCall { +func (c *MockIBlockByHeightCall) Do(f func(context.Context, types.Level, bool) (storage.Block, error)) *MockIBlockByHeightCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockByHeightCall) DoAndReturn(f func(context.Context, types.Level, bool) (storage.Block, error)) *IBlockByHeightCall { +func (c *MockIBlockByHeightCall) DoAndReturn(f func(context.Context, types.Level, bool) (storage.Block, error)) *MockIBlockByHeightCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -132,31 +130,31 @@ func (m *MockIBlock) ByIdWithRelations(ctx context.Context, id uint64) (storage. } // ByIdWithRelations indicates an expected call of ByIdWithRelations. -func (mr *MockIBlockMockRecorder) ByIdWithRelations(ctx, id any) *IBlockByIdWithRelationsCall { +func (mr *MockIBlockMockRecorder) ByIdWithRelations(ctx, id any) *MockIBlockByIdWithRelationsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByIdWithRelations", reflect.TypeOf((*MockIBlock)(nil).ByIdWithRelations), ctx, id) - return &IBlockByIdWithRelationsCall{Call: call} + return &MockIBlockByIdWithRelationsCall{Call: call} } -// IBlockByIdWithRelationsCall wrap *gomock.Call -type IBlockByIdWithRelationsCall struct { +// MockIBlockByIdWithRelationsCall wrap *gomock.Call +type MockIBlockByIdWithRelationsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockByIdWithRelationsCall) Return(arg0 storage.Block, arg1 error) *IBlockByIdWithRelationsCall { +func (c *MockIBlockByIdWithRelationsCall) Return(arg0 storage.Block, arg1 error) *MockIBlockByIdWithRelationsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockByIdWithRelationsCall) Do(f func(context.Context, uint64) (storage.Block, error)) *IBlockByIdWithRelationsCall { +func (c *MockIBlockByIdWithRelationsCall) Do(f func(context.Context, uint64) (storage.Block, error)) *MockIBlockByIdWithRelationsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockByIdWithRelationsCall) DoAndReturn(f func(context.Context, uint64) (storage.Block, error)) *IBlockByIdWithRelationsCall { +func (c *MockIBlockByIdWithRelationsCall) DoAndReturn(f func(context.Context, uint64) (storage.Block, error)) *MockIBlockByIdWithRelationsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -171,31 +169,31 @@ func (m *MockIBlock) ByProposer(ctx context.Context, proposerId uint64, limit, o } // ByProposer indicates an expected call of ByProposer. -func (mr *MockIBlockMockRecorder) ByProposer(ctx, proposerId, limit, offset, order any) *IBlockByProposerCall { +func (mr *MockIBlockMockRecorder) ByProposer(ctx, proposerId, limit, offset, order any) *MockIBlockByProposerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByProposer", reflect.TypeOf((*MockIBlock)(nil).ByProposer), ctx, proposerId, limit, offset, order) - return &IBlockByProposerCall{Call: call} + return &MockIBlockByProposerCall{Call: call} } -// IBlockByProposerCall wrap *gomock.Call -type IBlockByProposerCall struct { +// MockIBlockByProposerCall wrap *gomock.Call +type MockIBlockByProposerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockByProposerCall) Return(arg0 []storage.Block, arg1 error) *IBlockByProposerCall { +func (c *MockIBlockByProposerCall) Return(arg0 []storage.Block, arg1 error) *MockIBlockByProposerCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockByProposerCall) Do(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.Block, error)) *IBlockByProposerCall { +func (c *MockIBlockByProposerCall) Do(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.Block, error)) *MockIBlockByProposerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockByProposerCall) DoAndReturn(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.Block, error)) *IBlockByProposerCall { +func (c *MockIBlockByProposerCall) DoAndReturn(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.Block, error)) *MockIBlockByProposerCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -210,31 +208,31 @@ func (m *MockIBlock) CursorList(ctx context.Context, id, limit uint64, order sto } // CursorList indicates an expected call of CursorList. -func (mr *MockIBlockMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IBlockCursorListCall { +func (mr *MockIBlockMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIBlockCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIBlock)(nil).CursorList), ctx, id, limit, order, cmp) - return &IBlockCursorListCall{Call: call} + return &MockIBlockCursorListCall{Call: call} } -// IBlockCursorListCall wrap *gomock.Call -type IBlockCursorListCall struct { +// MockIBlockCursorListCall wrap *gomock.Call +type MockIBlockCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockCursorListCall) Return(arg0 []*storage.Block, arg1 error) *IBlockCursorListCall { +func (c *MockIBlockCursorListCall) Return(arg0 []*storage.Block, arg1 error) *MockIBlockCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Block, error)) *IBlockCursorListCall { +func (c *MockIBlockCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Block, error)) *MockIBlockCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Block, error)) *IBlockCursorListCall { +func (c *MockIBlockCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Block, error)) *MockIBlockCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -249,31 +247,31 @@ func (m *MockIBlock) GetByID(ctx context.Context, id uint64) (*storage.Block, er } // GetByID indicates an expected call of GetByID. -func (mr *MockIBlockMockRecorder) GetByID(ctx, id any) *IBlockGetByIDCall { +func (mr *MockIBlockMockRecorder) GetByID(ctx, id any) *MockIBlockGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIBlock)(nil).GetByID), ctx, id) - return &IBlockGetByIDCall{Call: call} + return &MockIBlockGetByIDCall{Call: call} } -// IBlockGetByIDCall wrap *gomock.Call -type IBlockGetByIDCall struct { +// MockIBlockGetByIDCall wrap *gomock.Call +type MockIBlockGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockGetByIDCall) Return(arg0 *storage.Block, arg1 error) *IBlockGetByIDCall { +func (c *MockIBlockGetByIDCall) Return(arg0 *storage.Block, arg1 error) *MockIBlockGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockGetByIDCall) Do(f func(context.Context, uint64) (*storage.Block, error)) *IBlockGetByIDCall { +func (c *MockIBlockGetByIDCall) Do(f func(context.Context, uint64) (*storage.Block, error)) *MockIBlockGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Block, error)) *IBlockGetByIDCall { +func (c *MockIBlockGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Block, error)) *MockIBlockGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -287,31 +285,31 @@ func (m *MockIBlock) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIBlockMockRecorder) IsNoRows(err any) *IBlockIsNoRowsCall { +func (mr *MockIBlockMockRecorder) IsNoRows(err any) *MockIBlockIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIBlock)(nil).IsNoRows), err) - return &IBlockIsNoRowsCall{Call: call} + return &MockIBlockIsNoRowsCall{Call: call} } -// IBlockIsNoRowsCall wrap *gomock.Call -type IBlockIsNoRowsCall struct { +// MockIBlockIsNoRowsCall wrap *gomock.Call +type MockIBlockIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockIsNoRowsCall) Return(arg0 bool) *IBlockIsNoRowsCall { +func (c *MockIBlockIsNoRowsCall) Return(arg0 bool) *MockIBlockIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockIsNoRowsCall) Do(f func(error) bool) *IBlockIsNoRowsCall { +func (c *MockIBlockIsNoRowsCall) Do(f func(error) bool) *MockIBlockIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockIsNoRowsCall) DoAndReturn(f func(error) bool) *IBlockIsNoRowsCall { +func (c *MockIBlockIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIBlockIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -326,31 +324,31 @@ func (m *MockIBlock) Last(ctx context.Context) (storage.Block, error) { } // Last indicates an expected call of Last. -func (mr *MockIBlockMockRecorder) Last(ctx any) *IBlockLastCall { +func (mr *MockIBlockMockRecorder) Last(ctx any) *MockIBlockLastCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Last", reflect.TypeOf((*MockIBlock)(nil).Last), ctx) - return &IBlockLastCall{Call: call} + return &MockIBlockLastCall{Call: call} } -// IBlockLastCall wrap *gomock.Call -type IBlockLastCall struct { +// MockIBlockLastCall wrap *gomock.Call +type MockIBlockLastCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockLastCall) Return(arg0 storage.Block, arg1 error) *IBlockLastCall { +func (c *MockIBlockLastCall) Return(arg0 storage.Block, arg1 error) *MockIBlockLastCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockLastCall) Do(f func(context.Context) (storage.Block, error)) *IBlockLastCall { +func (c *MockIBlockLastCall) Do(f func(context.Context) (storage.Block, error)) *MockIBlockLastCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockLastCall) DoAndReturn(f func(context.Context) (storage.Block, error)) *IBlockLastCall { +func (c *MockIBlockLastCall) DoAndReturn(f func(context.Context) (storage.Block, error)) *MockIBlockLastCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -365,31 +363,31 @@ func (m *MockIBlock) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIBlockMockRecorder) LastID(ctx any) *IBlockLastIDCall { +func (mr *MockIBlockMockRecorder) LastID(ctx any) *MockIBlockLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIBlock)(nil).LastID), ctx) - return &IBlockLastIDCall{Call: call} + return &MockIBlockLastIDCall{Call: call} } -// IBlockLastIDCall wrap *gomock.Call -type IBlockLastIDCall struct { +// MockIBlockLastIDCall wrap *gomock.Call +type MockIBlockLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockLastIDCall) Return(arg0 uint64, arg1 error) *IBlockLastIDCall { +func (c *MockIBlockLastIDCall) Return(arg0 uint64, arg1 error) *MockIBlockLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockLastIDCall) Do(f func(context.Context) (uint64, error)) *IBlockLastIDCall { +func (c *MockIBlockLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIBlockLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IBlockLastIDCall { +func (c *MockIBlockLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIBlockLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -404,31 +402,31 @@ func (m *MockIBlock) List(ctx context.Context, limit, offset uint64, order stora } // List indicates an expected call of List. -func (mr *MockIBlockMockRecorder) List(ctx, limit, offset, order any) *IBlockListCall { +func (mr *MockIBlockMockRecorder) List(ctx, limit, offset, order any) *MockIBlockListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIBlock)(nil).List), ctx, limit, offset, order) - return &IBlockListCall{Call: call} + return &MockIBlockListCall{Call: call} } -// IBlockListCall wrap *gomock.Call -type IBlockListCall struct { +// MockIBlockListCall wrap *gomock.Call +type MockIBlockListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockListCall) Return(arg0 []*storage.Block, arg1 error) *IBlockListCall { +func (c *MockIBlockListCall) Return(arg0 []*storage.Block, arg1 error) *MockIBlockListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Block, error)) *IBlockListCall { +func (c *MockIBlockListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Block, error)) *MockIBlockListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Block, error)) *IBlockListCall { +func (c *MockIBlockListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Block, error)) *MockIBlockListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -443,31 +441,31 @@ func (m *MockIBlock) ListWithStats(ctx context.Context, limit, offset uint64, or } // ListWithStats indicates an expected call of ListWithStats. -func (mr *MockIBlockMockRecorder) ListWithStats(ctx, limit, offset, order any) *IBlockListWithStatsCall { +func (mr *MockIBlockMockRecorder) ListWithStats(ctx, limit, offset, order any) *MockIBlockListWithStatsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListWithStats", reflect.TypeOf((*MockIBlock)(nil).ListWithStats), ctx, limit, offset, order) - return &IBlockListWithStatsCall{Call: call} + return &MockIBlockListWithStatsCall{Call: call} } -// IBlockListWithStatsCall wrap *gomock.Call -type IBlockListWithStatsCall struct { +// MockIBlockListWithStatsCall wrap *gomock.Call +type MockIBlockListWithStatsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockListWithStatsCall) Return(arg0 []*storage.Block, arg1 error) *IBlockListWithStatsCall { +func (c *MockIBlockListWithStatsCall) Return(arg0 []*storage.Block, arg1 error) *MockIBlockListWithStatsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockListWithStatsCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Block, error)) *IBlockListWithStatsCall { +func (c *MockIBlockListWithStatsCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Block, error)) *MockIBlockListWithStatsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockListWithStatsCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Block, error)) *IBlockListWithStatsCall { +func (c *MockIBlockListWithStatsCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Block, error)) *MockIBlockListWithStatsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -481,31 +479,31 @@ func (m_2 *MockIBlock) Save(ctx context.Context, m *storage.Block) error { } // Save indicates an expected call of Save. -func (mr *MockIBlockMockRecorder) Save(ctx, m any) *IBlockSaveCall { +func (mr *MockIBlockMockRecorder) Save(ctx, m any) *MockIBlockSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIBlock)(nil).Save), ctx, m) - return &IBlockSaveCall{Call: call} + return &MockIBlockSaveCall{Call: call} } -// IBlockSaveCall wrap *gomock.Call -type IBlockSaveCall struct { +// MockIBlockSaveCall wrap *gomock.Call +type MockIBlockSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSaveCall) Return(arg0 error) *IBlockSaveCall { +func (c *MockIBlockSaveCall) Return(arg0 error) *MockIBlockSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSaveCall) Do(f func(context.Context, *storage.Block) error) *IBlockSaveCall { +func (c *MockIBlockSaveCall) Do(f func(context.Context, *storage.Block) error) *MockIBlockSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSaveCall) DoAndReturn(f func(context.Context, *storage.Block) error) *IBlockSaveCall { +func (c *MockIBlockSaveCall) DoAndReturn(f func(context.Context, *storage.Block) error) *MockIBlockSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -519,31 +517,31 @@ func (m_2 *MockIBlock) Update(ctx context.Context, m *storage.Block) error { } // Update indicates an expected call of Update. -func (mr *MockIBlockMockRecorder) Update(ctx, m any) *IBlockUpdateCall { +func (mr *MockIBlockMockRecorder) Update(ctx, m any) *MockIBlockUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIBlock)(nil).Update), ctx, m) - return &IBlockUpdateCall{Call: call} + return &MockIBlockUpdateCall{Call: call} } -// IBlockUpdateCall wrap *gomock.Call -type IBlockUpdateCall struct { +// MockIBlockUpdateCall wrap *gomock.Call +type MockIBlockUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockUpdateCall) Return(arg0 error) *IBlockUpdateCall { +func (c *MockIBlockUpdateCall) Return(arg0 error) *MockIBlockUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockUpdateCall) Do(f func(context.Context, *storage.Block) error) *IBlockUpdateCall { +func (c *MockIBlockUpdateCall) Do(f func(context.Context, *storage.Block) error) *MockIBlockUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockUpdateCall) DoAndReturn(f func(context.Context, *storage.Block) error) *IBlockUpdateCall { +func (c *MockIBlockUpdateCall) DoAndReturn(f func(context.Context, *storage.Block) error) *MockIBlockUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/block_signature.go b/internal/storage/mock/block_signature.go index dfd557e..76cbd91 100644 --- a/internal/storage/mock/block_signature.go +++ b/internal/storage/mock/block_signature.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: block_signature.go // @@ -8,6 +5,7 @@ // // mockgen -source=block_signature.go -destination=mock/block_signature.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -54,31 +52,31 @@ func (m *MockIBlockSignature) CursorList(ctx context.Context, id, limit uint64, } // CursorList indicates an expected call of CursorList. -func (mr *MockIBlockSignatureMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IBlockSignatureCursorListCall { +func (mr *MockIBlockSignatureMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIBlockSignatureCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIBlockSignature)(nil).CursorList), ctx, id, limit, order, cmp) - return &IBlockSignatureCursorListCall{Call: call} + return &MockIBlockSignatureCursorListCall{Call: call} } -// IBlockSignatureCursorListCall wrap *gomock.Call -type IBlockSignatureCursorListCall struct { +// MockIBlockSignatureCursorListCall wrap *gomock.Call +type MockIBlockSignatureCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSignatureCursorListCall) Return(arg0 []*storage.BlockSignature, arg1 error) *IBlockSignatureCursorListCall { +func (c *MockIBlockSignatureCursorListCall) Return(arg0 []*storage.BlockSignature, arg1 error) *MockIBlockSignatureCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSignatureCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.BlockSignature, error)) *IBlockSignatureCursorListCall { +func (c *MockIBlockSignatureCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.BlockSignature, error)) *MockIBlockSignatureCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSignatureCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.BlockSignature, error)) *IBlockSignatureCursorListCall { +func (c *MockIBlockSignatureCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.BlockSignature, error)) *MockIBlockSignatureCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -93,31 +91,31 @@ func (m *MockIBlockSignature) GetByID(ctx context.Context, id uint64) (*storage. } // GetByID indicates an expected call of GetByID. -func (mr *MockIBlockSignatureMockRecorder) GetByID(ctx, id any) *IBlockSignatureGetByIDCall { +func (mr *MockIBlockSignatureMockRecorder) GetByID(ctx, id any) *MockIBlockSignatureGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIBlockSignature)(nil).GetByID), ctx, id) - return &IBlockSignatureGetByIDCall{Call: call} + return &MockIBlockSignatureGetByIDCall{Call: call} } -// IBlockSignatureGetByIDCall wrap *gomock.Call -type IBlockSignatureGetByIDCall struct { +// MockIBlockSignatureGetByIDCall wrap *gomock.Call +type MockIBlockSignatureGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSignatureGetByIDCall) Return(arg0 *storage.BlockSignature, arg1 error) *IBlockSignatureGetByIDCall { +func (c *MockIBlockSignatureGetByIDCall) Return(arg0 *storage.BlockSignature, arg1 error) *MockIBlockSignatureGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSignatureGetByIDCall) Do(f func(context.Context, uint64) (*storage.BlockSignature, error)) *IBlockSignatureGetByIDCall { +func (c *MockIBlockSignatureGetByIDCall) Do(f func(context.Context, uint64) (*storage.BlockSignature, error)) *MockIBlockSignatureGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSignatureGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.BlockSignature, error)) *IBlockSignatureGetByIDCall { +func (c *MockIBlockSignatureGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.BlockSignature, error)) *MockIBlockSignatureGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,31 +129,31 @@ func (m *MockIBlockSignature) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIBlockSignatureMockRecorder) IsNoRows(err any) *IBlockSignatureIsNoRowsCall { +func (mr *MockIBlockSignatureMockRecorder) IsNoRows(err any) *MockIBlockSignatureIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIBlockSignature)(nil).IsNoRows), err) - return &IBlockSignatureIsNoRowsCall{Call: call} + return &MockIBlockSignatureIsNoRowsCall{Call: call} } -// IBlockSignatureIsNoRowsCall wrap *gomock.Call -type IBlockSignatureIsNoRowsCall struct { +// MockIBlockSignatureIsNoRowsCall wrap *gomock.Call +type MockIBlockSignatureIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSignatureIsNoRowsCall) Return(arg0 bool) *IBlockSignatureIsNoRowsCall { +func (c *MockIBlockSignatureIsNoRowsCall) Return(arg0 bool) *MockIBlockSignatureIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSignatureIsNoRowsCall) Do(f func(error) bool) *IBlockSignatureIsNoRowsCall { +func (c *MockIBlockSignatureIsNoRowsCall) Do(f func(error) bool) *MockIBlockSignatureIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSignatureIsNoRowsCall) DoAndReturn(f func(error) bool) *IBlockSignatureIsNoRowsCall { +func (c *MockIBlockSignatureIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIBlockSignatureIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -170,31 +168,31 @@ func (m *MockIBlockSignature) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIBlockSignatureMockRecorder) LastID(ctx any) *IBlockSignatureLastIDCall { +func (mr *MockIBlockSignatureMockRecorder) LastID(ctx any) *MockIBlockSignatureLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIBlockSignature)(nil).LastID), ctx) - return &IBlockSignatureLastIDCall{Call: call} + return &MockIBlockSignatureLastIDCall{Call: call} } -// IBlockSignatureLastIDCall wrap *gomock.Call -type IBlockSignatureLastIDCall struct { +// MockIBlockSignatureLastIDCall wrap *gomock.Call +type MockIBlockSignatureLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSignatureLastIDCall) Return(arg0 uint64, arg1 error) *IBlockSignatureLastIDCall { +func (c *MockIBlockSignatureLastIDCall) Return(arg0 uint64, arg1 error) *MockIBlockSignatureLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSignatureLastIDCall) Do(f func(context.Context) (uint64, error)) *IBlockSignatureLastIDCall { +func (c *MockIBlockSignatureLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIBlockSignatureLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSignatureLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IBlockSignatureLastIDCall { +func (c *MockIBlockSignatureLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIBlockSignatureLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -209,31 +207,31 @@ func (m *MockIBlockSignature) LevelsByValidator(ctx context.Context, validatorId } // LevelsByValidator indicates an expected call of LevelsByValidator. -func (mr *MockIBlockSignatureMockRecorder) LevelsByValidator(ctx, validatorId, startHeight any) *IBlockSignatureLevelsByValidatorCall { +func (mr *MockIBlockSignatureMockRecorder) LevelsByValidator(ctx, validatorId, startHeight any) *MockIBlockSignatureLevelsByValidatorCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LevelsByValidator", reflect.TypeOf((*MockIBlockSignature)(nil).LevelsByValidator), ctx, validatorId, startHeight) - return &IBlockSignatureLevelsByValidatorCall{Call: call} + return &MockIBlockSignatureLevelsByValidatorCall{Call: call} } -// IBlockSignatureLevelsByValidatorCall wrap *gomock.Call -type IBlockSignatureLevelsByValidatorCall struct { +// MockIBlockSignatureLevelsByValidatorCall wrap *gomock.Call +type MockIBlockSignatureLevelsByValidatorCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSignatureLevelsByValidatorCall) Return(arg0 []types.Level, arg1 error) *IBlockSignatureLevelsByValidatorCall { +func (c *MockIBlockSignatureLevelsByValidatorCall) Return(arg0 []types.Level, arg1 error) *MockIBlockSignatureLevelsByValidatorCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSignatureLevelsByValidatorCall) Do(f func(context.Context, uint64, types.Level) ([]types.Level, error)) *IBlockSignatureLevelsByValidatorCall { +func (c *MockIBlockSignatureLevelsByValidatorCall) Do(f func(context.Context, uint64, types.Level) ([]types.Level, error)) *MockIBlockSignatureLevelsByValidatorCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSignatureLevelsByValidatorCall) DoAndReturn(f func(context.Context, uint64, types.Level) ([]types.Level, error)) *IBlockSignatureLevelsByValidatorCall { +func (c *MockIBlockSignatureLevelsByValidatorCall) DoAndReturn(f func(context.Context, uint64, types.Level) ([]types.Level, error)) *MockIBlockSignatureLevelsByValidatorCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -248,31 +246,31 @@ func (m *MockIBlockSignature) List(ctx context.Context, limit, offset uint64, or } // List indicates an expected call of List. -func (mr *MockIBlockSignatureMockRecorder) List(ctx, limit, offset, order any) *IBlockSignatureListCall { +func (mr *MockIBlockSignatureMockRecorder) List(ctx, limit, offset, order any) *MockIBlockSignatureListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIBlockSignature)(nil).List), ctx, limit, offset, order) - return &IBlockSignatureListCall{Call: call} + return &MockIBlockSignatureListCall{Call: call} } -// IBlockSignatureListCall wrap *gomock.Call -type IBlockSignatureListCall struct { +// MockIBlockSignatureListCall wrap *gomock.Call +type MockIBlockSignatureListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSignatureListCall) Return(arg0 []*storage.BlockSignature, arg1 error) *IBlockSignatureListCall { +func (c *MockIBlockSignatureListCall) Return(arg0 []*storage.BlockSignature, arg1 error) *MockIBlockSignatureListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSignatureListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.BlockSignature, error)) *IBlockSignatureListCall { +func (c *MockIBlockSignatureListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.BlockSignature, error)) *MockIBlockSignatureListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSignatureListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.BlockSignature, error)) *IBlockSignatureListCall { +func (c *MockIBlockSignatureListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.BlockSignature, error)) *MockIBlockSignatureListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -286,31 +284,31 @@ func (m_2 *MockIBlockSignature) Save(ctx context.Context, m *storage.BlockSignat } // Save indicates an expected call of Save. -func (mr *MockIBlockSignatureMockRecorder) Save(ctx, m any) *IBlockSignatureSaveCall { +func (mr *MockIBlockSignatureMockRecorder) Save(ctx, m any) *MockIBlockSignatureSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIBlockSignature)(nil).Save), ctx, m) - return &IBlockSignatureSaveCall{Call: call} + return &MockIBlockSignatureSaveCall{Call: call} } -// IBlockSignatureSaveCall wrap *gomock.Call -type IBlockSignatureSaveCall struct { +// MockIBlockSignatureSaveCall wrap *gomock.Call +type MockIBlockSignatureSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSignatureSaveCall) Return(arg0 error) *IBlockSignatureSaveCall { +func (c *MockIBlockSignatureSaveCall) Return(arg0 error) *MockIBlockSignatureSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSignatureSaveCall) Do(f func(context.Context, *storage.BlockSignature) error) *IBlockSignatureSaveCall { +func (c *MockIBlockSignatureSaveCall) Do(f func(context.Context, *storage.BlockSignature) error) *MockIBlockSignatureSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSignatureSaveCall) DoAndReturn(f func(context.Context, *storage.BlockSignature) error) *IBlockSignatureSaveCall { +func (c *MockIBlockSignatureSaveCall) DoAndReturn(f func(context.Context, *storage.BlockSignature) error) *MockIBlockSignatureSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -324,31 +322,31 @@ func (m_2 *MockIBlockSignature) Update(ctx context.Context, m *storage.BlockSign } // Update indicates an expected call of Update. -func (mr *MockIBlockSignatureMockRecorder) Update(ctx, m any) *IBlockSignatureUpdateCall { +func (mr *MockIBlockSignatureMockRecorder) Update(ctx, m any) *MockIBlockSignatureUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIBlockSignature)(nil).Update), ctx, m) - return &IBlockSignatureUpdateCall{Call: call} + return &MockIBlockSignatureUpdateCall{Call: call} } -// IBlockSignatureUpdateCall wrap *gomock.Call -type IBlockSignatureUpdateCall struct { +// MockIBlockSignatureUpdateCall wrap *gomock.Call +type MockIBlockSignatureUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockSignatureUpdateCall) Return(arg0 error) *IBlockSignatureUpdateCall { +func (c *MockIBlockSignatureUpdateCall) Return(arg0 error) *MockIBlockSignatureUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockSignatureUpdateCall) Do(f func(context.Context, *storage.BlockSignature) error) *IBlockSignatureUpdateCall { +func (c *MockIBlockSignatureUpdateCall) Do(f func(context.Context, *storage.BlockSignature) error) *MockIBlockSignatureUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockSignatureUpdateCall) DoAndReturn(f func(context.Context, *storage.BlockSignature) error) *IBlockSignatureUpdateCall { +func (c *MockIBlockSignatureUpdateCall) DoAndReturn(f func(context.Context, *storage.BlockSignature) error) *MockIBlockSignatureUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/block_stats.go b/internal/storage/mock/block_stats.go index 17cebf8..f097645 100644 --- a/internal/storage/mock/block_stats.go +++ b/internal/storage/mock/block_stats.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: block_stats.go // @@ -8,6 +5,7 @@ // // mockgen -source=block_stats.go -destination=mock/block_stats.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockIBlockStats) ByHeight(ctx context.Context, height types.Level) (sto } // ByHeight indicates an expected call of ByHeight. -func (mr *MockIBlockStatsMockRecorder) ByHeight(ctx, height any) *IBlockStatsByHeightCall { +func (mr *MockIBlockStatsMockRecorder) ByHeight(ctx, height any) *MockIBlockStatsByHeightCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHeight", reflect.TypeOf((*MockIBlockStats)(nil).ByHeight), ctx, height) - return &IBlockStatsByHeightCall{Call: call} + return &MockIBlockStatsByHeightCall{Call: call} } -// IBlockStatsByHeightCall wrap *gomock.Call -type IBlockStatsByHeightCall struct { +// MockIBlockStatsByHeightCall wrap *gomock.Call +type MockIBlockStatsByHeightCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBlockStatsByHeightCall) Return(stats storage.BlockStats, err error) *IBlockStatsByHeightCall { +func (c *MockIBlockStatsByHeightCall) Return(stats storage.BlockStats, err error) *MockIBlockStatsByHeightCall { c.Call = c.Call.Return(stats, err) return c } // Do rewrite *gomock.Call.Do -func (c *IBlockStatsByHeightCall) Do(f func(context.Context, types.Level) (storage.BlockStats, error)) *IBlockStatsByHeightCall { +func (c *MockIBlockStatsByHeightCall) Do(f func(context.Context, types.Level) (storage.BlockStats, error)) *MockIBlockStatsByHeightCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBlockStatsByHeightCall) DoAndReturn(f func(context.Context, types.Level) (storage.BlockStats, error)) *IBlockStatsByHeightCall { +func (c *MockIBlockStatsByHeightCall) DoAndReturn(f func(context.Context, types.Level) (storage.BlockStats, error)) *MockIBlockStatsByHeightCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/bridge.go b/internal/storage/mock/bridge.go index 3a46346..9e858a7 100644 --- a/internal/storage/mock/bridge.go +++ b/internal/storage/mock/bridge.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: bridge.go // @@ -8,6 +5,7 @@ // // mockgen -source=bridge.go -destination=mock/bridge.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockIBridge) ByAddress(ctx context.Context, addressId uint64) (storage. } // ByAddress indicates an expected call of ByAddress. -func (mr *MockIBridgeMockRecorder) ByAddress(ctx, addressId any) *IBridgeByAddressCall { +func (mr *MockIBridgeMockRecorder) ByAddress(ctx, addressId any) *MockIBridgeByAddressCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByAddress", reflect.TypeOf((*MockIBridge)(nil).ByAddress), ctx, addressId) - return &IBridgeByAddressCall{Call: call} + return &MockIBridgeByAddressCall{Call: call} } -// IBridgeByAddressCall wrap *gomock.Call -type IBridgeByAddressCall struct { +// MockIBridgeByAddressCall wrap *gomock.Call +type MockIBridgeByAddressCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeByAddressCall) Return(arg0 storage.Bridge, arg1 error) *IBridgeByAddressCall { +func (c *MockIBridgeByAddressCall) Return(arg0 storage.Bridge, arg1 error) *MockIBridgeByAddressCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeByAddressCall) Do(f func(context.Context, uint64) (storage.Bridge, error)) *IBridgeByAddressCall { +func (c *MockIBridgeByAddressCall) Do(f func(context.Context, uint64) (storage.Bridge, error)) *MockIBridgeByAddressCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeByAddressCall) DoAndReturn(f func(context.Context, uint64) (storage.Bridge, error)) *IBridgeByAddressCall { +func (c *MockIBridgeByAddressCall) DoAndReturn(f func(context.Context, uint64) (storage.Bridge, error)) *MockIBridgeByAddressCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +90,31 @@ func (m *MockIBridge) ByRoles(ctx context.Context, addressId uint64, limit, offs } // ByRoles indicates an expected call of ByRoles. -func (mr *MockIBridgeMockRecorder) ByRoles(ctx, addressId, limit, offset any) *IBridgeByRolesCall { +func (mr *MockIBridgeMockRecorder) ByRoles(ctx, addressId, limit, offset any) *MockIBridgeByRolesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByRoles", reflect.TypeOf((*MockIBridge)(nil).ByRoles), ctx, addressId, limit, offset) - return &IBridgeByRolesCall{Call: call} + return &MockIBridgeByRolesCall{Call: call} } -// IBridgeByRolesCall wrap *gomock.Call -type IBridgeByRolesCall struct { +// MockIBridgeByRolesCall wrap *gomock.Call +type MockIBridgeByRolesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeByRolesCall) Return(arg0 []storage.Bridge, arg1 error) *IBridgeByRolesCall { +func (c *MockIBridgeByRolesCall) Return(arg0 []storage.Bridge, arg1 error) *MockIBridgeByRolesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeByRolesCall) Do(f func(context.Context, uint64, int, int) ([]storage.Bridge, error)) *IBridgeByRolesCall { +func (c *MockIBridgeByRolesCall) Do(f func(context.Context, uint64, int, int) ([]storage.Bridge, error)) *MockIBridgeByRolesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeByRolesCall) DoAndReturn(f func(context.Context, uint64, int, int) ([]storage.Bridge, error)) *IBridgeByRolesCall { +func (c *MockIBridgeByRolesCall) DoAndReturn(f func(context.Context, uint64, int, int) ([]storage.Bridge, error)) *MockIBridgeByRolesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,31 +129,31 @@ func (m *MockIBridge) ByRollup(ctx context.Context, rollupId uint64) (storage.Br } // ByRollup indicates an expected call of ByRollup. -func (mr *MockIBridgeMockRecorder) ByRollup(ctx, rollupId any) *IBridgeByRollupCall { +func (mr *MockIBridgeMockRecorder) ByRollup(ctx, rollupId any) *MockIBridgeByRollupCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByRollup", reflect.TypeOf((*MockIBridge)(nil).ByRollup), ctx, rollupId) - return &IBridgeByRollupCall{Call: call} + return &MockIBridgeByRollupCall{Call: call} } -// IBridgeByRollupCall wrap *gomock.Call -type IBridgeByRollupCall struct { +// MockIBridgeByRollupCall wrap *gomock.Call +type MockIBridgeByRollupCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeByRollupCall) Return(arg0 storage.Bridge, arg1 error) *IBridgeByRollupCall { +func (c *MockIBridgeByRollupCall) Return(arg0 storage.Bridge, arg1 error) *MockIBridgeByRollupCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeByRollupCall) Do(f func(context.Context, uint64) (storage.Bridge, error)) *IBridgeByRollupCall { +func (c *MockIBridgeByRollupCall) Do(f func(context.Context, uint64) (storage.Bridge, error)) *MockIBridgeByRollupCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeByRollupCall) DoAndReturn(f func(context.Context, uint64) (storage.Bridge, error)) *IBridgeByRollupCall { +func (c *MockIBridgeByRollupCall) DoAndReturn(f func(context.Context, uint64) (storage.Bridge, error)) *MockIBridgeByRollupCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -170,31 +168,31 @@ func (m *MockIBridge) CursorList(ctx context.Context, id, limit uint64, order st } // CursorList indicates an expected call of CursorList. -func (mr *MockIBridgeMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IBridgeCursorListCall { +func (mr *MockIBridgeMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIBridgeCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIBridge)(nil).CursorList), ctx, id, limit, order, cmp) - return &IBridgeCursorListCall{Call: call} + return &MockIBridgeCursorListCall{Call: call} } -// IBridgeCursorListCall wrap *gomock.Call -type IBridgeCursorListCall struct { +// MockIBridgeCursorListCall wrap *gomock.Call +type MockIBridgeCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeCursorListCall) Return(arg0 []*storage.Bridge, arg1 error) *IBridgeCursorListCall { +func (c *MockIBridgeCursorListCall) Return(arg0 []*storage.Bridge, arg1 error) *MockIBridgeCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Bridge, error)) *IBridgeCursorListCall { +func (c *MockIBridgeCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Bridge, error)) *MockIBridgeCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Bridge, error)) *IBridgeCursorListCall { +func (c *MockIBridgeCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Bridge, error)) *MockIBridgeCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -209,31 +207,31 @@ func (m *MockIBridge) GetByID(ctx context.Context, id uint64) (*storage.Bridge, } // GetByID indicates an expected call of GetByID. -func (mr *MockIBridgeMockRecorder) GetByID(ctx, id any) *IBridgeGetByIDCall { +func (mr *MockIBridgeMockRecorder) GetByID(ctx, id any) *MockIBridgeGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIBridge)(nil).GetByID), ctx, id) - return &IBridgeGetByIDCall{Call: call} + return &MockIBridgeGetByIDCall{Call: call} } -// IBridgeGetByIDCall wrap *gomock.Call -type IBridgeGetByIDCall struct { +// MockIBridgeGetByIDCall wrap *gomock.Call +type MockIBridgeGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeGetByIDCall) Return(arg0 *storage.Bridge, arg1 error) *IBridgeGetByIDCall { +func (c *MockIBridgeGetByIDCall) Return(arg0 *storage.Bridge, arg1 error) *MockIBridgeGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeGetByIDCall) Do(f func(context.Context, uint64) (*storage.Bridge, error)) *IBridgeGetByIDCall { +func (c *MockIBridgeGetByIDCall) Do(f func(context.Context, uint64) (*storage.Bridge, error)) *MockIBridgeGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Bridge, error)) *IBridgeGetByIDCall { +func (c *MockIBridgeGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Bridge, error)) *MockIBridgeGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -247,31 +245,31 @@ func (m *MockIBridge) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIBridgeMockRecorder) IsNoRows(err any) *IBridgeIsNoRowsCall { +func (mr *MockIBridgeMockRecorder) IsNoRows(err any) *MockIBridgeIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIBridge)(nil).IsNoRows), err) - return &IBridgeIsNoRowsCall{Call: call} + return &MockIBridgeIsNoRowsCall{Call: call} } -// IBridgeIsNoRowsCall wrap *gomock.Call -type IBridgeIsNoRowsCall struct { +// MockIBridgeIsNoRowsCall wrap *gomock.Call +type MockIBridgeIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeIsNoRowsCall) Return(arg0 bool) *IBridgeIsNoRowsCall { +func (c *MockIBridgeIsNoRowsCall) Return(arg0 bool) *MockIBridgeIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeIsNoRowsCall) Do(f func(error) bool) *IBridgeIsNoRowsCall { +func (c *MockIBridgeIsNoRowsCall) Do(f func(error) bool) *MockIBridgeIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeIsNoRowsCall) DoAndReturn(f func(error) bool) *IBridgeIsNoRowsCall { +func (c *MockIBridgeIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIBridgeIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -286,31 +284,31 @@ func (m *MockIBridge) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIBridgeMockRecorder) LastID(ctx any) *IBridgeLastIDCall { +func (mr *MockIBridgeMockRecorder) LastID(ctx any) *MockIBridgeLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIBridge)(nil).LastID), ctx) - return &IBridgeLastIDCall{Call: call} + return &MockIBridgeLastIDCall{Call: call} } -// IBridgeLastIDCall wrap *gomock.Call -type IBridgeLastIDCall struct { +// MockIBridgeLastIDCall wrap *gomock.Call +type MockIBridgeLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeLastIDCall) Return(arg0 uint64, arg1 error) *IBridgeLastIDCall { +func (c *MockIBridgeLastIDCall) Return(arg0 uint64, arg1 error) *MockIBridgeLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeLastIDCall) Do(f func(context.Context) (uint64, error)) *IBridgeLastIDCall { +func (c *MockIBridgeLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIBridgeLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IBridgeLastIDCall { +func (c *MockIBridgeLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIBridgeLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -325,31 +323,31 @@ func (m *MockIBridge) List(ctx context.Context, limit, offset uint64, order stor } // List indicates an expected call of List. -func (mr *MockIBridgeMockRecorder) List(ctx, limit, offset, order any) *IBridgeListCall { +func (mr *MockIBridgeMockRecorder) List(ctx, limit, offset, order any) *MockIBridgeListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIBridge)(nil).List), ctx, limit, offset, order) - return &IBridgeListCall{Call: call} + return &MockIBridgeListCall{Call: call} } -// IBridgeListCall wrap *gomock.Call -type IBridgeListCall struct { +// MockIBridgeListCall wrap *gomock.Call +type MockIBridgeListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeListCall) Return(arg0 []*storage.Bridge, arg1 error) *IBridgeListCall { +func (c *MockIBridgeListCall) Return(arg0 []*storage.Bridge, arg1 error) *MockIBridgeListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Bridge, error)) *IBridgeListCall { +func (c *MockIBridgeListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Bridge, error)) *MockIBridgeListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Bridge, error)) *IBridgeListCall { +func (c *MockIBridgeListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Bridge, error)) *MockIBridgeListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -363,31 +361,31 @@ func (m_2 *MockIBridge) Save(ctx context.Context, m *storage.Bridge) error { } // Save indicates an expected call of Save. -func (mr *MockIBridgeMockRecorder) Save(ctx, m any) *IBridgeSaveCall { +func (mr *MockIBridgeMockRecorder) Save(ctx, m any) *MockIBridgeSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIBridge)(nil).Save), ctx, m) - return &IBridgeSaveCall{Call: call} + return &MockIBridgeSaveCall{Call: call} } -// IBridgeSaveCall wrap *gomock.Call -type IBridgeSaveCall struct { +// MockIBridgeSaveCall wrap *gomock.Call +type MockIBridgeSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeSaveCall) Return(arg0 error) *IBridgeSaveCall { +func (c *MockIBridgeSaveCall) Return(arg0 error) *MockIBridgeSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeSaveCall) Do(f func(context.Context, *storage.Bridge) error) *IBridgeSaveCall { +func (c *MockIBridgeSaveCall) Do(f func(context.Context, *storage.Bridge) error) *MockIBridgeSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeSaveCall) DoAndReturn(f func(context.Context, *storage.Bridge) error) *IBridgeSaveCall { +func (c *MockIBridgeSaveCall) DoAndReturn(f func(context.Context, *storage.Bridge) error) *MockIBridgeSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -401,31 +399,31 @@ func (m_2 *MockIBridge) Update(ctx context.Context, m *storage.Bridge) error { } // Update indicates an expected call of Update. -func (mr *MockIBridgeMockRecorder) Update(ctx, m any) *IBridgeUpdateCall { +func (mr *MockIBridgeMockRecorder) Update(ctx, m any) *MockIBridgeUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIBridge)(nil).Update), ctx, m) - return &IBridgeUpdateCall{Call: call} + return &MockIBridgeUpdateCall{Call: call} } -// IBridgeUpdateCall wrap *gomock.Call -type IBridgeUpdateCall struct { +// MockIBridgeUpdateCall wrap *gomock.Call +type MockIBridgeUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IBridgeUpdateCall) Return(arg0 error) *IBridgeUpdateCall { +func (c *MockIBridgeUpdateCall) Return(arg0 error) *MockIBridgeUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IBridgeUpdateCall) Do(f func(context.Context, *storage.Bridge) error) *IBridgeUpdateCall { +func (c *MockIBridgeUpdateCall) Do(f func(context.Context, *storage.Bridge) error) *MockIBridgeUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IBridgeUpdateCall) DoAndReturn(f func(context.Context, *storage.Bridge) error) *IBridgeUpdateCall { +func (c *MockIBridgeUpdateCall) DoAndReturn(f func(context.Context, *storage.Bridge) error) *MockIBridgeUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/constant.go b/internal/storage/mock/constant.go index c3525dc..1fe723e 100644 --- a/internal/storage/mock/constant.go +++ b/internal/storage/mock/constant.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: constant.go // @@ -8,6 +5,7 @@ // // mockgen -source=constant.go -destination=mock/constant.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockIConstant) All(ctx context.Context) ([]storage.Constant, error) { } // All indicates an expected call of All. -func (mr *MockIConstantMockRecorder) All(ctx any) *IConstantAllCall { +func (mr *MockIConstantMockRecorder) All(ctx any) *MockIConstantAllCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockIConstant)(nil).All), ctx) - return &IConstantAllCall{Call: call} + return &MockIConstantAllCall{Call: call} } -// IConstantAllCall wrap *gomock.Call -type IConstantAllCall struct { +// MockIConstantAllCall wrap *gomock.Call +type MockIConstantAllCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IConstantAllCall) Return(arg0 []storage.Constant, arg1 error) *IConstantAllCall { +func (c *MockIConstantAllCall) Return(arg0 []storage.Constant, arg1 error) *MockIConstantAllCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IConstantAllCall) Do(f func(context.Context) ([]storage.Constant, error)) *IConstantAllCall { +func (c *MockIConstantAllCall) Do(f func(context.Context) ([]storage.Constant, error)) *MockIConstantAllCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IConstantAllCall) DoAndReturn(f func(context.Context) ([]storage.Constant, error)) *IConstantAllCall { +func (c *MockIConstantAllCall) DoAndReturn(f func(context.Context) ([]storage.Constant, error)) *MockIConstantAllCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +90,31 @@ func (m *MockIConstant) ByModule(ctx context.Context, module types.ModuleName) ( } // ByModule indicates an expected call of ByModule. -func (mr *MockIConstantMockRecorder) ByModule(ctx, module any) *IConstantByModuleCall { +func (mr *MockIConstantMockRecorder) ByModule(ctx, module any) *MockIConstantByModuleCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByModule", reflect.TypeOf((*MockIConstant)(nil).ByModule), ctx, module) - return &IConstantByModuleCall{Call: call} + return &MockIConstantByModuleCall{Call: call} } -// IConstantByModuleCall wrap *gomock.Call -type IConstantByModuleCall struct { +// MockIConstantByModuleCall wrap *gomock.Call +type MockIConstantByModuleCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IConstantByModuleCall) Return(arg0 []storage.Constant, arg1 error) *IConstantByModuleCall { +func (c *MockIConstantByModuleCall) Return(arg0 []storage.Constant, arg1 error) *MockIConstantByModuleCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IConstantByModuleCall) Do(f func(context.Context, types.ModuleName) ([]storage.Constant, error)) *IConstantByModuleCall { +func (c *MockIConstantByModuleCall) Do(f func(context.Context, types.ModuleName) ([]storage.Constant, error)) *MockIConstantByModuleCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IConstantByModuleCall) DoAndReturn(f func(context.Context, types.ModuleName) ([]storage.Constant, error)) *IConstantByModuleCall { +func (c *MockIConstantByModuleCall) DoAndReturn(f func(context.Context, types.ModuleName) ([]storage.Constant, error)) *MockIConstantByModuleCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,31 +129,31 @@ func (m *MockIConstant) Get(ctx context.Context, module types.ModuleName, name s } // Get indicates an expected call of Get. -func (mr *MockIConstantMockRecorder) Get(ctx, module, name any) *IConstantGetCall { +func (mr *MockIConstantMockRecorder) Get(ctx, module, name any) *MockIConstantGetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIConstant)(nil).Get), ctx, module, name) - return &IConstantGetCall{Call: call} + return &MockIConstantGetCall{Call: call} } -// IConstantGetCall wrap *gomock.Call -type IConstantGetCall struct { +// MockIConstantGetCall wrap *gomock.Call +type MockIConstantGetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IConstantGetCall) Return(arg0 storage.Constant, arg1 error) *IConstantGetCall { +func (c *MockIConstantGetCall) Return(arg0 storage.Constant, arg1 error) *MockIConstantGetCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IConstantGetCall) Do(f func(context.Context, types.ModuleName, string) (storage.Constant, error)) *IConstantGetCall { +func (c *MockIConstantGetCall) Do(f func(context.Context, types.ModuleName, string) (storage.Constant, error)) *MockIConstantGetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IConstantGetCall) DoAndReturn(f func(context.Context, types.ModuleName, string) (storage.Constant, error)) *IConstantGetCall { +func (c *MockIConstantGetCall) DoAndReturn(f func(context.Context, types.ModuleName, string) (storage.Constant, error)) *MockIConstantGetCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +167,31 @@ func (m *MockIConstant) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIConstantMockRecorder) IsNoRows(err any) *IConstantIsNoRowsCall { +func (mr *MockIConstantMockRecorder) IsNoRows(err any) *MockIConstantIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIConstant)(nil).IsNoRows), err) - return &IConstantIsNoRowsCall{Call: call} + return &MockIConstantIsNoRowsCall{Call: call} } -// IConstantIsNoRowsCall wrap *gomock.Call -type IConstantIsNoRowsCall struct { +// MockIConstantIsNoRowsCall wrap *gomock.Call +type MockIConstantIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IConstantIsNoRowsCall) Return(arg0 bool) *IConstantIsNoRowsCall { +func (c *MockIConstantIsNoRowsCall) Return(arg0 bool) *MockIConstantIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IConstantIsNoRowsCall) Do(f func(error) bool) *IConstantIsNoRowsCall { +func (c *MockIConstantIsNoRowsCall) Do(f func(error) bool) *MockIConstantIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IConstantIsNoRowsCall) DoAndReturn(f func(error) bool) *IConstantIsNoRowsCall { +func (c *MockIConstantIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIConstantIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/generic.go b/internal/storage/mock/generic.go index 6fe562b..d99bc86 100644 --- a/internal/storage/mock/generic.go +++ b/internal/storage/mock/generic.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: generic.go // @@ -8,6 +5,7 @@ // // mockgen -source=generic.go -destination=mock/generic.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -55,31 +53,31 @@ func (m *MockTransaction) Add(ctx context.Context, model any) error { } // Add indicates an expected call of Add. -func (mr *MockTransactionMockRecorder) Add(ctx, model any) *TransactionAddCall { +func (mr *MockTransactionMockRecorder) Add(ctx, model any) *MockTransactionAddCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockTransaction)(nil).Add), ctx, model) - return &TransactionAddCall{Call: call} + return &MockTransactionAddCall{Call: call} } -// TransactionAddCall wrap *gomock.Call -type TransactionAddCall struct { +// MockTransactionAddCall wrap *gomock.Call +type MockTransactionAddCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionAddCall) Return(arg0 error) *TransactionAddCall { +func (c *MockTransactionAddCall) Return(arg0 error) *MockTransactionAddCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionAddCall) Do(f func(context.Context, any) error) *TransactionAddCall { +func (c *MockTransactionAddCall) Do(f func(context.Context, any) error) *MockTransactionAddCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionAddCall) DoAndReturn(f func(context.Context, any) error) *TransactionAddCall { +func (c *MockTransactionAddCall) DoAndReturn(f func(context.Context, any) error) *MockTransactionAddCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -93,31 +91,31 @@ func (m *MockTransaction) BulkSave(ctx context.Context, models []any) error { } // BulkSave indicates an expected call of BulkSave. -func (mr *MockTransactionMockRecorder) BulkSave(ctx, models any) *TransactionBulkSaveCall { +func (mr *MockTransactionMockRecorder) BulkSave(ctx, models any) *MockTransactionBulkSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BulkSave", reflect.TypeOf((*MockTransaction)(nil).BulkSave), ctx, models) - return &TransactionBulkSaveCall{Call: call} + return &MockTransactionBulkSaveCall{Call: call} } -// TransactionBulkSaveCall wrap *gomock.Call -type TransactionBulkSaveCall struct { +// MockTransactionBulkSaveCall wrap *gomock.Call +type MockTransactionBulkSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionBulkSaveCall) Return(arg0 error) *TransactionBulkSaveCall { +func (c *MockTransactionBulkSaveCall) Return(arg0 error) *MockTransactionBulkSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionBulkSaveCall) Do(f func(context.Context, []any) error) *TransactionBulkSaveCall { +func (c *MockTransactionBulkSaveCall) Do(f func(context.Context, []any) error) *MockTransactionBulkSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionBulkSaveCall) DoAndReturn(f func(context.Context, []any) error) *TransactionBulkSaveCall { +func (c *MockTransactionBulkSaveCall) DoAndReturn(f func(context.Context, []any) error) *MockTransactionBulkSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,31 +129,31 @@ func (m *MockTransaction) Close(ctx context.Context) error { } // Close indicates an expected call of Close. -func (mr *MockTransactionMockRecorder) Close(ctx any) *TransactionCloseCall { +func (mr *MockTransactionMockRecorder) Close(ctx any) *MockTransactionCloseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTransaction)(nil).Close), ctx) - return &TransactionCloseCall{Call: call} + return &MockTransactionCloseCall{Call: call} } -// TransactionCloseCall wrap *gomock.Call -type TransactionCloseCall struct { +// MockTransactionCloseCall wrap *gomock.Call +type MockTransactionCloseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionCloseCall) Return(arg0 error) *TransactionCloseCall { +func (c *MockTransactionCloseCall) Return(arg0 error) *MockTransactionCloseCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionCloseCall) Do(f func(context.Context) error) *TransactionCloseCall { +func (c *MockTransactionCloseCall) Do(f func(context.Context) error) *MockTransactionCloseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionCloseCall) DoAndReturn(f func(context.Context) error) *TransactionCloseCall { +func (c *MockTransactionCloseCall) DoAndReturn(f func(context.Context) error) *MockTransactionCloseCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +167,31 @@ func (m *MockTransaction) CopyFrom(ctx context.Context, tableName string, data [ } // CopyFrom indicates an expected call of CopyFrom. -func (mr *MockTransactionMockRecorder) CopyFrom(ctx, tableName, data any) *TransactionCopyFromCall { +func (mr *MockTransactionMockRecorder) CopyFrom(ctx, tableName, data any) *MockTransactionCopyFromCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyFrom", reflect.TypeOf((*MockTransaction)(nil).CopyFrom), ctx, tableName, data) - return &TransactionCopyFromCall{Call: call} + return &MockTransactionCopyFromCall{Call: call} } -// TransactionCopyFromCall wrap *gomock.Call -type TransactionCopyFromCall struct { +// MockTransactionCopyFromCall wrap *gomock.Call +type MockTransactionCopyFromCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionCopyFromCall) Return(arg0 error) *TransactionCopyFromCall { +func (c *MockTransactionCopyFromCall) Return(arg0 error) *MockTransactionCopyFromCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionCopyFromCall) Do(f func(context.Context, string, []storage0.Copiable) error) *TransactionCopyFromCall { +func (c *MockTransactionCopyFromCall) Do(f func(context.Context, string, []storage0.Copiable) error) *MockTransactionCopyFromCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionCopyFromCall) DoAndReturn(f func(context.Context, string, []storage0.Copiable) error) *TransactionCopyFromCall { +func (c *MockTransactionCopyFromCall) DoAndReturn(f func(context.Context, string, []storage0.Copiable) error) *MockTransactionCopyFromCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -212,32 +210,32 @@ func (m *MockTransaction) Exec(ctx context.Context, query string, params ...any) } // Exec indicates an expected call of Exec. -func (mr *MockTransactionMockRecorder) Exec(ctx, query any, params ...any) *TransactionExecCall { +func (mr *MockTransactionMockRecorder) Exec(ctx, query any, params ...any) *MockTransactionExecCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, query}, params...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockTransaction)(nil).Exec), varargs...) - return &TransactionExecCall{Call: call} + return &MockTransactionExecCall{Call: call} } -// TransactionExecCall wrap *gomock.Call -type TransactionExecCall struct { +// MockTransactionExecCall wrap *gomock.Call +type MockTransactionExecCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionExecCall) Return(arg0 int64, arg1 error) *TransactionExecCall { +func (c *MockTransactionExecCall) Return(arg0 int64, arg1 error) *MockTransactionExecCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionExecCall) Do(f func(context.Context, string, ...any) (int64, error)) *TransactionExecCall { +func (c *MockTransactionExecCall) Do(f func(context.Context, string, ...any) (int64, error)) *MockTransactionExecCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionExecCall) DoAndReturn(f func(context.Context, string, ...any) (int64, error)) *TransactionExecCall { +func (c *MockTransactionExecCall) DoAndReturn(f func(context.Context, string, ...any) (int64, error)) *MockTransactionExecCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -251,31 +249,31 @@ func (m *MockTransaction) Flush(ctx context.Context) error { } // Flush indicates an expected call of Flush. -func (mr *MockTransactionMockRecorder) Flush(ctx any) *TransactionFlushCall { +func (mr *MockTransactionMockRecorder) Flush(ctx any) *MockTransactionFlushCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flush", reflect.TypeOf((*MockTransaction)(nil).Flush), ctx) - return &TransactionFlushCall{Call: call} + return &MockTransactionFlushCall{Call: call} } -// TransactionFlushCall wrap *gomock.Call -type TransactionFlushCall struct { +// MockTransactionFlushCall wrap *gomock.Call +type MockTransactionFlushCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionFlushCall) Return(arg0 error) *TransactionFlushCall { +func (c *MockTransactionFlushCall) Return(arg0 error) *MockTransactionFlushCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionFlushCall) Do(f func(context.Context) error) *TransactionFlushCall { +func (c *MockTransactionFlushCall) Do(f func(context.Context) error) *MockTransactionFlushCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionFlushCall) DoAndReturn(f func(context.Context) error) *TransactionFlushCall { +func (c *MockTransactionFlushCall) DoAndReturn(f func(context.Context) error) *MockTransactionFlushCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -290,31 +288,31 @@ func (m *MockTransaction) GetProposerId(ctx context.Context, address string) (ui } // GetProposerId indicates an expected call of GetProposerId. -func (mr *MockTransactionMockRecorder) GetProposerId(ctx, address any) *TransactionGetProposerIdCall { +func (mr *MockTransactionMockRecorder) GetProposerId(ctx, address any) *MockTransactionGetProposerIdCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposerId", reflect.TypeOf((*MockTransaction)(nil).GetProposerId), ctx, address) - return &TransactionGetProposerIdCall{Call: call} + return &MockTransactionGetProposerIdCall{Call: call} } -// TransactionGetProposerIdCall wrap *gomock.Call -type TransactionGetProposerIdCall struct { +// MockTransactionGetProposerIdCall wrap *gomock.Call +type MockTransactionGetProposerIdCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionGetProposerIdCall) Return(arg0 uint64, arg1 error) *TransactionGetProposerIdCall { +func (c *MockTransactionGetProposerIdCall) Return(arg0 uint64, arg1 error) *MockTransactionGetProposerIdCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionGetProposerIdCall) Do(f func(context.Context, string) (uint64, error)) *TransactionGetProposerIdCall { +func (c *MockTransactionGetProposerIdCall) Do(f func(context.Context, string) (uint64, error)) *MockTransactionGetProposerIdCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionGetProposerIdCall) DoAndReturn(f func(context.Context, string) (uint64, error)) *TransactionGetProposerIdCall { +func (c *MockTransactionGetProposerIdCall) DoAndReturn(f func(context.Context, string) (uint64, error)) *MockTransactionGetProposerIdCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -329,31 +327,31 @@ func (m *MockTransaction) GetRollup(ctx context.Context, rollupId []byte) (stora } // GetRollup indicates an expected call of GetRollup. -func (mr *MockTransactionMockRecorder) GetRollup(ctx, rollupId any) *TransactionGetRollupCall { +func (mr *MockTransactionMockRecorder) GetRollup(ctx, rollupId any) *MockTransactionGetRollupCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRollup", reflect.TypeOf((*MockTransaction)(nil).GetRollup), ctx, rollupId) - return &TransactionGetRollupCall{Call: call} + return &MockTransactionGetRollupCall{Call: call} } -// TransactionGetRollupCall wrap *gomock.Call -type TransactionGetRollupCall struct { +// MockTransactionGetRollupCall wrap *gomock.Call +type MockTransactionGetRollupCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionGetRollupCall) Return(arg0 storage.Rollup, arg1 error) *TransactionGetRollupCall { +func (c *MockTransactionGetRollupCall) Return(arg0 storage.Rollup, arg1 error) *MockTransactionGetRollupCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionGetRollupCall) Do(f func(context.Context, []byte) (storage.Rollup, error)) *TransactionGetRollupCall { +func (c *MockTransactionGetRollupCall) Do(f func(context.Context, []byte) (storage.Rollup, error)) *MockTransactionGetRollupCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionGetRollupCall) DoAndReturn(f func(context.Context, []byte) (storage.Rollup, error)) *TransactionGetRollupCall { +func (c *MockTransactionGetRollupCall) DoAndReturn(f func(context.Context, []byte) (storage.Rollup, error)) *MockTransactionGetRollupCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -367,31 +365,31 @@ func (m *MockTransaction) HandleError(ctx context.Context, err error) error { } // HandleError indicates an expected call of HandleError. -func (mr *MockTransactionMockRecorder) HandleError(ctx, err any) *TransactionHandleErrorCall { +func (mr *MockTransactionMockRecorder) HandleError(ctx, err any) *MockTransactionHandleErrorCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleError", reflect.TypeOf((*MockTransaction)(nil).HandleError), ctx, err) - return &TransactionHandleErrorCall{Call: call} + return &MockTransactionHandleErrorCall{Call: call} } -// TransactionHandleErrorCall wrap *gomock.Call -type TransactionHandleErrorCall struct { +// MockTransactionHandleErrorCall wrap *gomock.Call +type MockTransactionHandleErrorCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionHandleErrorCall) Return(arg0 error) *TransactionHandleErrorCall { +func (c *MockTransactionHandleErrorCall) Return(arg0 error) *MockTransactionHandleErrorCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionHandleErrorCall) Do(f func(context.Context, error) error) *TransactionHandleErrorCall { +func (c *MockTransactionHandleErrorCall) Do(f func(context.Context, error) error) *MockTransactionHandleErrorCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionHandleErrorCall) DoAndReturn(f func(context.Context, error) error) *TransactionHandleErrorCall { +func (c *MockTransactionHandleErrorCall) DoAndReturn(f func(context.Context, error) error) *MockTransactionHandleErrorCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -406,31 +404,31 @@ func (m *MockTransaction) LastBlock(ctx context.Context) (storage.Block, error) } // LastBlock indicates an expected call of LastBlock. -func (mr *MockTransactionMockRecorder) LastBlock(ctx any) *TransactionLastBlockCall { +func (mr *MockTransactionMockRecorder) LastBlock(ctx any) *MockTransactionLastBlockCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastBlock", reflect.TypeOf((*MockTransaction)(nil).LastBlock), ctx) - return &TransactionLastBlockCall{Call: call} + return &MockTransactionLastBlockCall{Call: call} } -// TransactionLastBlockCall wrap *gomock.Call -type TransactionLastBlockCall struct { +// MockTransactionLastBlockCall wrap *gomock.Call +type MockTransactionLastBlockCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionLastBlockCall) Return(block storage.Block, err error) *TransactionLastBlockCall { +func (c *MockTransactionLastBlockCall) Return(block storage.Block, err error) *MockTransactionLastBlockCall { c.Call = c.Call.Return(block, err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionLastBlockCall) Do(f func(context.Context) (storage.Block, error)) *TransactionLastBlockCall { +func (c *MockTransactionLastBlockCall) Do(f func(context.Context) (storage.Block, error)) *MockTransactionLastBlockCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionLastBlockCall) DoAndReturn(f func(context.Context) (storage.Block, error)) *TransactionLastBlockCall { +func (c *MockTransactionLastBlockCall) DoAndReturn(f func(context.Context) (storage.Block, error)) *MockTransactionLastBlockCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -445,31 +443,31 @@ func (m *MockTransaction) LastNonce(ctx context.Context, id uint64) (uint32, err } // LastNonce indicates an expected call of LastNonce. -func (mr *MockTransactionMockRecorder) LastNonce(ctx, id any) *TransactionLastNonceCall { +func (mr *MockTransactionMockRecorder) LastNonce(ctx, id any) *MockTransactionLastNonceCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastNonce", reflect.TypeOf((*MockTransaction)(nil).LastNonce), ctx, id) - return &TransactionLastNonceCall{Call: call} + return &MockTransactionLastNonceCall{Call: call} } -// TransactionLastNonceCall wrap *gomock.Call -type TransactionLastNonceCall struct { +// MockTransactionLastNonceCall wrap *gomock.Call +type MockTransactionLastNonceCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionLastNonceCall) Return(arg0 uint32, arg1 error) *TransactionLastNonceCall { +func (c *MockTransactionLastNonceCall) Return(arg0 uint32, arg1 error) *MockTransactionLastNonceCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionLastNonceCall) Do(f func(context.Context, uint64) (uint32, error)) *TransactionLastNonceCall { +func (c *MockTransactionLastNonceCall) Do(f func(context.Context, uint64) (uint32, error)) *MockTransactionLastNonceCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionLastNonceCall) DoAndReturn(f func(context.Context, uint64) (uint32, error)) *TransactionLastNonceCall { +func (c *MockTransactionLastNonceCall) DoAndReturn(f func(context.Context, uint64) (uint32, error)) *MockTransactionLastNonceCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -483,31 +481,31 @@ func (m *MockTransaction) RetentionBlockSignatures(ctx context.Context, height t } // RetentionBlockSignatures indicates an expected call of RetentionBlockSignatures. -func (mr *MockTransactionMockRecorder) RetentionBlockSignatures(ctx, height any) *TransactionRetentionBlockSignaturesCall { +func (mr *MockTransactionMockRecorder) RetentionBlockSignatures(ctx, height any) *MockTransactionRetentionBlockSignaturesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RetentionBlockSignatures", reflect.TypeOf((*MockTransaction)(nil).RetentionBlockSignatures), ctx, height) - return &TransactionRetentionBlockSignaturesCall{Call: call} + return &MockTransactionRetentionBlockSignaturesCall{Call: call} } -// TransactionRetentionBlockSignaturesCall wrap *gomock.Call -type TransactionRetentionBlockSignaturesCall struct { +// MockTransactionRetentionBlockSignaturesCall wrap *gomock.Call +type MockTransactionRetentionBlockSignaturesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRetentionBlockSignaturesCall) Return(arg0 error) *TransactionRetentionBlockSignaturesCall { +func (c *MockTransactionRetentionBlockSignaturesCall) Return(arg0 error) *MockTransactionRetentionBlockSignaturesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRetentionBlockSignaturesCall) Do(f func(context.Context, types.Level) error) *TransactionRetentionBlockSignaturesCall { +func (c *MockTransactionRetentionBlockSignaturesCall) Do(f func(context.Context, types.Level) error) *MockTransactionRetentionBlockSignaturesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRetentionBlockSignaturesCall) DoAndReturn(f func(context.Context, types.Level) error) *TransactionRetentionBlockSignaturesCall { +func (c *MockTransactionRetentionBlockSignaturesCall) DoAndReturn(f func(context.Context, types.Level) error) *MockTransactionRetentionBlockSignaturesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -521,31 +519,31 @@ func (m *MockTransaction) Rollback(ctx context.Context) error { } // Rollback indicates an expected call of Rollback. -func (mr *MockTransactionMockRecorder) Rollback(ctx any) *TransactionRollbackCall { +func (mr *MockTransactionMockRecorder) Rollback(ctx any) *MockTransactionRollbackCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockTransaction)(nil).Rollback), ctx) - return &TransactionRollbackCall{Call: call} + return &MockTransactionRollbackCall{Call: call} } -// TransactionRollbackCall wrap *gomock.Call -type TransactionRollbackCall struct { +// MockTransactionRollbackCall wrap *gomock.Call +type MockTransactionRollbackCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackCall) Return(arg0 error) *TransactionRollbackCall { +func (c *MockTransactionRollbackCall) Return(arg0 error) *MockTransactionRollbackCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackCall) Do(f func(context.Context) error) *TransactionRollbackCall { +func (c *MockTransactionRollbackCall) Do(f func(context.Context) error) *MockTransactionRollbackCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackCall) DoAndReturn(f func(context.Context) error) *TransactionRollbackCall { +func (c *MockTransactionRollbackCall) DoAndReturn(f func(context.Context) error) *MockTransactionRollbackCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -560,31 +558,31 @@ func (m *MockTransaction) RollbackActions(ctx context.Context, height types.Leve } // RollbackActions indicates an expected call of RollbackActions. -func (mr *MockTransactionMockRecorder) RollbackActions(ctx, height any) *TransactionRollbackActionsCall { +func (mr *MockTransactionMockRecorder) RollbackActions(ctx, height any) *MockTransactionRollbackActionsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackActions", reflect.TypeOf((*MockTransaction)(nil).RollbackActions), ctx, height) - return &TransactionRollbackActionsCall{Call: call} + return &MockTransactionRollbackActionsCall{Call: call} } -// TransactionRollbackActionsCall wrap *gomock.Call -type TransactionRollbackActionsCall struct { +// MockTransactionRollbackActionsCall wrap *gomock.Call +type MockTransactionRollbackActionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackActionsCall) Return(actions []storage.Action, err error) *TransactionRollbackActionsCall { +func (c *MockTransactionRollbackActionsCall) Return(actions []storage.Action, err error) *MockTransactionRollbackActionsCall { c.Call = c.Call.Return(actions, err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackActionsCall) Do(f func(context.Context, types.Level) ([]storage.Action, error)) *TransactionRollbackActionsCall { +func (c *MockTransactionRollbackActionsCall) Do(f func(context.Context, types.Level) ([]storage.Action, error)) *MockTransactionRollbackActionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackActionsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.Action, error)) *TransactionRollbackActionsCall { +func (c *MockTransactionRollbackActionsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.Action, error)) *MockTransactionRollbackActionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -599,31 +597,31 @@ func (m *MockTransaction) RollbackAddressActions(ctx context.Context, height typ } // RollbackAddressActions indicates an expected call of RollbackAddressActions. -func (mr *MockTransactionMockRecorder) RollbackAddressActions(ctx, height any) *TransactionRollbackAddressActionsCall { +func (mr *MockTransactionMockRecorder) RollbackAddressActions(ctx, height any) *MockTransactionRollbackAddressActionsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackAddressActions", reflect.TypeOf((*MockTransaction)(nil).RollbackAddressActions), ctx, height) - return &TransactionRollbackAddressActionsCall{Call: call} + return &MockTransactionRollbackAddressActionsCall{Call: call} } -// TransactionRollbackAddressActionsCall wrap *gomock.Call -type TransactionRollbackAddressActionsCall struct { +// MockTransactionRollbackAddressActionsCall wrap *gomock.Call +type MockTransactionRollbackAddressActionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackAddressActionsCall) Return(addrActions []storage.AddressAction, err error) *TransactionRollbackAddressActionsCall { +func (c *MockTransactionRollbackAddressActionsCall) Return(addrActions []storage.AddressAction, err error) *MockTransactionRollbackAddressActionsCall { c.Call = c.Call.Return(addrActions, err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackAddressActionsCall) Do(f func(context.Context, types.Level) ([]storage.AddressAction, error)) *TransactionRollbackAddressActionsCall { +func (c *MockTransactionRollbackAddressActionsCall) Do(f func(context.Context, types.Level) ([]storage.AddressAction, error)) *MockTransactionRollbackAddressActionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackAddressActionsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.AddressAction, error)) *TransactionRollbackAddressActionsCall { +func (c *MockTransactionRollbackAddressActionsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.AddressAction, error)) *MockTransactionRollbackAddressActionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -638,31 +636,31 @@ func (m *MockTransaction) RollbackAddresses(ctx context.Context, height types.Le } // RollbackAddresses indicates an expected call of RollbackAddresses. -func (mr *MockTransactionMockRecorder) RollbackAddresses(ctx, height any) *TransactionRollbackAddressesCall { +func (mr *MockTransactionMockRecorder) RollbackAddresses(ctx, height any) *MockTransactionRollbackAddressesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackAddresses", reflect.TypeOf((*MockTransaction)(nil).RollbackAddresses), ctx, height) - return &TransactionRollbackAddressesCall{Call: call} + return &MockTransactionRollbackAddressesCall{Call: call} } -// TransactionRollbackAddressesCall wrap *gomock.Call -type TransactionRollbackAddressesCall struct { +// MockTransactionRollbackAddressesCall wrap *gomock.Call +type MockTransactionRollbackAddressesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackAddressesCall) Return(address []storage.Address, err error) *TransactionRollbackAddressesCall { +func (c *MockTransactionRollbackAddressesCall) Return(address []storage.Address, err error) *MockTransactionRollbackAddressesCall { c.Call = c.Call.Return(address, err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackAddressesCall) Do(f func(context.Context, types.Level) ([]storage.Address, error)) *TransactionRollbackAddressesCall { +func (c *MockTransactionRollbackAddressesCall) Do(f func(context.Context, types.Level) ([]storage.Address, error)) *MockTransactionRollbackAddressesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackAddressesCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.Address, error)) *TransactionRollbackAddressesCall { +func (c *MockTransactionRollbackAddressesCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.Address, error)) *MockTransactionRollbackAddressesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -677,31 +675,31 @@ func (m *MockTransaction) RollbackBalanceUpdates(ctx context.Context, height typ } // RollbackBalanceUpdates indicates an expected call of RollbackBalanceUpdates. -func (mr *MockTransactionMockRecorder) RollbackBalanceUpdates(ctx, height any) *TransactionRollbackBalanceUpdatesCall { +func (mr *MockTransactionMockRecorder) RollbackBalanceUpdates(ctx, height any) *MockTransactionRollbackBalanceUpdatesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackBalanceUpdates", reflect.TypeOf((*MockTransaction)(nil).RollbackBalanceUpdates), ctx, height) - return &TransactionRollbackBalanceUpdatesCall{Call: call} + return &MockTransactionRollbackBalanceUpdatesCall{Call: call} } -// TransactionRollbackBalanceUpdatesCall wrap *gomock.Call -type TransactionRollbackBalanceUpdatesCall struct { +// MockTransactionRollbackBalanceUpdatesCall wrap *gomock.Call +type MockTransactionRollbackBalanceUpdatesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackBalanceUpdatesCall) Return(arg0 []storage.BalanceUpdate, arg1 error) *TransactionRollbackBalanceUpdatesCall { +func (c *MockTransactionRollbackBalanceUpdatesCall) Return(arg0 []storage.BalanceUpdate, arg1 error) *MockTransactionRollbackBalanceUpdatesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackBalanceUpdatesCall) Do(f func(context.Context, types.Level) ([]storage.BalanceUpdate, error)) *TransactionRollbackBalanceUpdatesCall { +func (c *MockTransactionRollbackBalanceUpdatesCall) Do(f func(context.Context, types.Level) ([]storage.BalanceUpdate, error)) *MockTransactionRollbackBalanceUpdatesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackBalanceUpdatesCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.BalanceUpdate, error)) *TransactionRollbackBalanceUpdatesCall { +func (c *MockTransactionRollbackBalanceUpdatesCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.BalanceUpdate, error)) *MockTransactionRollbackBalanceUpdatesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -715,31 +713,31 @@ func (m *MockTransaction) RollbackBalances(ctx context.Context, ids []uint64) er } // RollbackBalances indicates an expected call of RollbackBalances. -func (mr *MockTransactionMockRecorder) RollbackBalances(ctx, ids any) *TransactionRollbackBalancesCall { +func (mr *MockTransactionMockRecorder) RollbackBalances(ctx, ids any) *MockTransactionRollbackBalancesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackBalances", reflect.TypeOf((*MockTransaction)(nil).RollbackBalances), ctx, ids) - return &TransactionRollbackBalancesCall{Call: call} + return &MockTransactionRollbackBalancesCall{Call: call} } -// TransactionRollbackBalancesCall wrap *gomock.Call -type TransactionRollbackBalancesCall struct { +// MockTransactionRollbackBalancesCall wrap *gomock.Call +type MockTransactionRollbackBalancesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackBalancesCall) Return(arg0 error) *TransactionRollbackBalancesCall { +func (c *MockTransactionRollbackBalancesCall) Return(arg0 error) *MockTransactionRollbackBalancesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackBalancesCall) Do(f func(context.Context, []uint64) error) *TransactionRollbackBalancesCall { +func (c *MockTransactionRollbackBalancesCall) Do(f func(context.Context, []uint64) error) *MockTransactionRollbackBalancesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackBalancesCall) DoAndReturn(f func(context.Context, []uint64) error) *TransactionRollbackBalancesCall { +func (c *MockTransactionRollbackBalancesCall) DoAndReturn(f func(context.Context, []uint64) error) *MockTransactionRollbackBalancesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -753,31 +751,31 @@ func (m *MockTransaction) RollbackBlock(ctx context.Context, height types.Level) } // RollbackBlock indicates an expected call of RollbackBlock. -func (mr *MockTransactionMockRecorder) RollbackBlock(ctx, height any) *TransactionRollbackBlockCall { +func (mr *MockTransactionMockRecorder) RollbackBlock(ctx, height any) *MockTransactionRollbackBlockCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackBlock", reflect.TypeOf((*MockTransaction)(nil).RollbackBlock), ctx, height) - return &TransactionRollbackBlockCall{Call: call} + return &MockTransactionRollbackBlockCall{Call: call} } -// TransactionRollbackBlockCall wrap *gomock.Call -type TransactionRollbackBlockCall struct { +// MockTransactionRollbackBlockCall wrap *gomock.Call +type MockTransactionRollbackBlockCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackBlockCall) Return(arg0 error) *TransactionRollbackBlockCall { +func (c *MockTransactionRollbackBlockCall) Return(arg0 error) *MockTransactionRollbackBlockCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackBlockCall) Do(f func(context.Context, types.Level) error) *TransactionRollbackBlockCall { +func (c *MockTransactionRollbackBlockCall) Do(f func(context.Context, types.Level) error) *MockTransactionRollbackBlockCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackBlockCall) DoAndReturn(f func(context.Context, types.Level) error) *TransactionRollbackBlockCall { +func (c *MockTransactionRollbackBlockCall) DoAndReturn(f func(context.Context, types.Level) error) *MockTransactionRollbackBlockCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -791,31 +789,31 @@ func (m *MockTransaction) RollbackBlockSignatures(ctx context.Context, height ty } // RollbackBlockSignatures indicates an expected call of RollbackBlockSignatures. -func (mr *MockTransactionMockRecorder) RollbackBlockSignatures(ctx, height any) *TransactionRollbackBlockSignaturesCall { +func (mr *MockTransactionMockRecorder) RollbackBlockSignatures(ctx, height any) *MockTransactionRollbackBlockSignaturesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackBlockSignatures", reflect.TypeOf((*MockTransaction)(nil).RollbackBlockSignatures), ctx, height) - return &TransactionRollbackBlockSignaturesCall{Call: call} + return &MockTransactionRollbackBlockSignaturesCall{Call: call} } -// TransactionRollbackBlockSignaturesCall wrap *gomock.Call -type TransactionRollbackBlockSignaturesCall struct { +// MockTransactionRollbackBlockSignaturesCall wrap *gomock.Call +type MockTransactionRollbackBlockSignaturesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackBlockSignaturesCall) Return(err error) *TransactionRollbackBlockSignaturesCall { +func (c *MockTransactionRollbackBlockSignaturesCall) Return(err error) *MockTransactionRollbackBlockSignaturesCall { c.Call = c.Call.Return(err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackBlockSignaturesCall) Do(f func(context.Context, types.Level) error) *TransactionRollbackBlockSignaturesCall { +func (c *MockTransactionRollbackBlockSignaturesCall) Do(f func(context.Context, types.Level) error) *MockTransactionRollbackBlockSignaturesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackBlockSignaturesCall) DoAndReturn(f func(context.Context, types.Level) error) *TransactionRollbackBlockSignaturesCall { +func (c *MockTransactionRollbackBlockSignaturesCall) DoAndReturn(f func(context.Context, types.Level) error) *MockTransactionRollbackBlockSignaturesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -830,31 +828,31 @@ func (m *MockTransaction) RollbackBlockStats(ctx context.Context, height types.L } // RollbackBlockStats indicates an expected call of RollbackBlockStats. -func (mr *MockTransactionMockRecorder) RollbackBlockStats(ctx, height any) *TransactionRollbackBlockStatsCall { +func (mr *MockTransactionMockRecorder) RollbackBlockStats(ctx, height any) *MockTransactionRollbackBlockStatsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackBlockStats", reflect.TypeOf((*MockTransaction)(nil).RollbackBlockStats), ctx, height) - return &TransactionRollbackBlockStatsCall{Call: call} + return &MockTransactionRollbackBlockStatsCall{Call: call} } -// TransactionRollbackBlockStatsCall wrap *gomock.Call -type TransactionRollbackBlockStatsCall struct { +// MockTransactionRollbackBlockStatsCall wrap *gomock.Call +type MockTransactionRollbackBlockStatsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackBlockStatsCall) Return(stats storage.BlockStats, err error) *TransactionRollbackBlockStatsCall { +func (c *MockTransactionRollbackBlockStatsCall) Return(stats storage.BlockStats, err error) *MockTransactionRollbackBlockStatsCall { c.Call = c.Call.Return(stats, err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackBlockStatsCall) Do(f func(context.Context, types.Level) (storage.BlockStats, error)) *TransactionRollbackBlockStatsCall { +func (c *MockTransactionRollbackBlockStatsCall) Do(f func(context.Context, types.Level) (storage.BlockStats, error)) *MockTransactionRollbackBlockStatsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackBlockStatsCall) DoAndReturn(f func(context.Context, types.Level) (storage.BlockStats, error)) *TransactionRollbackBlockStatsCall { +func (c *MockTransactionRollbackBlockStatsCall) DoAndReturn(f func(context.Context, types.Level) (storage.BlockStats, error)) *MockTransactionRollbackBlockStatsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -868,31 +866,69 @@ func (m *MockTransaction) RollbackBridges(ctx context.Context, height types.Leve } // RollbackBridges indicates an expected call of RollbackBridges. -func (mr *MockTransactionMockRecorder) RollbackBridges(ctx, height any) *TransactionRollbackBridgesCall { +func (mr *MockTransactionMockRecorder) RollbackBridges(ctx, height any) *MockTransactionRollbackBridgesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackBridges", reflect.TypeOf((*MockTransaction)(nil).RollbackBridges), ctx, height) - return &TransactionRollbackBridgesCall{Call: call} + return &MockTransactionRollbackBridgesCall{Call: call} } -// TransactionRollbackBridgesCall wrap *gomock.Call -type TransactionRollbackBridgesCall struct { +// MockTransactionRollbackBridgesCall wrap *gomock.Call +type MockTransactionRollbackBridgesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackBridgesCall) Return(arg0 error) *TransactionRollbackBridgesCall { +func (c *MockTransactionRollbackBridgesCall) Return(arg0 error) *MockTransactionRollbackBridgesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackBridgesCall) Do(f func(context.Context, types.Level) error) *TransactionRollbackBridgesCall { +func (c *MockTransactionRollbackBridgesCall) Do(f func(context.Context, types.Level) error) *MockTransactionRollbackBridgesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackBridgesCall) DoAndReturn(f func(context.Context, types.Level) error) *TransactionRollbackBridgesCall { +func (c *MockTransactionRollbackBridgesCall) DoAndReturn(f func(context.Context, types.Level) error) *MockTransactionRollbackBridgesCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// RollbackFees mocks base method. +func (m *MockTransaction) RollbackFees(ctx context.Context, height types.Level) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RollbackFees", ctx, height) + ret0, _ := ret[0].(error) + return ret0 +} + +// RollbackFees indicates an expected call of RollbackFees. +func (mr *MockTransactionMockRecorder) RollbackFees(ctx, height any) *MockTransactionRollbackFeesCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackFees", reflect.TypeOf((*MockTransaction)(nil).RollbackFees), ctx, height) + return &MockTransactionRollbackFeesCall{Call: call} +} + +// MockTransactionRollbackFeesCall wrap *gomock.Call +type MockTransactionRollbackFeesCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTransactionRollbackFeesCall) Return(err error) *MockTransactionRollbackFeesCall { + c.Call = c.Call.Return(err) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTransactionRollbackFeesCall) Do(f func(context.Context, types.Level) error) *MockTransactionRollbackFeesCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTransactionRollbackFeesCall) DoAndReturn(f func(context.Context, types.Level) error) *MockTransactionRollbackFeesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -907,31 +943,31 @@ func (m *MockTransaction) RollbackRollupActions(ctx context.Context, height type } // RollbackRollupActions indicates an expected call of RollbackRollupActions. -func (mr *MockTransactionMockRecorder) RollbackRollupActions(ctx, height any) *TransactionRollbackRollupActionsCall { +func (mr *MockTransactionMockRecorder) RollbackRollupActions(ctx, height any) *MockTransactionRollbackRollupActionsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackRollupActions", reflect.TypeOf((*MockTransaction)(nil).RollbackRollupActions), ctx, height) - return &TransactionRollbackRollupActionsCall{Call: call} + return &MockTransactionRollbackRollupActionsCall{Call: call} } -// TransactionRollbackRollupActionsCall wrap *gomock.Call -type TransactionRollbackRollupActionsCall struct { +// MockTransactionRollbackRollupActionsCall wrap *gomock.Call +type MockTransactionRollbackRollupActionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackRollupActionsCall) Return(rollupActions []storage.RollupAction, err error) *TransactionRollbackRollupActionsCall { +func (c *MockTransactionRollbackRollupActionsCall) Return(rollupActions []storage.RollupAction, err error) *MockTransactionRollbackRollupActionsCall { c.Call = c.Call.Return(rollupActions, err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackRollupActionsCall) Do(f func(context.Context, types.Level) ([]storage.RollupAction, error)) *TransactionRollbackRollupActionsCall { +func (c *MockTransactionRollbackRollupActionsCall) Do(f func(context.Context, types.Level) ([]storage.RollupAction, error)) *MockTransactionRollbackRollupActionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackRollupActionsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.RollupAction, error)) *TransactionRollbackRollupActionsCall { +func (c *MockTransactionRollbackRollupActionsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.RollupAction, error)) *MockTransactionRollbackRollupActionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -945,31 +981,31 @@ func (m *MockTransaction) RollbackRollupAddresses(ctx context.Context, height ty } // RollbackRollupAddresses indicates an expected call of RollbackRollupAddresses. -func (mr *MockTransactionMockRecorder) RollbackRollupAddresses(ctx, height any) *TransactionRollbackRollupAddressesCall { +func (mr *MockTransactionMockRecorder) RollbackRollupAddresses(ctx, height any) *MockTransactionRollbackRollupAddressesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackRollupAddresses", reflect.TypeOf((*MockTransaction)(nil).RollbackRollupAddresses), ctx, height) - return &TransactionRollbackRollupAddressesCall{Call: call} + return &MockTransactionRollbackRollupAddressesCall{Call: call} } -// TransactionRollbackRollupAddressesCall wrap *gomock.Call -type TransactionRollbackRollupAddressesCall struct { +// MockTransactionRollbackRollupAddressesCall wrap *gomock.Call +type MockTransactionRollbackRollupAddressesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackRollupAddressesCall) Return(err error) *TransactionRollbackRollupAddressesCall { +func (c *MockTransactionRollbackRollupAddressesCall) Return(err error) *MockTransactionRollbackRollupAddressesCall { c.Call = c.Call.Return(err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackRollupAddressesCall) Do(f func(context.Context, types.Level) error) *TransactionRollbackRollupAddressesCall { +func (c *MockTransactionRollbackRollupAddressesCall) Do(f func(context.Context, types.Level) error) *MockTransactionRollbackRollupAddressesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackRollupAddressesCall) DoAndReturn(f func(context.Context, types.Level) error) *TransactionRollbackRollupAddressesCall { +func (c *MockTransactionRollbackRollupAddressesCall) DoAndReturn(f func(context.Context, types.Level) error) *MockTransactionRollbackRollupAddressesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -984,31 +1020,31 @@ func (m *MockTransaction) RollbackRollups(ctx context.Context, height types.Leve } // RollbackRollups indicates an expected call of RollbackRollups. -func (mr *MockTransactionMockRecorder) RollbackRollups(ctx, height any) *TransactionRollbackRollupsCall { +func (mr *MockTransactionMockRecorder) RollbackRollups(ctx, height any) *MockTransactionRollbackRollupsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackRollups", reflect.TypeOf((*MockTransaction)(nil).RollbackRollups), ctx, height) - return &TransactionRollbackRollupsCall{Call: call} + return &MockTransactionRollbackRollupsCall{Call: call} } -// TransactionRollbackRollupsCall wrap *gomock.Call -type TransactionRollbackRollupsCall struct { +// MockTransactionRollbackRollupsCall wrap *gomock.Call +type MockTransactionRollbackRollupsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackRollupsCall) Return(arg0 []storage.Rollup, arg1 error) *TransactionRollbackRollupsCall { +func (c *MockTransactionRollbackRollupsCall) Return(arg0 []storage.Rollup, arg1 error) *MockTransactionRollbackRollupsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackRollupsCall) Do(f func(context.Context, types.Level) ([]storage.Rollup, error)) *TransactionRollbackRollupsCall { +func (c *MockTransactionRollbackRollupsCall) Do(f func(context.Context, types.Level) ([]storage.Rollup, error)) *MockTransactionRollbackRollupsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackRollupsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.Rollup, error)) *TransactionRollbackRollupsCall { +func (c *MockTransactionRollbackRollupsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.Rollup, error)) *MockTransactionRollbackRollupsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1023,31 +1059,31 @@ func (m *MockTransaction) RollbackTxs(ctx context.Context, height types.Level) ( } // RollbackTxs indicates an expected call of RollbackTxs. -func (mr *MockTransactionMockRecorder) RollbackTxs(ctx, height any) *TransactionRollbackTxsCall { +func (mr *MockTransactionMockRecorder) RollbackTxs(ctx, height any) *MockTransactionRollbackTxsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackTxs", reflect.TypeOf((*MockTransaction)(nil).RollbackTxs), ctx, height) - return &TransactionRollbackTxsCall{Call: call} + return &MockTransactionRollbackTxsCall{Call: call} } -// TransactionRollbackTxsCall wrap *gomock.Call -type TransactionRollbackTxsCall struct { +// MockTransactionRollbackTxsCall wrap *gomock.Call +type MockTransactionRollbackTxsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackTxsCall) Return(txs []storage.Tx, err error) *TransactionRollbackTxsCall { +func (c *MockTransactionRollbackTxsCall) Return(txs []storage.Tx, err error) *MockTransactionRollbackTxsCall { c.Call = c.Call.Return(txs, err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackTxsCall) Do(f func(context.Context, types.Level) ([]storage.Tx, error)) *TransactionRollbackTxsCall { +func (c *MockTransactionRollbackTxsCall) Do(f func(context.Context, types.Level) ([]storage.Tx, error)) *MockTransactionRollbackTxsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackTxsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.Tx, error)) *TransactionRollbackTxsCall { +func (c *MockTransactionRollbackTxsCall) DoAndReturn(f func(context.Context, types.Level) ([]storage.Tx, error)) *MockTransactionRollbackTxsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1061,31 +1097,31 @@ func (m *MockTransaction) RollbackValidators(ctx context.Context, height types.L } // RollbackValidators indicates an expected call of RollbackValidators. -func (mr *MockTransactionMockRecorder) RollbackValidators(ctx, height any) *TransactionRollbackValidatorsCall { +func (mr *MockTransactionMockRecorder) RollbackValidators(ctx, height any) *MockTransactionRollbackValidatorsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackValidators", reflect.TypeOf((*MockTransaction)(nil).RollbackValidators), ctx, height) - return &TransactionRollbackValidatorsCall{Call: call} + return &MockTransactionRollbackValidatorsCall{Call: call} } -// TransactionRollbackValidatorsCall wrap *gomock.Call -type TransactionRollbackValidatorsCall struct { +// MockTransactionRollbackValidatorsCall wrap *gomock.Call +type MockTransactionRollbackValidatorsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionRollbackValidatorsCall) Return(err error) *TransactionRollbackValidatorsCall { +func (c *MockTransactionRollbackValidatorsCall) Return(err error) *MockTransactionRollbackValidatorsCall { c.Call = c.Call.Return(err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionRollbackValidatorsCall) Do(f func(context.Context, types.Level) error) *TransactionRollbackValidatorsCall { +func (c *MockTransactionRollbackValidatorsCall) Do(f func(context.Context, types.Level) error) *MockTransactionRollbackValidatorsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionRollbackValidatorsCall) DoAndReturn(f func(context.Context, types.Level) error) *TransactionRollbackValidatorsCall { +func (c *MockTransactionRollbackValidatorsCall) DoAndReturn(f func(context.Context, types.Level) error) *MockTransactionRollbackValidatorsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1103,32 +1139,32 @@ func (m *MockTransaction) SaveActions(ctx context.Context, actions ...*storage.A } // SaveActions indicates an expected call of SaveActions. -func (mr *MockTransactionMockRecorder) SaveActions(ctx any, actions ...any) *TransactionSaveActionsCall { +func (mr *MockTransactionMockRecorder) SaveActions(ctx any, actions ...any) *MockTransactionSaveActionsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, actions...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveActions", reflect.TypeOf((*MockTransaction)(nil).SaveActions), varargs...) - return &TransactionSaveActionsCall{Call: call} + return &MockTransactionSaveActionsCall{Call: call} } -// TransactionSaveActionsCall wrap *gomock.Call -type TransactionSaveActionsCall struct { +// MockTransactionSaveActionsCall wrap *gomock.Call +type MockTransactionSaveActionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveActionsCall) Return(arg0 error) *TransactionSaveActionsCall { +func (c *MockTransactionSaveActionsCall) Return(arg0 error) *MockTransactionSaveActionsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveActionsCall) Do(f func(context.Context, ...*storage.Action) error) *TransactionSaveActionsCall { +func (c *MockTransactionSaveActionsCall) Do(f func(context.Context, ...*storage.Action) error) *MockTransactionSaveActionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveActionsCall) DoAndReturn(f func(context.Context, ...*storage.Action) error) *TransactionSaveActionsCall { +func (c *MockTransactionSaveActionsCall) DoAndReturn(f func(context.Context, ...*storage.Action) error) *MockTransactionSaveActionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1146,32 +1182,32 @@ func (m *MockTransaction) SaveAddressActions(ctx context.Context, actions ...*st } // SaveAddressActions indicates an expected call of SaveAddressActions. -func (mr *MockTransactionMockRecorder) SaveAddressActions(ctx any, actions ...any) *TransactionSaveAddressActionsCall { +func (mr *MockTransactionMockRecorder) SaveAddressActions(ctx any, actions ...any) *MockTransactionSaveAddressActionsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, actions...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveAddressActions", reflect.TypeOf((*MockTransaction)(nil).SaveAddressActions), varargs...) - return &TransactionSaveAddressActionsCall{Call: call} + return &MockTransactionSaveAddressActionsCall{Call: call} } -// TransactionSaveAddressActionsCall wrap *gomock.Call -type TransactionSaveAddressActionsCall struct { +// MockTransactionSaveAddressActionsCall wrap *gomock.Call +type MockTransactionSaveAddressActionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveAddressActionsCall) Return(arg0 error) *TransactionSaveAddressActionsCall { +func (c *MockTransactionSaveAddressActionsCall) Return(arg0 error) *MockTransactionSaveAddressActionsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveAddressActionsCall) Do(f func(context.Context, ...*storage.AddressAction) error) *TransactionSaveAddressActionsCall { +func (c *MockTransactionSaveAddressActionsCall) Do(f func(context.Context, ...*storage.AddressAction) error) *MockTransactionSaveAddressActionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveAddressActionsCall) DoAndReturn(f func(context.Context, ...*storage.AddressAction) error) *TransactionSaveAddressActionsCall { +func (c *MockTransactionSaveAddressActionsCall) DoAndReturn(f func(context.Context, ...*storage.AddressAction) error) *MockTransactionSaveAddressActionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1190,32 +1226,32 @@ func (m *MockTransaction) SaveAddresses(ctx context.Context, addresses ...*stora } // SaveAddresses indicates an expected call of SaveAddresses. -func (mr *MockTransactionMockRecorder) SaveAddresses(ctx any, addresses ...any) *TransactionSaveAddressesCall { +func (mr *MockTransactionMockRecorder) SaveAddresses(ctx any, addresses ...any) *MockTransactionSaveAddressesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, addresses...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveAddresses", reflect.TypeOf((*MockTransaction)(nil).SaveAddresses), varargs...) - return &TransactionSaveAddressesCall{Call: call} + return &MockTransactionSaveAddressesCall{Call: call} } -// TransactionSaveAddressesCall wrap *gomock.Call -type TransactionSaveAddressesCall struct { +// MockTransactionSaveAddressesCall wrap *gomock.Call +type MockTransactionSaveAddressesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveAddressesCall) Return(arg0 int64, arg1 error) *TransactionSaveAddressesCall { +func (c *MockTransactionSaveAddressesCall) Return(arg0 int64, arg1 error) *MockTransactionSaveAddressesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveAddressesCall) Do(f func(context.Context, ...*storage.Address) (int64, error)) *TransactionSaveAddressesCall { +func (c *MockTransactionSaveAddressesCall) Do(f func(context.Context, ...*storage.Address) (int64, error)) *MockTransactionSaveAddressesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveAddressesCall) DoAndReturn(f func(context.Context, ...*storage.Address) (int64, error)) *TransactionSaveAddressesCall { +func (c *MockTransactionSaveAddressesCall) DoAndReturn(f func(context.Context, ...*storage.Address) (int64, error)) *MockTransactionSaveAddressesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1233,32 +1269,32 @@ func (m *MockTransaction) SaveBalanceUpdates(ctx context.Context, updates ...sto } // SaveBalanceUpdates indicates an expected call of SaveBalanceUpdates. -func (mr *MockTransactionMockRecorder) SaveBalanceUpdates(ctx any, updates ...any) *TransactionSaveBalanceUpdatesCall { +func (mr *MockTransactionMockRecorder) SaveBalanceUpdates(ctx any, updates ...any) *MockTransactionSaveBalanceUpdatesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, updates...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveBalanceUpdates", reflect.TypeOf((*MockTransaction)(nil).SaveBalanceUpdates), varargs...) - return &TransactionSaveBalanceUpdatesCall{Call: call} + return &MockTransactionSaveBalanceUpdatesCall{Call: call} } -// TransactionSaveBalanceUpdatesCall wrap *gomock.Call -type TransactionSaveBalanceUpdatesCall struct { +// MockTransactionSaveBalanceUpdatesCall wrap *gomock.Call +type MockTransactionSaveBalanceUpdatesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveBalanceUpdatesCall) Return(arg0 error) *TransactionSaveBalanceUpdatesCall { +func (c *MockTransactionSaveBalanceUpdatesCall) Return(arg0 error) *MockTransactionSaveBalanceUpdatesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveBalanceUpdatesCall) Do(f func(context.Context, ...storage.BalanceUpdate) error) *TransactionSaveBalanceUpdatesCall { +func (c *MockTransactionSaveBalanceUpdatesCall) Do(f func(context.Context, ...storage.BalanceUpdate) error) *MockTransactionSaveBalanceUpdatesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveBalanceUpdatesCall) DoAndReturn(f func(context.Context, ...storage.BalanceUpdate) error) *TransactionSaveBalanceUpdatesCall { +func (c *MockTransactionSaveBalanceUpdatesCall) DoAndReturn(f func(context.Context, ...storage.BalanceUpdate) error) *MockTransactionSaveBalanceUpdatesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1276,32 +1312,32 @@ func (m *MockTransaction) SaveBalances(ctx context.Context, balances ...storage. } // SaveBalances indicates an expected call of SaveBalances. -func (mr *MockTransactionMockRecorder) SaveBalances(ctx any, balances ...any) *TransactionSaveBalancesCall { +func (mr *MockTransactionMockRecorder) SaveBalances(ctx any, balances ...any) *MockTransactionSaveBalancesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, balances...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveBalances", reflect.TypeOf((*MockTransaction)(nil).SaveBalances), varargs...) - return &TransactionSaveBalancesCall{Call: call} + return &MockTransactionSaveBalancesCall{Call: call} } -// TransactionSaveBalancesCall wrap *gomock.Call -type TransactionSaveBalancesCall struct { +// MockTransactionSaveBalancesCall wrap *gomock.Call +type MockTransactionSaveBalancesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveBalancesCall) Return(arg0 error) *TransactionSaveBalancesCall { +func (c *MockTransactionSaveBalancesCall) Return(arg0 error) *MockTransactionSaveBalancesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveBalancesCall) Do(f func(context.Context, ...storage.Balance) error) *TransactionSaveBalancesCall { +func (c *MockTransactionSaveBalancesCall) Do(f func(context.Context, ...storage.Balance) error) *MockTransactionSaveBalancesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveBalancesCall) DoAndReturn(f func(context.Context, ...storage.Balance) error) *TransactionSaveBalancesCall { +func (c *MockTransactionSaveBalancesCall) DoAndReturn(f func(context.Context, ...storage.Balance) error) *MockTransactionSaveBalancesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1319,32 +1355,32 @@ func (m *MockTransaction) SaveBlockSignatures(ctx context.Context, signs ...stor } // SaveBlockSignatures indicates an expected call of SaveBlockSignatures. -func (mr *MockTransactionMockRecorder) SaveBlockSignatures(ctx any, signs ...any) *TransactionSaveBlockSignaturesCall { +func (mr *MockTransactionMockRecorder) SaveBlockSignatures(ctx any, signs ...any) *MockTransactionSaveBlockSignaturesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, signs...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveBlockSignatures", reflect.TypeOf((*MockTransaction)(nil).SaveBlockSignatures), varargs...) - return &TransactionSaveBlockSignaturesCall{Call: call} + return &MockTransactionSaveBlockSignaturesCall{Call: call} } -// TransactionSaveBlockSignaturesCall wrap *gomock.Call -type TransactionSaveBlockSignaturesCall struct { +// MockTransactionSaveBlockSignaturesCall wrap *gomock.Call +type MockTransactionSaveBlockSignaturesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveBlockSignaturesCall) Return(arg0 error) *TransactionSaveBlockSignaturesCall { +func (c *MockTransactionSaveBlockSignaturesCall) Return(arg0 error) *MockTransactionSaveBlockSignaturesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveBlockSignaturesCall) Do(f func(context.Context, ...storage.BlockSignature) error) *TransactionSaveBlockSignaturesCall { +func (c *MockTransactionSaveBlockSignaturesCall) Do(f func(context.Context, ...storage.BlockSignature) error) *MockTransactionSaveBlockSignaturesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveBlockSignaturesCall) DoAndReturn(f func(context.Context, ...storage.BlockSignature) error) *TransactionSaveBlockSignaturesCall { +func (c *MockTransactionSaveBlockSignaturesCall) DoAndReturn(f func(context.Context, ...storage.BlockSignature) error) *MockTransactionSaveBlockSignaturesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1362,32 +1398,32 @@ func (m *MockTransaction) SaveBridges(ctx context.Context, bridges ...*storage.B } // SaveBridges indicates an expected call of SaveBridges. -func (mr *MockTransactionMockRecorder) SaveBridges(ctx any, bridges ...any) *TransactionSaveBridgesCall { +func (mr *MockTransactionMockRecorder) SaveBridges(ctx any, bridges ...any) *MockTransactionSaveBridgesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, bridges...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveBridges", reflect.TypeOf((*MockTransaction)(nil).SaveBridges), varargs...) - return &TransactionSaveBridgesCall{Call: call} + return &MockTransactionSaveBridgesCall{Call: call} } -// TransactionSaveBridgesCall wrap *gomock.Call -type TransactionSaveBridgesCall struct { +// MockTransactionSaveBridgesCall wrap *gomock.Call +type MockTransactionSaveBridgesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveBridgesCall) Return(arg0 error) *TransactionSaveBridgesCall { +func (c *MockTransactionSaveBridgesCall) Return(arg0 error) *MockTransactionSaveBridgesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveBridgesCall) Do(f func(context.Context, ...*storage.Bridge) error) *TransactionSaveBridgesCall { +func (c *MockTransactionSaveBridgesCall) Do(f func(context.Context, ...*storage.Bridge) error) *MockTransactionSaveBridgesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveBridgesCall) DoAndReturn(f func(context.Context, ...*storage.Bridge) error) *TransactionSaveBridgesCall { +func (c *MockTransactionSaveBridgesCall) DoAndReturn(f func(context.Context, ...*storage.Bridge) error) *MockTransactionSaveBridgesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1405,32 +1441,75 @@ func (m *MockTransaction) SaveConstants(ctx context.Context, constants ...storag } // SaveConstants indicates an expected call of SaveConstants. -func (mr *MockTransactionMockRecorder) SaveConstants(ctx any, constants ...any) *TransactionSaveConstantsCall { +func (mr *MockTransactionMockRecorder) SaveConstants(ctx any, constants ...any) *MockTransactionSaveConstantsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, constants...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveConstants", reflect.TypeOf((*MockTransaction)(nil).SaveConstants), varargs...) - return &TransactionSaveConstantsCall{Call: call} + return &MockTransactionSaveConstantsCall{Call: call} +} + +// MockTransactionSaveConstantsCall wrap *gomock.Call +type MockTransactionSaveConstantsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockTransactionSaveConstantsCall) Return(arg0 error) *MockTransactionSaveConstantsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockTransactionSaveConstantsCall) Do(f func(context.Context, ...storage.Constant) error) *MockTransactionSaveConstantsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockTransactionSaveConstantsCall) DoAndReturn(f func(context.Context, ...storage.Constant) error) *MockTransactionSaveConstantsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// SaveFees mocks base method. +func (m *MockTransaction) SaveFees(ctx context.Context, fees ...*storage.Fee) error { + m.ctrl.T.Helper() + varargs := []any{ctx} + for _, a := range fees { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SaveFees", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// SaveFees indicates an expected call of SaveFees. +func (mr *MockTransactionMockRecorder) SaveFees(ctx any, fees ...any) *MockTransactionSaveFeesCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx}, fees...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveFees", reflect.TypeOf((*MockTransaction)(nil).SaveFees), varargs...) + return &MockTransactionSaveFeesCall{Call: call} } -// TransactionSaveConstantsCall wrap *gomock.Call -type TransactionSaveConstantsCall struct { +// MockTransactionSaveFeesCall wrap *gomock.Call +type MockTransactionSaveFeesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveConstantsCall) Return(arg0 error) *TransactionSaveConstantsCall { +func (c *MockTransactionSaveFeesCall) Return(arg0 error) *MockTransactionSaveFeesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveConstantsCall) Do(f func(context.Context, ...storage.Constant) error) *TransactionSaveConstantsCall { +func (c *MockTransactionSaveFeesCall) Do(f func(context.Context, ...*storage.Fee) error) *MockTransactionSaveFeesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveConstantsCall) DoAndReturn(f func(context.Context, ...storage.Constant) error) *TransactionSaveConstantsCall { +func (c *MockTransactionSaveFeesCall) DoAndReturn(f func(context.Context, ...*storage.Fee) error) *MockTransactionSaveFeesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1448,32 +1527,32 @@ func (m *MockTransaction) SaveRollupActions(ctx context.Context, actions ...*sto } // SaveRollupActions indicates an expected call of SaveRollupActions. -func (mr *MockTransactionMockRecorder) SaveRollupActions(ctx any, actions ...any) *TransactionSaveRollupActionsCall { +func (mr *MockTransactionMockRecorder) SaveRollupActions(ctx any, actions ...any) *MockTransactionSaveRollupActionsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, actions...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveRollupActions", reflect.TypeOf((*MockTransaction)(nil).SaveRollupActions), varargs...) - return &TransactionSaveRollupActionsCall{Call: call} + return &MockTransactionSaveRollupActionsCall{Call: call} } -// TransactionSaveRollupActionsCall wrap *gomock.Call -type TransactionSaveRollupActionsCall struct { +// MockTransactionSaveRollupActionsCall wrap *gomock.Call +type MockTransactionSaveRollupActionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveRollupActionsCall) Return(arg0 error) *TransactionSaveRollupActionsCall { +func (c *MockTransactionSaveRollupActionsCall) Return(arg0 error) *MockTransactionSaveRollupActionsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveRollupActionsCall) Do(f func(context.Context, ...*storage.RollupAction) error) *TransactionSaveRollupActionsCall { +func (c *MockTransactionSaveRollupActionsCall) Do(f func(context.Context, ...*storage.RollupAction) error) *MockTransactionSaveRollupActionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveRollupActionsCall) DoAndReturn(f func(context.Context, ...*storage.RollupAction) error) *TransactionSaveRollupActionsCall { +func (c *MockTransactionSaveRollupActionsCall) DoAndReturn(f func(context.Context, ...*storage.RollupAction) error) *MockTransactionSaveRollupActionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1491,32 +1570,32 @@ func (m *MockTransaction) SaveRollupAddresses(ctx context.Context, addresses ... } // SaveRollupAddresses indicates an expected call of SaveRollupAddresses. -func (mr *MockTransactionMockRecorder) SaveRollupAddresses(ctx any, addresses ...any) *TransactionSaveRollupAddressesCall { +func (mr *MockTransactionMockRecorder) SaveRollupAddresses(ctx any, addresses ...any) *MockTransactionSaveRollupAddressesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, addresses...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveRollupAddresses", reflect.TypeOf((*MockTransaction)(nil).SaveRollupAddresses), varargs...) - return &TransactionSaveRollupAddressesCall{Call: call} + return &MockTransactionSaveRollupAddressesCall{Call: call} } -// TransactionSaveRollupAddressesCall wrap *gomock.Call -type TransactionSaveRollupAddressesCall struct { +// MockTransactionSaveRollupAddressesCall wrap *gomock.Call +type MockTransactionSaveRollupAddressesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveRollupAddressesCall) Return(arg0 error) *TransactionSaveRollupAddressesCall { +func (c *MockTransactionSaveRollupAddressesCall) Return(arg0 error) *MockTransactionSaveRollupAddressesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveRollupAddressesCall) Do(f func(context.Context, ...*storage.RollupAddress) error) *TransactionSaveRollupAddressesCall { +func (c *MockTransactionSaveRollupAddressesCall) Do(f func(context.Context, ...*storage.RollupAddress) error) *MockTransactionSaveRollupAddressesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveRollupAddressesCall) DoAndReturn(f func(context.Context, ...*storage.RollupAddress) error) *TransactionSaveRollupAddressesCall { +func (c *MockTransactionSaveRollupAddressesCall) DoAndReturn(f func(context.Context, ...*storage.RollupAddress) error) *MockTransactionSaveRollupAddressesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1535,32 +1614,32 @@ func (m *MockTransaction) SaveRollups(ctx context.Context, rollups ...*storage.R } // SaveRollups indicates an expected call of SaveRollups. -func (mr *MockTransactionMockRecorder) SaveRollups(ctx any, rollups ...any) *TransactionSaveRollupsCall { +func (mr *MockTransactionMockRecorder) SaveRollups(ctx any, rollups ...any) *MockTransactionSaveRollupsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, rollups...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveRollups", reflect.TypeOf((*MockTransaction)(nil).SaveRollups), varargs...) - return &TransactionSaveRollupsCall{Call: call} + return &MockTransactionSaveRollupsCall{Call: call} } -// TransactionSaveRollupsCall wrap *gomock.Call -type TransactionSaveRollupsCall struct { +// MockTransactionSaveRollupsCall wrap *gomock.Call +type MockTransactionSaveRollupsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveRollupsCall) Return(arg0 int64, arg1 error) *TransactionSaveRollupsCall { +func (c *MockTransactionSaveRollupsCall) Return(arg0 int64, arg1 error) *MockTransactionSaveRollupsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveRollupsCall) Do(f func(context.Context, ...*storage.Rollup) (int64, error)) *TransactionSaveRollupsCall { +func (c *MockTransactionSaveRollupsCall) Do(f func(context.Context, ...*storage.Rollup) (int64, error)) *MockTransactionSaveRollupsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveRollupsCall) DoAndReturn(f func(context.Context, ...*storage.Rollup) (int64, error)) *TransactionSaveRollupsCall { +func (c *MockTransactionSaveRollupsCall) DoAndReturn(f func(context.Context, ...*storage.Rollup) (int64, error)) *MockTransactionSaveRollupsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1578,32 +1657,32 @@ func (m *MockTransaction) SaveTransactions(ctx context.Context, txs ...*storage. } // SaveTransactions indicates an expected call of SaveTransactions. -func (mr *MockTransactionMockRecorder) SaveTransactions(ctx any, txs ...any) *TransactionSaveTransactionsCall { +func (mr *MockTransactionMockRecorder) SaveTransactions(ctx any, txs ...any) *MockTransactionSaveTransactionsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, txs...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveTransactions", reflect.TypeOf((*MockTransaction)(nil).SaveTransactions), varargs...) - return &TransactionSaveTransactionsCall{Call: call} + return &MockTransactionSaveTransactionsCall{Call: call} } -// TransactionSaveTransactionsCall wrap *gomock.Call -type TransactionSaveTransactionsCall struct { +// MockTransactionSaveTransactionsCall wrap *gomock.Call +type MockTransactionSaveTransactionsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveTransactionsCall) Return(arg0 error) *TransactionSaveTransactionsCall { +func (c *MockTransactionSaveTransactionsCall) Return(arg0 error) *MockTransactionSaveTransactionsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveTransactionsCall) Do(f func(context.Context, ...*storage.Tx) error) *TransactionSaveTransactionsCall { +func (c *MockTransactionSaveTransactionsCall) Do(f func(context.Context, ...*storage.Tx) error) *MockTransactionSaveTransactionsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveTransactionsCall) DoAndReturn(f func(context.Context, ...*storage.Tx) error) *TransactionSaveTransactionsCall { +func (c *MockTransactionSaveTransactionsCall) DoAndReturn(f func(context.Context, ...*storage.Tx) error) *MockTransactionSaveTransactionsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1621,32 +1700,32 @@ func (m *MockTransaction) SaveValidators(ctx context.Context, validators ...*sto } // SaveValidators indicates an expected call of SaveValidators. -func (mr *MockTransactionMockRecorder) SaveValidators(ctx any, validators ...any) *TransactionSaveValidatorsCall { +func (mr *MockTransactionMockRecorder) SaveValidators(ctx any, validators ...any) *MockTransactionSaveValidatorsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, validators...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveValidators", reflect.TypeOf((*MockTransaction)(nil).SaveValidators), varargs...) - return &TransactionSaveValidatorsCall{Call: call} + return &MockTransactionSaveValidatorsCall{Call: call} } -// TransactionSaveValidatorsCall wrap *gomock.Call -type TransactionSaveValidatorsCall struct { +// MockTransactionSaveValidatorsCall wrap *gomock.Call +type MockTransactionSaveValidatorsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionSaveValidatorsCall) Return(arg0 error) *TransactionSaveValidatorsCall { +func (c *MockTransactionSaveValidatorsCall) Return(arg0 error) *MockTransactionSaveValidatorsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionSaveValidatorsCall) Do(f func(context.Context, ...*storage.Validator) error) *TransactionSaveValidatorsCall { +func (c *MockTransactionSaveValidatorsCall) Do(f func(context.Context, ...*storage.Validator) error) *MockTransactionSaveValidatorsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionSaveValidatorsCall) DoAndReturn(f func(context.Context, ...*storage.Validator) error) *TransactionSaveValidatorsCall { +func (c *MockTransactionSaveValidatorsCall) DoAndReturn(f func(context.Context, ...*storage.Validator) error) *MockTransactionSaveValidatorsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1661,31 +1740,31 @@ func (m *MockTransaction) State(ctx context.Context, name string) (storage.State } // State indicates an expected call of State. -func (mr *MockTransactionMockRecorder) State(ctx, name any) *TransactionStateCall { +func (mr *MockTransactionMockRecorder) State(ctx, name any) *MockTransactionStateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockTransaction)(nil).State), ctx, name) - return &TransactionStateCall{Call: call} + return &MockTransactionStateCall{Call: call} } -// TransactionStateCall wrap *gomock.Call -type TransactionStateCall struct { +// MockTransactionStateCall wrap *gomock.Call +type MockTransactionStateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionStateCall) Return(state storage.State, err error) *TransactionStateCall { +func (c *MockTransactionStateCall) Return(state storage.State, err error) *MockTransactionStateCall { c.Call = c.Call.Return(state, err) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionStateCall) Do(f func(context.Context, string) (storage.State, error)) *TransactionStateCall { +func (c *MockTransactionStateCall) Do(f func(context.Context, string) (storage.State, error)) *MockTransactionStateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionStateCall) DoAndReturn(f func(context.Context, string) (storage.State, error)) *TransactionStateCall { +func (c *MockTransactionStateCall) DoAndReturn(f func(context.Context, string) (storage.State, error)) *MockTransactionStateCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1699,31 +1778,31 @@ func (m *MockTransaction) Tx() *bun.Tx { } // Tx indicates an expected call of Tx. -func (mr *MockTransactionMockRecorder) Tx() *TransactionTxCall { +func (mr *MockTransactionMockRecorder) Tx() *MockTransactionTxCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tx", reflect.TypeOf((*MockTransaction)(nil).Tx)) - return &TransactionTxCall{Call: call} + return &MockTransactionTxCall{Call: call} } -// TransactionTxCall wrap *gomock.Call -type TransactionTxCall struct { +// MockTransactionTxCall wrap *gomock.Call +type MockTransactionTxCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionTxCall) Return(arg0 *bun.Tx) *TransactionTxCall { +func (c *MockTransactionTxCall) Return(arg0 *bun.Tx) *MockTransactionTxCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionTxCall) Do(f func() *bun.Tx) *TransactionTxCall { +func (c *MockTransactionTxCall) Do(f func() *bun.Tx) *MockTransactionTxCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionTxCall) DoAndReturn(f func() *bun.Tx) *TransactionTxCall { +func (c *MockTransactionTxCall) DoAndReturn(f func() *bun.Tx) *MockTransactionTxCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1737,31 +1816,31 @@ func (m *MockTransaction) Update(ctx context.Context, model any) error { } // Update indicates an expected call of Update. -func (mr *MockTransactionMockRecorder) Update(ctx, model any) *TransactionUpdateCall { +func (mr *MockTransactionMockRecorder) Update(ctx, model any) *MockTransactionUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockTransaction)(nil).Update), ctx, model) - return &TransactionUpdateCall{Call: call} + return &MockTransactionUpdateCall{Call: call} } -// TransactionUpdateCall wrap *gomock.Call -type TransactionUpdateCall struct { +// MockTransactionUpdateCall wrap *gomock.Call +type MockTransactionUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionUpdateCall) Return(arg0 error) *TransactionUpdateCall { +func (c *MockTransactionUpdateCall) Return(arg0 error) *MockTransactionUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionUpdateCall) Do(f func(context.Context, any) error) *TransactionUpdateCall { +func (c *MockTransactionUpdateCall) Do(f func(context.Context, any) error) *MockTransactionUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionUpdateCall) DoAndReturn(f func(context.Context, any) error) *TransactionUpdateCall { +func (c *MockTransactionUpdateCall) DoAndReturn(f func(context.Context, any) error) *MockTransactionUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1779,32 +1858,32 @@ func (m *MockTransaction) UpdateAddresses(ctx context.Context, address ...*stora } // UpdateAddresses indicates an expected call of UpdateAddresses. -func (mr *MockTransactionMockRecorder) UpdateAddresses(ctx any, address ...any) *TransactionUpdateAddressesCall { +func (mr *MockTransactionMockRecorder) UpdateAddresses(ctx any, address ...any) *MockTransactionUpdateAddressesCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, address...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAddresses", reflect.TypeOf((*MockTransaction)(nil).UpdateAddresses), varargs...) - return &TransactionUpdateAddressesCall{Call: call} + return &MockTransactionUpdateAddressesCall{Call: call} } -// TransactionUpdateAddressesCall wrap *gomock.Call -type TransactionUpdateAddressesCall struct { +// MockTransactionUpdateAddressesCall wrap *gomock.Call +type MockTransactionUpdateAddressesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionUpdateAddressesCall) Return(arg0 error) *TransactionUpdateAddressesCall { +func (c *MockTransactionUpdateAddressesCall) Return(arg0 error) *MockTransactionUpdateAddressesCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionUpdateAddressesCall) Do(f func(context.Context, ...*storage.Address) error) *TransactionUpdateAddressesCall { +func (c *MockTransactionUpdateAddressesCall) Do(f func(context.Context, ...*storage.Address) error) *MockTransactionUpdateAddressesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionUpdateAddressesCall) DoAndReturn(f func(context.Context, ...*storage.Address) error) *TransactionUpdateAddressesCall { +func (c *MockTransactionUpdateAddressesCall) DoAndReturn(f func(context.Context, ...*storage.Address) error) *MockTransactionUpdateAddressesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1822,32 +1901,32 @@ func (m *MockTransaction) UpdateConstants(ctx context.Context, constants ...*sto } // UpdateConstants indicates an expected call of UpdateConstants. -func (mr *MockTransactionMockRecorder) UpdateConstants(ctx any, constants ...any) *TransactionUpdateConstantsCall { +func (mr *MockTransactionMockRecorder) UpdateConstants(ctx any, constants ...any) *MockTransactionUpdateConstantsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, constants...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConstants", reflect.TypeOf((*MockTransaction)(nil).UpdateConstants), varargs...) - return &TransactionUpdateConstantsCall{Call: call} + return &MockTransactionUpdateConstantsCall{Call: call} } -// TransactionUpdateConstantsCall wrap *gomock.Call -type TransactionUpdateConstantsCall struct { +// MockTransactionUpdateConstantsCall wrap *gomock.Call +type MockTransactionUpdateConstantsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionUpdateConstantsCall) Return(arg0 error) *TransactionUpdateConstantsCall { +func (c *MockTransactionUpdateConstantsCall) Return(arg0 error) *MockTransactionUpdateConstantsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionUpdateConstantsCall) Do(f func(context.Context, ...*storage.Constant) error) *TransactionUpdateConstantsCall { +func (c *MockTransactionUpdateConstantsCall) Do(f func(context.Context, ...*storage.Constant) error) *MockTransactionUpdateConstantsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionUpdateConstantsCall) DoAndReturn(f func(context.Context, ...*storage.Constant) error) *TransactionUpdateConstantsCall { +func (c *MockTransactionUpdateConstantsCall) DoAndReturn(f func(context.Context, ...*storage.Constant) error) *MockTransactionUpdateConstantsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1865,32 +1944,32 @@ func (m *MockTransaction) UpdateRollups(ctx context.Context, rollups ...*storage } // UpdateRollups indicates an expected call of UpdateRollups. -func (mr *MockTransactionMockRecorder) UpdateRollups(ctx any, rollups ...any) *TransactionUpdateRollupsCall { +func (mr *MockTransactionMockRecorder) UpdateRollups(ctx any, rollups ...any) *MockTransactionUpdateRollupsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, rollups...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRollups", reflect.TypeOf((*MockTransaction)(nil).UpdateRollups), varargs...) - return &TransactionUpdateRollupsCall{Call: call} + return &MockTransactionUpdateRollupsCall{Call: call} } -// TransactionUpdateRollupsCall wrap *gomock.Call -type TransactionUpdateRollupsCall struct { +// MockTransactionUpdateRollupsCall wrap *gomock.Call +type MockTransactionUpdateRollupsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionUpdateRollupsCall) Return(arg0 error) *TransactionUpdateRollupsCall { +func (c *MockTransactionUpdateRollupsCall) Return(arg0 error) *MockTransactionUpdateRollupsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionUpdateRollupsCall) Do(f func(context.Context, ...*storage.Rollup) error) *TransactionUpdateRollupsCall { +func (c *MockTransactionUpdateRollupsCall) Do(f func(context.Context, ...*storage.Rollup) error) *MockTransactionUpdateRollupsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionUpdateRollupsCall) DoAndReturn(f func(context.Context, ...*storage.Rollup) error) *TransactionUpdateRollupsCall { +func (c *MockTransactionUpdateRollupsCall) DoAndReturn(f func(context.Context, ...*storage.Rollup) error) *MockTransactionUpdateRollupsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1908,32 +1987,32 @@ func (m *MockTransaction) UpdateValidators(ctx context.Context, validators ...*s } // UpdateValidators indicates an expected call of UpdateValidators. -func (mr *MockTransactionMockRecorder) UpdateValidators(ctx any, validators ...any) *TransactionUpdateValidatorsCall { +func (mr *MockTransactionMockRecorder) UpdateValidators(ctx any, validators ...any) *MockTransactionUpdateValidatorsCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, validators...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateValidators", reflect.TypeOf((*MockTransaction)(nil).UpdateValidators), varargs...) - return &TransactionUpdateValidatorsCall{Call: call} + return &MockTransactionUpdateValidatorsCall{Call: call} } -// TransactionUpdateValidatorsCall wrap *gomock.Call -type TransactionUpdateValidatorsCall struct { +// MockTransactionUpdateValidatorsCall wrap *gomock.Call +type MockTransactionUpdateValidatorsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionUpdateValidatorsCall) Return(arg0 error) *TransactionUpdateValidatorsCall { +func (c *MockTransactionUpdateValidatorsCall) Return(arg0 error) *MockTransactionUpdateValidatorsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionUpdateValidatorsCall) Do(f func(context.Context, ...*storage.Validator) error) *TransactionUpdateValidatorsCall { +func (c *MockTransactionUpdateValidatorsCall) Do(f func(context.Context, ...*storage.Validator) error) *MockTransactionUpdateValidatorsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionUpdateValidatorsCall) DoAndReturn(f func(context.Context, ...*storage.Validator) error) *TransactionUpdateValidatorsCall { +func (c *MockTransactionUpdateValidatorsCall) DoAndReturn(f func(context.Context, ...*storage.Validator) error) *MockTransactionUpdateValidatorsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -1948,31 +2027,31 @@ func (m *MockTransaction) Validators(ctx context.Context) ([]storage.Validator, } // Validators indicates an expected call of Validators. -func (mr *MockTransactionMockRecorder) Validators(ctx any) *TransactionValidatorsCall { +func (mr *MockTransactionMockRecorder) Validators(ctx any) *MockTransactionValidatorsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validators", reflect.TypeOf((*MockTransaction)(nil).Validators), ctx) - return &TransactionValidatorsCall{Call: call} + return &MockTransactionValidatorsCall{Call: call} } -// TransactionValidatorsCall wrap *gomock.Call -type TransactionValidatorsCall struct { +// MockTransactionValidatorsCall wrap *gomock.Call +type MockTransactionValidatorsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *TransactionValidatorsCall) Return(arg0 []storage.Validator, arg1 error) *TransactionValidatorsCall { +func (c *MockTransactionValidatorsCall) Return(arg0 []storage.Validator, arg1 error) *MockTransactionValidatorsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *TransactionValidatorsCall) Do(f func(context.Context) ([]storage.Validator, error)) *TransactionValidatorsCall { +func (c *MockTransactionValidatorsCall) Do(f func(context.Context) ([]storage.Validator, error)) *MockTransactionValidatorsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *TransactionValidatorsCall) DoAndReturn(f func(context.Context) ([]storage.Validator, error)) *TransactionValidatorsCall { +func (c *MockTransactionValidatorsCall) DoAndReturn(f func(context.Context) ([]storage.Validator, error)) *MockTransactionValidatorsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -2010,31 +2089,31 @@ func (m *MockISearch) Search(ctx context.Context, query string) ([]storage.Searc } // Search indicates an expected call of Search. -func (mr *MockISearchMockRecorder) Search(ctx, query any) *ISearchSearchCall { +func (mr *MockISearchMockRecorder) Search(ctx, query any) *MockISearchSearchCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Search", reflect.TypeOf((*MockISearch)(nil).Search), ctx, query) - return &ISearchSearchCall{Call: call} + return &MockISearchSearchCall{Call: call} } -// ISearchSearchCall wrap *gomock.Call -type ISearchSearchCall struct { +// MockISearchSearchCall wrap *gomock.Call +type MockISearchSearchCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ISearchSearchCall) Return(arg0 []storage.SearchResult, arg1 error) *ISearchSearchCall { +func (c *MockISearchSearchCall) Return(arg0 []storage.SearchResult, arg1 error) *MockISearchSearchCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ISearchSearchCall) Do(f func(context.Context, string) ([]storage.SearchResult, error)) *ISearchSearchCall { +func (c *MockISearchSearchCall) Do(f func(context.Context, string) ([]storage.SearchResult, error)) *MockISearchSearchCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ISearchSearchCall) DoAndReturn(f func(context.Context, string) ([]storage.SearchResult, error)) *ISearchSearchCall { +func (c *MockISearchSearchCall) DoAndReturn(f func(context.Context, string) ([]storage.SearchResult, error)) *MockISearchSearchCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -2071,31 +2150,31 @@ func (m *MockNotificator) Notify(ctx context.Context, channel, payload string) e } // Notify indicates an expected call of Notify. -func (mr *MockNotificatorMockRecorder) Notify(ctx, channel, payload any) *NotificatorNotifyCall { +func (mr *MockNotificatorMockRecorder) Notify(ctx, channel, payload any) *MockNotificatorNotifyCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Notify", reflect.TypeOf((*MockNotificator)(nil).Notify), ctx, channel, payload) - return &NotificatorNotifyCall{Call: call} + return &MockNotificatorNotifyCall{Call: call} } -// NotificatorNotifyCall wrap *gomock.Call -type NotificatorNotifyCall struct { +// MockNotificatorNotifyCall wrap *gomock.Call +type MockNotificatorNotifyCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *NotificatorNotifyCall) Return(arg0 error) *NotificatorNotifyCall { +func (c *MockNotificatorNotifyCall) Return(arg0 error) *MockNotificatorNotifyCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *NotificatorNotifyCall) Do(f func(context.Context, string, string) error) *NotificatorNotifyCall { +func (c *MockNotificatorNotifyCall) Do(f func(context.Context, string, string) error) *MockNotificatorNotifyCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *NotificatorNotifyCall) DoAndReturn(f func(context.Context, string, string) error) *NotificatorNotifyCall { +func (c *MockNotificatorNotifyCall) DoAndReturn(f func(context.Context, string, string) error) *MockNotificatorNotifyCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -2132,31 +2211,31 @@ func (m *MockListener) Close() error { } // Close indicates an expected call of Close. -func (mr *MockListenerMockRecorder) Close() *ListenerCloseCall { +func (mr *MockListenerMockRecorder) Close() *MockListenerCloseCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockListener)(nil).Close)) - return &ListenerCloseCall{Call: call} + return &MockListenerCloseCall{Call: call} } -// ListenerCloseCall wrap *gomock.Call -type ListenerCloseCall struct { +// MockListenerCloseCall wrap *gomock.Call +type MockListenerCloseCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ListenerCloseCall) Return(arg0 error) *ListenerCloseCall { +func (c *MockListenerCloseCall) Return(arg0 error) *MockListenerCloseCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ListenerCloseCall) Do(f func() error) *ListenerCloseCall { +func (c *MockListenerCloseCall) Do(f func() error) *MockListenerCloseCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ListenerCloseCall) DoAndReturn(f func() error) *ListenerCloseCall { +func (c *MockListenerCloseCall) DoAndReturn(f func() error) *MockListenerCloseCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -2170,31 +2249,31 @@ func (m *MockListener) Listen() chan *pq.Notification { } // Listen indicates an expected call of Listen. -func (mr *MockListenerMockRecorder) Listen() *ListenerListenCall { +func (mr *MockListenerMockRecorder) Listen() *MockListenerListenCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Listen", reflect.TypeOf((*MockListener)(nil).Listen)) - return &ListenerListenCall{Call: call} + return &MockListenerListenCall{Call: call} } -// ListenerListenCall wrap *gomock.Call -type ListenerListenCall struct { +// MockListenerListenCall wrap *gomock.Call +type MockListenerListenCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ListenerListenCall) Return(arg0 chan *pq.Notification) *ListenerListenCall { +func (c *MockListenerListenCall) Return(arg0 chan *pq.Notification) *MockListenerListenCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ListenerListenCall) Do(f func() chan *pq.Notification) *ListenerListenCall { +func (c *MockListenerListenCall) Do(f func() chan *pq.Notification) *MockListenerListenCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ListenerListenCall) DoAndReturn(f func() chan *pq.Notification) *ListenerListenCall { +func (c *MockListenerListenCall) DoAndReturn(f func() chan *pq.Notification) *MockListenerListenCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -2212,32 +2291,32 @@ func (m *MockListener) Subscribe(ctx context.Context, channels ...string) error } // Subscribe indicates an expected call of Subscribe. -func (mr *MockListenerMockRecorder) Subscribe(ctx any, channels ...any) *ListenerSubscribeCall { +func (mr *MockListenerMockRecorder) Subscribe(ctx any, channels ...any) *MockListenerSubscribeCall { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx}, channels...) call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockListener)(nil).Subscribe), varargs...) - return &ListenerSubscribeCall{Call: call} + return &MockListenerSubscribeCall{Call: call} } -// ListenerSubscribeCall wrap *gomock.Call -type ListenerSubscribeCall struct { +// MockListenerSubscribeCall wrap *gomock.Call +type MockListenerSubscribeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ListenerSubscribeCall) Return(arg0 error) *ListenerSubscribeCall { +func (c *MockListenerSubscribeCall) Return(arg0 error) *MockListenerSubscribeCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ListenerSubscribeCall) Do(f func(context.Context, ...string) error) *ListenerSubscribeCall { +func (c *MockListenerSubscribeCall) Do(f func(context.Context, ...string) error) *MockListenerSubscribeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ListenerSubscribeCall) DoAndReturn(f func(context.Context, ...string) error) *ListenerSubscribeCall { +func (c *MockListenerSubscribeCall) DoAndReturn(f func(context.Context, ...string) error) *MockListenerSubscribeCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -2274,31 +2353,31 @@ func (m *MockListenerFactory) CreateListener() storage.Listener { } // CreateListener indicates an expected call of CreateListener. -func (mr *MockListenerFactoryMockRecorder) CreateListener() *ListenerFactoryCreateListenerCall { +func (mr *MockListenerFactoryMockRecorder) CreateListener() *MockListenerFactoryCreateListenerCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateListener", reflect.TypeOf((*MockListenerFactory)(nil).CreateListener)) - return &ListenerFactoryCreateListenerCall{Call: call} + return &MockListenerFactoryCreateListenerCall{Call: call} } -// ListenerFactoryCreateListenerCall wrap *gomock.Call -type ListenerFactoryCreateListenerCall struct { +// MockListenerFactoryCreateListenerCall wrap *gomock.Call +type MockListenerFactoryCreateListenerCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ListenerFactoryCreateListenerCall) Return(arg0 storage.Listener) *ListenerFactoryCreateListenerCall { +func (c *MockListenerFactoryCreateListenerCall) Return(arg0 storage.Listener) *MockListenerFactoryCreateListenerCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ListenerFactoryCreateListenerCall) Do(f func() storage.Listener) *ListenerFactoryCreateListenerCall { +func (c *MockListenerFactoryCreateListenerCall) Do(f func() storage.Listener) *MockListenerFactoryCreateListenerCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ListenerFactoryCreateListenerCall) DoAndReturn(f func() storage.Listener) *ListenerFactoryCreateListenerCall { +func (c *MockListenerFactoryCreateListenerCall) DoAndReturn(f func() storage.Listener) *MockListenerFactoryCreateListenerCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/rollup.go b/internal/storage/mock/rollup.go index 8fb88ae..54427ad 100644 --- a/internal/storage/mock/rollup.go +++ b/internal/storage/mock/rollup.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: rollup.go // @@ -8,6 +5,7 @@ // // mockgen -source=rollup.go -destination=mock/rollup.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -54,31 +52,31 @@ func (m *MockIRollup) ActionsByHeight(ctx context.Context, height types.Level, l } // ActionsByHeight indicates an expected call of ActionsByHeight. -func (mr *MockIRollupMockRecorder) ActionsByHeight(ctx, height, limit, offset any) *IRollupActionsByHeightCall { +func (mr *MockIRollupMockRecorder) ActionsByHeight(ctx, height, limit, offset any) *MockIRollupActionsByHeightCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionsByHeight", reflect.TypeOf((*MockIRollup)(nil).ActionsByHeight), ctx, height, limit, offset) - return &IRollupActionsByHeightCall{Call: call} + return &MockIRollupActionsByHeightCall{Call: call} } -// IRollupActionsByHeightCall wrap *gomock.Call -type IRollupActionsByHeightCall struct { +// MockIRollupActionsByHeightCall wrap *gomock.Call +type MockIRollupActionsByHeightCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupActionsByHeightCall) Return(arg0 []storage.RollupAction, arg1 error) *IRollupActionsByHeightCall { +func (c *MockIRollupActionsByHeightCall) Return(arg0 []storage.RollupAction, arg1 error) *MockIRollupActionsByHeightCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupActionsByHeightCall) Do(f func(context.Context, types.Level, int, int) ([]storage.RollupAction, error)) *IRollupActionsByHeightCall { +func (c *MockIRollupActionsByHeightCall) Do(f func(context.Context, types.Level, int, int) ([]storage.RollupAction, error)) *MockIRollupActionsByHeightCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupActionsByHeightCall) DoAndReturn(f func(context.Context, types.Level, int, int) ([]storage.RollupAction, error)) *IRollupActionsByHeightCall { +func (c *MockIRollupActionsByHeightCall) DoAndReturn(f func(context.Context, types.Level, int, int) ([]storage.RollupAction, error)) *MockIRollupActionsByHeightCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -93,31 +91,31 @@ func (m *MockIRollup) ActionsByTxId(ctx context.Context, txId uint64, limit, off } // ActionsByTxId indicates an expected call of ActionsByTxId. -func (mr *MockIRollupMockRecorder) ActionsByTxId(ctx, txId, limit, offset any) *IRollupActionsByTxIdCall { +func (mr *MockIRollupMockRecorder) ActionsByTxId(ctx, txId, limit, offset any) *MockIRollupActionsByTxIdCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActionsByTxId", reflect.TypeOf((*MockIRollup)(nil).ActionsByTxId), ctx, txId, limit, offset) - return &IRollupActionsByTxIdCall{Call: call} + return &MockIRollupActionsByTxIdCall{Call: call} } -// IRollupActionsByTxIdCall wrap *gomock.Call -type IRollupActionsByTxIdCall struct { +// MockIRollupActionsByTxIdCall wrap *gomock.Call +type MockIRollupActionsByTxIdCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupActionsByTxIdCall) Return(arg0 []storage.RollupAction, arg1 error) *IRollupActionsByTxIdCall { +func (c *MockIRollupActionsByTxIdCall) Return(arg0 []storage.RollupAction, arg1 error) *MockIRollupActionsByTxIdCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupActionsByTxIdCall) Do(f func(context.Context, uint64, int, int) ([]storage.RollupAction, error)) *IRollupActionsByTxIdCall { +func (c *MockIRollupActionsByTxIdCall) Do(f func(context.Context, uint64, int, int) ([]storage.RollupAction, error)) *MockIRollupActionsByTxIdCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupActionsByTxIdCall) DoAndReturn(f func(context.Context, uint64, int, int) ([]storage.RollupAction, error)) *IRollupActionsByTxIdCall { +func (c *MockIRollupActionsByTxIdCall) DoAndReturn(f func(context.Context, uint64, int, int) ([]storage.RollupAction, error)) *MockIRollupActionsByTxIdCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -132,31 +130,31 @@ func (m *MockIRollup) Addresses(ctx context.Context, rollupId uint64, limit, off } // Addresses indicates an expected call of Addresses. -func (mr *MockIRollupMockRecorder) Addresses(ctx, rollupId, limit, offset, sort any) *IRollupAddressesCall { +func (mr *MockIRollupMockRecorder) Addresses(ctx, rollupId, limit, offset, sort any) *MockIRollupAddressesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addresses", reflect.TypeOf((*MockIRollup)(nil).Addresses), ctx, rollupId, limit, offset, sort) - return &IRollupAddressesCall{Call: call} + return &MockIRollupAddressesCall{Call: call} } -// IRollupAddressesCall wrap *gomock.Call -type IRollupAddressesCall struct { +// MockIRollupAddressesCall wrap *gomock.Call +type MockIRollupAddressesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupAddressesCall) Return(arg0 []storage.RollupAddress, arg1 error) *IRollupAddressesCall { +func (c *MockIRollupAddressesCall) Return(arg0 []storage.RollupAddress, arg1 error) *MockIRollupAddressesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupAddressesCall) Do(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAddress, error)) *IRollupAddressesCall { +func (c *MockIRollupAddressesCall) Do(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAddress, error)) *MockIRollupAddressesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupAddressesCall) DoAndReturn(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAddress, error)) *IRollupAddressesCall { +func (c *MockIRollupAddressesCall) DoAndReturn(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAddress, error)) *MockIRollupAddressesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -171,31 +169,31 @@ func (m *MockIRollup) ByHash(ctx context.Context, hash []byte) (storage.Rollup, } // ByHash indicates an expected call of ByHash. -func (mr *MockIRollupMockRecorder) ByHash(ctx, hash any) *IRollupByHashCall { +func (mr *MockIRollupMockRecorder) ByHash(ctx, hash any) *MockIRollupByHashCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHash", reflect.TypeOf((*MockIRollup)(nil).ByHash), ctx, hash) - return &IRollupByHashCall{Call: call} + return &MockIRollupByHashCall{Call: call} } -// IRollupByHashCall wrap *gomock.Call -type IRollupByHashCall struct { +// MockIRollupByHashCall wrap *gomock.Call +type MockIRollupByHashCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupByHashCall) Return(arg0 storage.Rollup, arg1 error) *IRollupByHashCall { +func (c *MockIRollupByHashCall) Return(arg0 storage.Rollup, arg1 error) *MockIRollupByHashCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupByHashCall) Do(f func(context.Context, []byte) (storage.Rollup, error)) *IRollupByHashCall { +func (c *MockIRollupByHashCall) Do(f func(context.Context, []byte) (storage.Rollup, error)) *MockIRollupByHashCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupByHashCall) DoAndReturn(f func(context.Context, []byte) (storage.Rollup, error)) *IRollupByHashCall { +func (c *MockIRollupByHashCall) DoAndReturn(f func(context.Context, []byte) (storage.Rollup, error)) *MockIRollupByHashCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -210,31 +208,31 @@ func (m *MockIRollup) CountActionsByHeight(ctx context.Context, height types.Lev } // CountActionsByHeight indicates an expected call of CountActionsByHeight. -func (mr *MockIRollupMockRecorder) CountActionsByHeight(ctx, height any) *IRollupCountActionsByHeightCall { +func (mr *MockIRollupMockRecorder) CountActionsByHeight(ctx, height any) *MockIRollupCountActionsByHeightCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CountActionsByHeight", reflect.TypeOf((*MockIRollup)(nil).CountActionsByHeight), ctx, height) - return &IRollupCountActionsByHeightCall{Call: call} + return &MockIRollupCountActionsByHeightCall{Call: call} } -// IRollupCountActionsByHeightCall wrap *gomock.Call -type IRollupCountActionsByHeightCall struct { +// MockIRollupCountActionsByHeightCall wrap *gomock.Call +type MockIRollupCountActionsByHeightCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupCountActionsByHeightCall) Return(arg0 int64, arg1 error) *IRollupCountActionsByHeightCall { +func (c *MockIRollupCountActionsByHeightCall) Return(arg0 int64, arg1 error) *MockIRollupCountActionsByHeightCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupCountActionsByHeightCall) Do(f func(context.Context, types.Level) (int64, error)) *IRollupCountActionsByHeightCall { +func (c *MockIRollupCountActionsByHeightCall) Do(f func(context.Context, types.Level) (int64, error)) *MockIRollupCountActionsByHeightCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupCountActionsByHeightCall) DoAndReturn(f func(context.Context, types.Level) (int64, error)) *IRollupCountActionsByHeightCall { +func (c *MockIRollupCountActionsByHeightCall) DoAndReturn(f func(context.Context, types.Level) (int64, error)) *MockIRollupCountActionsByHeightCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -249,31 +247,31 @@ func (m *MockIRollup) CountActionsByTxId(ctx context.Context, txId uint64) (int6 } // CountActionsByTxId indicates an expected call of CountActionsByTxId. -func (mr *MockIRollupMockRecorder) CountActionsByTxId(ctx, txId any) *IRollupCountActionsByTxIdCall { +func (mr *MockIRollupMockRecorder) CountActionsByTxId(ctx, txId any) *MockIRollupCountActionsByTxIdCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CountActionsByTxId", reflect.TypeOf((*MockIRollup)(nil).CountActionsByTxId), ctx, txId) - return &IRollupCountActionsByTxIdCall{Call: call} + return &MockIRollupCountActionsByTxIdCall{Call: call} } -// IRollupCountActionsByTxIdCall wrap *gomock.Call -type IRollupCountActionsByTxIdCall struct { +// MockIRollupCountActionsByTxIdCall wrap *gomock.Call +type MockIRollupCountActionsByTxIdCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupCountActionsByTxIdCall) Return(arg0 int64, arg1 error) *IRollupCountActionsByTxIdCall { +func (c *MockIRollupCountActionsByTxIdCall) Return(arg0 int64, arg1 error) *MockIRollupCountActionsByTxIdCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupCountActionsByTxIdCall) Do(f func(context.Context, uint64) (int64, error)) *IRollupCountActionsByTxIdCall { +func (c *MockIRollupCountActionsByTxIdCall) Do(f func(context.Context, uint64) (int64, error)) *MockIRollupCountActionsByTxIdCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupCountActionsByTxIdCall) DoAndReturn(f func(context.Context, uint64) (int64, error)) *IRollupCountActionsByTxIdCall { +func (c *MockIRollupCountActionsByTxIdCall) DoAndReturn(f func(context.Context, uint64) (int64, error)) *MockIRollupCountActionsByTxIdCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -288,31 +286,31 @@ func (m *MockIRollup) CursorList(ctx context.Context, id, limit uint64, order st } // CursorList indicates an expected call of CursorList. -func (mr *MockIRollupMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IRollupCursorListCall { +func (mr *MockIRollupMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIRollupCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIRollup)(nil).CursorList), ctx, id, limit, order, cmp) - return &IRollupCursorListCall{Call: call} + return &MockIRollupCursorListCall{Call: call} } -// IRollupCursorListCall wrap *gomock.Call -type IRollupCursorListCall struct { +// MockIRollupCursorListCall wrap *gomock.Call +type MockIRollupCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupCursorListCall) Return(arg0 []*storage.Rollup, arg1 error) *IRollupCursorListCall { +func (c *MockIRollupCursorListCall) Return(arg0 []*storage.Rollup, arg1 error) *MockIRollupCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Rollup, error)) *IRollupCursorListCall { +func (c *MockIRollupCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Rollup, error)) *MockIRollupCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Rollup, error)) *IRollupCursorListCall { +func (c *MockIRollupCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Rollup, error)) *MockIRollupCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -327,31 +325,31 @@ func (m *MockIRollup) GetByID(ctx context.Context, id uint64) (*storage.Rollup, } // GetByID indicates an expected call of GetByID. -func (mr *MockIRollupMockRecorder) GetByID(ctx, id any) *IRollupGetByIDCall { +func (mr *MockIRollupMockRecorder) GetByID(ctx, id any) *MockIRollupGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIRollup)(nil).GetByID), ctx, id) - return &IRollupGetByIDCall{Call: call} + return &MockIRollupGetByIDCall{Call: call} } -// IRollupGetByIDCall wrap *gomock.Call -type IRollupGetByIDCall struct { +// MockIRollupGetByIDCall wrap *gomock.Call +type MockIRollupGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupGetByIDCall) Return(arg0 *storage.Rollup, arg1 error) *IRollupGetByIDCall { +func (c *MockIRollupGetByIDCall) Return(arg0 *storage.Rollup, arg1 error) *MockIRollupGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupGetByIDCall) Do(f func(context.Context, uint64) (*storage.Rollup, error)) *IRollupGetByIDCall { +func (c *MockIRollupGetByIDCall) Do(f func(context.Context, uint64) (*storage.Rollup, error)) *MockIRollupGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Rollup, error)) *IRollupGetByIDCall { +func (c *MockIRollupGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Rollup, error)) *MockIRollupGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -365,31 +363,31 @@ func (m *MockIRollup) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIRollupMockRecorder) IsNoRows(err any) *IRollupIsNoRowsCall { +func (mr *MockIRollupMockRecorder) IsNoRows(err any) *MockIRollupIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIRollup)(nil).IsNoRows), err) - return &IRollupIsNoRowsCall{Call: call} + return &MockIRollupIsNoRowsCall{Call: call} } -// IRollupIsNoRowsCall wrap *gomock.Call -type IRollupIsNoRowsCall struct { +// MockIRollupIsNoRowsCall wrap *gomock.Call +type MockIRollupIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupIsNoRowsCall) Return(arg0 bool) *IRollupIsNoRowsCall { +func (c *MockIRollupIsNoRowsCall) Return(arg0 bool) *MockIRollupIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupIsNoRowsCall) Do(f func(error) bool) *IRollupIsNoRowsCall { +func (c *MockIRollupIsNoRowsCall) Do(f func(error) bool) *MockIRollupIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupIsNoRowsCall) DoAndReturn(f func(error) bool) *IRollupIsNoRowsCall { +func (c *MockIRollupIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIRollupIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -404,31 +402,31 @@ func (m *MockIRollup) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIRollupMockRecorder) LastID(ctx any) *IRollupLastIDCall { +func (mr *MockIRollupMockRecorder) LastID(ctx any) *MockIRollupLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIRollup)(nil).LastID), ctx) - return &IRollupLastIDCall{Call: call} + return &MockIRollupLastIDCall{Call: call} } -// IRollupLastIDCall wrap *gomock.Call -type IRollupLastIDCall struct { +// MockIRollupLastIDCall wrap *gomock.Call +type MockIRollupLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupLastIDCall) Return(arg0 uint64, arg1 error) *IRollupLastIDCall { +func (c *MockIRollupLastIDCall) Return(arg0 uint64, arg1 error) *MockIRollupLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupLastIDCall) Do(f func(context.Context) (uint64, error)) *IRollupLastIDCall { +func (c *MockIRollupLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIRollupLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IRollupLastIDCall { +func (c *MockIRollupLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIRollupLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -443,31 +441,31 @@ func (m *MockIRollup) List(ctx context.Context, limit, offset uint64, order stor } // List indicates an expected call of List. -func (mr *MockIRollupMockRecorder) List(ctx, limit, offset, order any) *IRollupListCall { +func (mr *MockIRollupMockRecorder) List(ctx, limit, offset, order any) *MockIRollupListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIRollup)(nil).List), ctx, limit, offset, order) - return &IRollupListCall{Call: call} + return &MockIRollupListCall{Call: call} } -// IRollupListCall wrap *gomock.Call -type IRollupListCall struct { +// MockIRollupListCall wrap *gomock.Call +type MockIRollupListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupListCall) Return(arg0 []*storage.Rollup, arg1 error) *IRollupListCall { +func (c *MockIRollupListCall) Return(arg0 []*storage.Rollup, arg1 error) *MockIRollupListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Rollup, error)) *IRollupListCall { +func (c *MockIRollupListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Rollup, error)) *MockIRollupListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Rollup, error)) *IRollupListCall { +func (c *MockIRollupListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Rollup, error)) *MockIRollupListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -482,31 +480,31 @@ func (m *MockIRollup) ListExt(ctx context.Context, fltrs storage.RollupListFilte } // ListExt indicates an expected call of ListExt. -func (mr *MockIRollupMockRecorder) ListExt(ctx, fltrs any) *IRollupListExtCall { +func (mr *MockIRollupMockRecorder) ListExt(ctx, fltrs any) *MockIRollupListExtCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListExt", reflect.TypeOf((*MockIRollup)(nil).ListExt), ctx, fltrs) - return &IRollupListExtCall{Call: call} + return &MockIRollupListExtCall{Call: call} } -// IRollupListExtCall wrap *gomock.Call -type IRollupListExtCall struct { +// MockIRollupListExtCall wrap *gomock.Call +type MockIRollupListExtCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupListExtCall) Return(arg0 []storage.Rollup, arg1 error) *IRollupListExtCall { +func (c *MockIRollupListExtCall) Return(arg0 []storage.Rollup, arg1 error) *MockIRollupListExtCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupListExtCall) Do(f func(context.Context, storage.RollupListFilter) ([]storage.Rollup, error)) *IRollupListExtCall { +func (c *MockIRollupListExtCall) Do(f func(context.Context, storage.RollupListFilter) ([]storage.Rollup, error)) *MockIRollupListExtCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupListExtCall) DoAndReturn(f func(context.Context, storage.RollupListFilter) ([]storage.Rollup, error)) *IRollupListExtCall { +func (c *MockIRollupListExtCall) DoAndReturn(f func(context.Context, storage.RollupListFilter) ([]storage.Rollup, error)) *MockIRollupListExtCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -521,31 +519,31 @@ func (m *MockIRollup) ListRollupsByAddress(ctx context.Context, addressId uint64 } // ListRollupsByAddress indicates an expected call of ListRollupsByAddress. -func (mr *MockIRollupMockRecorder) ListRollupsByAddress(ctx, addressId, limit, offset, sort any) *IRollupListRollupsByAddressCall { +func (mr *MockIRollupMockRecorder) ListRollupsByAddress(ctx, addressId, limit, offset, sort any) *MockIRollupListRollupsByAddressCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRollupsByAddress", reflect.TypeOf((*MockIRollup)(nil).ListRollupsByAddress), ctx, addressId, limit, offset, sort) - return &IRollupListRollupsByAddressCall{Call: call} + return &MockIRollupListRollupsByAddressCall{Call: call} } -// IRollupListRollupsByAddressCall wrap *gomock.Call -type IRollupListRollupsByAddressCall struct { +// MockIRollupListRollupsByAddressCall wrap *gomock.Call +type MockIRollupListRollupsByAddressCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupListRollupsByAddressCall) Return(arg0 []storage.RollupAddress, arg1 error) *IRollupListRollupsByAddressCall { +func (c *MockIRollupListRollupsByAddressCall) Return(arg0 []storage.RollupAddress, arg1 error) *MockIRollupListRollupsByAddressCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupListRollupsByAddressCall) Do(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAddress, error)) *IRollupListRollupsByAddressCall { +func (c *MockIRollupListRollupsByAddressCall) Do(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAddress, error)) *MockIRollupListRollupsByAddressCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupListRollupsByAddressCall) DoAndReturn(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAddress, error)) *IRollupListRollupsByAddressCall { +func (c *MockIRollupListRollupsByAddressCall) DoAndReturn(f func(context.Context, uint64, int, int, storage0.SortOrder) ([]storage.RollupAddress, error)) *MockIRollupListRollupsByAddressCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -559,31 +557,31 @@ func (m_2 *MockIRollup) Save(ctx context.Context, m *storage.Rollup) error { } // Save indicates an expected call of Save. -func (mr *MockIRollupMockRecorder) Save(ctx, m any) *IRollupSaveCall { +func (mr *MockIRollupMockRecorder) Save(ctx, m any) *MockIRollupSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIRollup)(nil).Save), ctx, m) - return &IRollupSaveCall{Call: call} + return &MockIRollupSaveCall{Call: call} } -// IRollupSaveCall wrap *gomock.Call -type IRollupSaveCall struct { +// MockIRollupSaveCall wrap *gomock.Call +type MockIRollupSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupSaveCall) Return(arg0 error) *IRollupSaveCall { +func (c *MockIRollupSaveCall) Return(arg0 error) *MockIRollupSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupSaveCall) Do(f func(context.Context, *storage.Rollup) error) *IRollupSaveCall { +func (c *MockIRollupSaveCall) Do(f func(context.Context, *storage.Rollup) error) *MockIRollupSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupSaveCall) DoAndReturn(f func(context.Context, *storage.Rollup) error) *IRollupSaveCall { +func (c *MockIRollupSaveCall) DoAndReturn(f func(context.Context, *storage.Rollup) error) *MockIRollupSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -597,31 +595,31 @@ func (m_2 *MockIRollup) Update(ctx context.Context, m *storage.Rollup) error { } // Update indicates an expected call of Update. -func (mr *MockIRollupMockRecorder) Update(ctx, m any) *IRollupUpdateCall { +func (mr *MockIRollupMockRecorder) Update(ctx, m any) *MockIRollupUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIRollup)(nil).Update), ctx, m) - return &IRollupUpdateCall{Call: call} + return &MockIRollupUpdateCall{Call: call} } -// IRollupUpdateCall wrap *gomock.Call -type IRollupUpdateCall struct { +// MockIRollupUpdateCall wrap *gomock.Call +type MockIRollupUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IRollupUpdateCall) Return(arg0 error) *IRollupUpdateCall { +func (c *MockIRollupUpdateCall) Return(arg0 error) *MockIRollupUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IRollupUpdateCall) Do(f func(context.Context, *storage.Rollup) error) *IRollupUpdateCall { +func (c *MockIRollupUpdateCall) Do(f func(context.Context, *storage.Rollup) error) *MockIRollupUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IRollupUpdateCall) DoAndReturn(f func(context.Context, *storage.Rollup) error) *IRollupUpdateCall { +func (c *MockIRollupUpdateCall) DoAndReturn(f func(context.Context, *storage.Rollup) error) *MockIRollupUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/state.go b/internal/storage/mock/state.go index 21be0f8..902f2b7 100644 --- a/internal/storage/mock/state.go +++ b/internal/storage/mock/state.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: state.go // @@ -8,6 +5,7 @@ // // mockgen -source=state.go -destination=mock/state.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockIState) ByName(ctx context.Context, name string) (storage.State, er } // ByName indicates an expected call of ByName. -func (mr *MockIStateMockRecorder) ByName(ctx, name any) *IStateByNameCall { +func (mr *MockIStateMockRecorder) ByName(ctx, name any) *MockIStateByNameCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByName", reflect.TypeOf((*MockIState)(nil).ByName), ctx, name) - return &IStateByNameCall{Call: call} + return &MockIStateByNameCall{Call: call} } -// IStateByNameCall wrap *gomock.Call -type IStateByNameCall struct { +// MockIStateByNameCall wrap *gomock.Call +type MockIStateByNameCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStateByNameCall) Return(arg0 storage.State, arg1 error) *IStateByNameCall { +func (c *MockIStateByNameCall) Return(arg0 storage.State, arg1 error) *MockIStateByNameCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStateByNameCall) Do(f func(context.Context, string) (storage.State, error)) *IStateByNameCall { +func (c *MockIStateByNameCall) Do(f func(context.Context, string) (storage.State, error)) *MockIStateByNameCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStateByNameCall) DoAndReturn(f func(context.Context, string) (storage.State, error)) *IStateByNameCall { +func (c *MockIStateByNameCall) DoAndReturn(f func(context.Context, string) (storage.State, error)) *MockIStateByNameCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +90,31 @@ func (m *MockIState) CursorList(ctx context.Context, id, limit uint64, order sto } // CursorList indicates an expected call of CursorList. -func (mr *MockIStateMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IStateCursorListCall { +func (mr *MockIStateMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIStateCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIState)(nil).CursorList), ctx, id, limit, order, cmp) - return &IStateCursorListCall{Call: call} + return &MockIStateCursorListCall{Call: call} } -// IStateCursorListCall wrap *gomock.Call -type IStateCursorListCall struct { +// MockIStateCursorListCall wrap *gomock.Call +type MockIStateCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStateCursorListCall) Return(arg0 []*storage.State, arg1 error) *IStateCursorListCall { +func (c *MockIStateCursorListCall) Return(arg0 []*storage.State, arg1 error) *MockIStateCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStateCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.State, error)) *IStateCursorListCall { +func (c *MockIStateCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.State, error)) *MockIStateCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStateCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.State, error)) *IStateCursorListCall { +func (c *MockIStateCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.State, error)) *MockIStateCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,31 +129,31 @@ func (m *MockIState) GetByID(ctx context.Context, id uint64) (*storage.State, er } // GetByID indicates an expected call of GetByID. -func (mr *MockIStateMockRecorder) GetByID(ctx, id any) *IStateGetByIDCall { +func (mr *MockIStateMockRecorder) GetByID(ctx, id any) *MockIStateGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIState)(nil).GetByID), ctx, id) - return &IStateGetByIDCall{Call: call} + return &MockIStateGetByIDCall{Call: call} } -// IStateGetByIDCall wrap *gomock.Call -type IStateGetByIDCall struct { +// MockIStateGetByIDCall wrap *gomock.Call +type MockIStateGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStateGetByIDCall) Return(arg0 *storage.State, arg1 error) *IStateGetByIDCall { +func (c *MockIStateGetByIDCall) Return(arg0 *storage.State, arg1 error) *MockIStateGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStateGetByIDCall) Do(f func(context.Context, uint64) (*storage.State, error)) *IStateGetByIDCall { +func (c *MockIStateGetByIDCall) Do(f func(context.Context, uint64) (*storage.State, error)) *MockIStateGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStateGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.State, error)) *IStateGetByIDCall { +func (c *MockIStateGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.State, error)) *MockIStateGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +167,31 @@ func (m *MockIState) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIStateMockRecorder) IsNoRows(err any) *IStateIsNoRowsCall { +func (mr *MockIStateMockRecorder) IsNoRows(err any) *MockIStateIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIState)(nil).IsNoRows), err) - return &IStateIsNoRowsCall{Call: call} + return &MockIStateIsNoRowsCall{Call: call} } -// IStateIsNoRowsCall wrap *gomock.Call -type IStateIsNoRowsCall struct { +// MockIStateIsNoRowsCall wrap *gomock.Call +type MockIStateIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStateIsNoRowsCall) Return(arg0 bool) *IStateIsNoRowsCall { +func (c *MockIStateIsNoRowsCall) Return(arg0 bool) *MockIStateIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IStateIsNoRowsCall) Do(f func(error) bool) *IStateIsNoRowsCall { +func (c *MockIStateIsNoRowsCall) Do(f func(error) bool) *MockIStateIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStateIsNoRowsCall) DoAndReturn(f func(error) bool) *IStateIsNoRowsCall { +func (c *MockIStateIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIStateIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -208,31 +206,31 @@ func (m *MockIState) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIStateMockRecorder) LastID(ctx any) *IStateLastIDCall { +func (mr *MockIStateMockRecorder) LastID(ctx any) *MockIStateLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIState)(nil).LastID), ctx) - return &IStateLastIDCall{Call: call} + return &MockIStateLastIDCall{Call: call} } -// IStateLastIDCall wrap *gomock.Call -type IStateLastIDCall struct { +// MockIStateLastIDCall wrap *gomock.Call +type MockIStateLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStateLastIDCall) Return(arg0 uint64, arg1 error) *IStateLastIDCall { +func (c *MockIStateLastIDCall) Return(arg0 uint64, arg1 error) *MockIStateLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStateLastIDCall) Do(f func(context.Context) (uint64, error)) *IStateLastIDCall { +func (c *MockIStateLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIStateLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStateLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IStateLastIDCall { +func (c *MockIStateLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIStateLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -247,31 +245,31 @@ func (m *MockIState) List(ctx context.Context, limit, offset uint64, order stora } // List indicates an expected call of List. -func (mr *MockIStateMockRecorder) List(ctx, limit, offset, order any) *IStateListCall { +func (mr *MockIStateMockRecorder) List(ctx, limit, offset, order any) *MockIStateListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIState)(nil).List), ctx, limit, offset, order) - return &IStateListCall{Call: call} + return &MockIStateListCall{Call: call} } -// IStateListCall wrap *gomock.Call -type IStateListCall struct { +// MockIStateListCall wrap *gomock.Call +type MockIStateListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStateListCall) Return(arg0 []*storage.State, arg1 error) *IStateListCall { +func (c *MockIStateListCall) Return(arg0 []*storage.State, arg1 error) *MockIStateListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStateListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.State, error)) *IStateListCall { +func (c *MockIStateListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.State, error)) *MockIStateListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStateListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.State, error)) *IStateListCall { +func (c *MockIStateListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.State, error)) *MockIStateListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -285,31 +283,31 @@ func (m_2 *MockIState) Save(ctx context.Context, m *storage.State) error { } // Save indicates an expected call of Save. -func (mr *MockIStateMockRecorder) Save(ctx, m any) *IStateSaveCall { +func (mr *MockIStateMockRecorder) Save(ctx, m any) *MockIStateSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIState)(nil).Save), ctx, m) - return &IStateSaveCall{Call: call} + return &MockIStateSaveCall{Call: call} } -// IStateSaveCall wrap *gomock.Call -type IStateSaveCall struct { +// MockIStateSaveCall wrap *gomock.Call +type MockIStateSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStateSaveCall) Return(arg0 error) *IStateSaveCall { +func (c *MockIStateSaveCall) Return(arg0 error) *MockIStateSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IStateSaveCall) Do(f func(context.Context, *storage.State) error) *IStateSaveCall { +func (c *MockIStateSaveCall) Do(f func(context.Context, *storage.State) error) *MockIStateSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStateSaveCall) DoAndReturn(f func(context.Context, *storage.State) error) *IStateSaveCall { +func (c *MockIStateSaveCall) DoAndReturn(f func(context.Context, *storage.State) error) *MockIStateSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -323,31 +321,31 @@ func (m_2 *MockIState) Update(ctx context.Context, m *storage.State) error { } // Update indicates an expected call of Update. -func (mr *MockIStateMockRecorder) Update(ctx, m any) *IStateUpdateCall { +func (mr *MockIStateMockRecorder) Update(ctx, m any) *MockIStateUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIState)(nil).Update), ctx, m) - return &IStateUpdateCall{Call: call} + return &MockIStateUpdateCall{Call: call} } -// IStateUpdateCall wrap *gomock.Call -type IStateUpdateCall struct { +// MockIStateUpdateCall wrap *gomock.Call +type MockIStateUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStateUpdateCall) Return(arg0 error) *IStateUpdateCall { +func (c *MockIStateUpdateCall) Return(arg0 error) *MockIStateUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IStateUpdateCall) Do(f func(context.Context, *storage.State) error) *IStateUpdateCall { +func (c *MockIStateUpdateCall) Do(f func(context.Context, *storage.State) error) *MockIStateUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStateUpdateCall) DoAndReturn(f func(context.Context, *storage.State) error) *IStateUpdateCall { +func (c *MockIStateUpdateCall) DoAndReturn(f func(context.Context, *storage.State) error) *MockIStateUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/stats.go b/internal/storage/mock/stats.go index ccaa10d..45dafcc 100644 --- a/internal/storage/mock/stats.go +++ b/internal/storage/mock/stats.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: stats.go // @@ -8,6 +5,7 @@ // // mockgen -source=stats.go -destination=mock/stats.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -52,31 +50,31 @@ func (m *MockIStats) RollupSeries(ctx context.Context, rollupId uint64, timefram } // RollupSeries indicates an expected call of RollupSeries. -func (mr *MockIStatsMockRecorder) RollupSeries(ctx, rollupId, timeframe, name, req any) *IStatsRollupSeriesCall { +func (mr *MockIStatsMockRecorder) RollupSeries(ctx, rollupId, timeframe, name, req any) *MockIStatsRollupSeriesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollupSeries", reflect.TypeOf((*MockIStats)(nil).RollupSeries), ctx, rollupId, timeframe, name, req) - return &IStatsRollupSeriesCall{Call: call} + return &MockIStatsRollupSeriesCall{Call: call} } -// IStatsRollupSeriesCall wrap *gomock.Call -type IStatsRollupSeriesCall struct { +// MockIStatsRollupSeriesCall wrap *gomock.Call +type MockIStatsRollupSeriesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStatsRollupSeriesCall) Return(arg0 []storage.SeriesItem, arg1 error) *IStatsRollupSeriesCall { +func (c *MockIStatsRollupSeriesCall) Return(arg0 []storage.SeriesItem, arg1 error) *MockIStatsRollupSeriesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStatsRollupSeriesCall) Do(f func(context.Context, uint64, storage.Timeframe, string, storage.SeriesRequest) ([]storage.SeriesItem, error)) *IStatsRollupSeriesCall { +func (c *MockIStatsRollupSeriesCall) Do(f func(context.Context, uint64, storage.Timeframe, string, storage.SeriesRequest) ([]storage.SeriesItem, error)) *MockIStatsRollupSeriesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStatsRollupSeriesCall) DoAndReturn(f func(context.Context, uint64, storage.Timeframe, string, storage.SeriesRequest) ([]storage.SeriesItem, error)) *IStatsRollupSeriesCall { +func (c *MockIStatsRollupSeriesCall) DoAndReturn(f func(context.Context, uint64, storage.Timeframe, string, storage.SeriesRequest) ([]storage.SeriesItem, error)) *MockIStatsRollupSeriesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -91,31 +89,31 @@ func (m *MockIStats) Series(ctx context.Context, timeframe storage.Timeframe, na } // Series indicates an expected call of Series. -func (mr *MockIStatsMockRecorder) Series(ctx, timeframe, name, req any) *IStatsSeriesCall { +func (mr *MockIStatsMockRecorder) Series(ctx, timeframe, name, req any) *MockIStatsSeriesCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Series", reflect.TypeOf((*MockIStats)(nil).Series), ctx, timeframe, name, req) - return &IStatsSeriesCall{Call: call} + return &MockIStatsSeriesCall{Call: call} } -// IStatsSeriesCall wrap *gomock.Call -type IStatsSeriesCall struct { +// MockIStatsSeriesCall wrap *gomock.Call +type MockIStatsSeriesCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStatsSeriesCall) Return(arg0 []storage.SeriesItem, arg1 error) *IStatsSeriesCall { +func (c *MockIStatsSeriesCall) Return(arg0 []storage.SeriesItem, arg1 error) *MockIStatsSeriesCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStatsSeriesCall) Do(f func(context.Context, storage.Timeframe, string, storage.SeriesRequest) ([]storage.SeriesItem, error)) *IStatsSeriesCall { +func (c *MockIStatsSeriesCall) Do(f func(context.Context, storage.Timeframe, string, storage.SeriesRequest) ([]storage.SeriesItem, error)) *MockIStatsSeriesCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStatsSeriesCall) DoAndReturn(f func(context.Context, storage.Timeframe, string, storage.SeriesRequest) ([]storage.SeriesItem, error)) *IStatsSeriesCall { +func (c *MockIStatsSeriesCall) DoAndReturn(f func(context.Context, storage.Timeframe, string, storage.SeriesRequest) ([]storage.SeriesItem, error)) *MockIStatsSeriesCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -130,31 +128,31 @@ func (m *MockIStats) Summary(ctx context.Context) (storage.NetworkSummary, error } // Summary indicates an expected call of Summary. -func (mr *MockIStatsMockRecorder) Summary(ctx any) *IStatsSummaryCall { +func (mr *MockIStatsMockRecorder) Summary(ctx any) *MockIStatsSummaryCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Summary", reflect.TypeOf((*MockIStats)(nil).Summary), ctx) - return &IStatsSummaryCall{Call: call} + return &MockIStatsSummaryCall{Call: call} } -// IStatsSummaryCall wrap *gomock.Call -type IStatsSummaryCall struct { +// MockIStatsSummaryCall wrap *gomock.Call +type MockIStatsSummaryCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStatsSummaryCall) Return(arg0 storage.NetworkSummary, arg1 error) *IStatsSummaryCall { +func (c *MockIStatsSummaryCall) Return(arg0 storage.NetworkSummary, arg1 error) *MockIStatsSummaryCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStatsSummaryCall) Do(f func(context.Context) (storage.NetworkSummary, error)) *IStatsSummaryCall { +func (c *MockIStatsSummaryCall) Do(f func(context.Context) (storage.NetworkSummary, error)) *MockIStatsSummaryCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStatsSummaryCall) DoAndReturn(f func(context.Context) (storage.NetworkSummary, error)) *IStatsSummaryCall { +func (c *MockIStatsSummaryCall) DoAndReturn(f func(context.Context) (storage.NetworkSummary, error)) *MockIStatsSummaryCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +167,31 @@ func (m *MockIStats) SummaryTimeframe(ctx context.Context, timeframe storage.Tim } // SummaryTimeframe indicates an expected call of SummaryTimeframe. -func (mr *MockIStatsMockRecorder) SummaryTimeframe(ctx, timeframe any) *IStatsSummaryTimeframeCall { +func (mr *MockIStatsMockRecorder) SummaryTimeframe(ctx, timeframe any) *MockIStatsSummaryTimeframeCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SummaryTimeframe", reflect.TypeOf((*MockIStats)(nil).SummaryTimeframe), ctx, timeframe) - return &IStatsSummaryTimeframeCall{Call: call} + return &MockIStatsSummaryTimeframeCall{Call: call} } -// IStatsSummaryTimeframeCall wrap *gomock.Call -type IStatsSummaryTimeframeCall struct { +// MockIStatsSummaryTimeframeCall wrap *gomock.Call +type MockIStatsSummaryTimeframeCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IStatsSummaryTimeframeCall) Return(arg0 storage.NetworkSummaryWithChange, arg1 error) *IStatsSummaryTimeframeCall { +func (c *MockIStatsSummaryTimeframeCall) Return(arg0 storage.NetworkSummaryWithChange, arg1 error) *MockIStatsSummaryTimeframeCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IStatsSummaryTimeframeCall) Do(f func(context.Context, storage.Timeframe) (storage.NetworkSummaryWithChange, error)) *IStatsSummaryTimeframeCall { +func (c *MockIStatsSummaryTimeframeCall) Do(f func(context.Context, storage.Timeframe) (storage.NetworkSummaryWithChange, error)) *MockIStatsSummaryTimeframeCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IStatsSummaryTimeframeCall) DoAndReturn(f func(context.Context, storage.Timeframe) (storage.NetworkSummaryWithChange, error)) *IStatsSummaryTimeframeCall { +func (c *MockIStatsSummaryTimeframeCall) DoAndReturn(f func(context.Context, storage.Timeframe) (storage.NetworkSummaryWithChange, error)) *MockIStatsSummaryTimeframeCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/tx.go b/internal/storage/mock/tx.go index faf5d92..b1ff498 100644 --- a/internal/storage/mock/tx.go +++ b/internal/storage/mock/tx.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: tx.go // @@ -8,6 +5,7 @@ // // mockgen -source=tx.go -destination=mock/tx.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -54,31 +52,31 @@ func (m *MockITx) ByAddress(ctx context.Context, addressId uint64, fltrs storage } // ByAddress indicates an expected call of ByAddress. -func (mr *MockITxMockRecorder) ByAddress(ctx, addressId, fltrs any) *ITxByAddressCall { +func (mr *MockITxMockRecorder) ByAddress(ctx, addressId, fltrs any) *MockITxByAddressCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByAddress", reflect.TypeOf((*MockITx)(nil).ByAddress), ctx, addressId, fltrs) - return &ITxByAddressCall{Call: call} + return &MockITxByAddressCall{Call: call} } -// ITxByAddressCall wrap *gomock.Call -type ITxByAddressCall struct { +// MockITxByAddressCall wrap *gomock.Call +type MockITxByAddressCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxByAddressCall) Return(arg0 []storage.Tx, arg1 error) *ITxByAddressCall { +func (c *MockITxByAddressCall) Return(arg0 []storage.Tx, arg1 error) *MockITxByAddressCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ITxByAddressCall) Do(f func(context.Context, uint64, storage.TxFilter) ([]storage.Tx, error)) *ITxByAddressCall { +func (c *MockITxByAddressCall) Do(f func(context.Context, uint64, storage.TxFilter) ([]storage.Tx, error)) *MockITxByAddressCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxByAddressCall) DoAndReturn(f func(context.Context, uint64, storage.TxFilter) ([]storage.Tx, error)) *ITxByAddressCall { +func (c *MockITxByAddressCall) DoAndReturn(f func(context.Context, uint64, storage.TxFilter) ([]storage.Tx, error)) *MockITxByAddressCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -93,31 +91,31 @@ func (m *MockITx) ByHash(ctx context.Context, hash []byte) (storage.Tx, error) { } // ByHash indicates an expected call of ByHash. -func (mr *MockITxMockRecorder) ByHash(ctx, hash any) *ITxByHashCall { +func (mr *MockITxMockRecorder) ByHash(ctx, hash any) *MockITxByHashCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHash", reflect.TypeOf((*MockITx)(nil).ByHash), ctx, hash) - return &ITxByHashCall{Call: call} + return &MockITxByHashCall{Call: call} } -// ITxByHashCall wrap *gomock.Call -type ITxByHashCall struct { +// MockITxByHashCall wrap *gomock.Call +type MockITxByHashCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxByHashCall) Return(arg0 storage.Tx, arg1 error) *ITxByHashCall { +func (c *MockITxByHashCall) Return(arg0 storage.Tx, arg1 error) *MockITxByHashCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ITxByHashCall) Do(f func(context.Context, []byte) (storage.Tx, error)) *ITxByHashCall { +func (c *MockITxByHashCall) Do(f func(context.Context, []byte) (storage.Tx, error)) *MockITxByHashCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxByHashCall) DoAndReturn(f func(context.Context, []byte) (storage.Tx, error)) *ITxByHashCall { +func (c *MockITxByHashCall) DoAndReturn(f func(context.Context, []byte) (storage.Tx, error)) *MockITxByHashCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -132,31 +130,31 @@ func (m *MockITx) ByHeight(ctx context.Context, height types.Level, limit, offse } // ByHeight indicates an expected call of ByHeight. -func (mr *MockITxMockRecorder) ByHeight(ctx, height, limit, offset any) *ITxByHeightCall { +func (mr *MockITxMockRecorder) ByHeight(ctx, height, limit, offset any) *MockITxByHeightCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHeight", reflect.TypeOf((*MockITx)(nil).ByHeight), ctx, height, limit, offset) - return &ITxByHeightCall{Call: call} + return &MockITxByHeightCall{Call: call} } -// ITxByHeightCall wrap *gomock.Call -type ITxByHeightCall struct { +// MockITxByHeightCall wrap *gomock.Call +type MockITxByHeightCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxByHeightCall) Return(arg0 []storage.Tx, arg1 error) *ITxByHeightCall { +func (c *MockITxByHeightCall) Return(arg0 []storage.Tx, arg1 error) *MockITxByHeightCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ITxByHeightCall) Do(f func(context.Context, types.Level, int, int) ([]storage.Tx, error)) *ITxByHeightCall { +func (c *MockITxByHeightCall) Do(f func(context.Context, types.Level, int, int) ([]storage.Tx, error)) *MockITxByHeightCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxByHeightCall) DoAndReturn(f func(context.Context, types.Level, int, int) ([]storage.Tx, error)) *ITxByHeightCall { +func (c *MockITxByHeightCall) DoAndReturn(f func(context.Context, types.Level, int, int) ([]storage.Tx, error)) *MockITxByHeightCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -171,31 +169,31 @@ func (m *MockITx) CursorList(ctx context.Context, id, limit uint64, order storag } // CursorList indicates an expected call of CursorList. -func (mr *MockITxMockRecorder) CursorList(ctx, id, limit, order, cmp any) *ITxCursorListCall { +func (mr *MockITxMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockITxCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockITx)(nil).CursorList), ctx, id, limit, order, cmp) - return &ITxCursorListCall{Call: call} + return &MockITxCursorListCall{Call: call} } -// ITxCursorListCall wrap *gomock.Call -type ITxCursorListCall struct { +// MockITxCursorListCall wrap *gomock.Call +type MockITxCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxCursorListCall) Return(arg0 []*storage.Tx, arg1 error) *ITxCursorListCall { +func (c *MockITxCursorListCall) Return(arg0 []*storage.Tx, arg1 error) *MockITxCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ITxCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Tx, error)) *ITxCursorListCall { +func (c *MockITxCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Tx, error)) *MockITxCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Tx, error)) *ITxCursorListCall { +func (c *MockITxCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Tx, error)) *MockITxCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -210,31 +208,31 @@ func (m *MockITx) Filter(ctx context.Context, fltrs storage.TxFilter) ([]storage } // Filter indicates an expected call of Filter. -func (mr *MockITxMockRecorder) Filter(ctx, fltrs any) *ITxFilterCall { +func (mr *MockITxMockRecorder) Filter(ctx, fltrs any) *MockITxFilterCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Filter", reflect.TypeOf((*MockITx)(nil).Filter), ctx, fltrs) - return &ITxFilterCall{Call: call} + return &MockITxFilterCall{Call: call} } -// ITxFilterCall wrap *gomock.Call -type ITxFilterCall struct { +// MockITxFilterCall wrap *gomock.Call +type MockITxFilterCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxFilterCall) Return(arg0 []storage.Tx, arg1 error) *ITxFilterCall { +func (c *MockITxFilterCall) Return(arg0 []storage.Tx, arg1 error) *MockITxFilterCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ITxFilterCall) Do(f func(context.Context, storage.TxFilter) ([]storage.Tx, error)) *ITxFilterCall { +func (c *MockITxFilterCall) Do(f func(context.Context, storage.TxFilter) ([]storage.Tx, error)) *MockITxFilterCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxFilterCall) DoAndReturn(f func(context.Context, storage.TxFilter) ([]storage.Tx, error)) *ITxFilterCall { +func (c *MockITxFilterCall) DoAndReturn(f func(context.Context, storage.TxFilter) ([]storage.Tx, error)) *MockITxFilterCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -249,31 +247,31 @@ func (m *MockITx) GetByID(ctx context.Context, id uint64) (*storage.Tx, error) { } // GetByID indicates an expected call of GetByID. -func (mr *MockITxMockRecorder) GetByID(ctx, id any) *ITxGetByIDCall { +func (mr *MockITxMockRecorder) GetByID(ctx, id any) *MockITxGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockITx)(nil).GetByID), ctx, id) - return &ITxGetByIDCall{Call: call} + return &MockITxGetByIDCall{Call: call} } -// ITxGetByIDCall wrap *gomock.Call -type ITxGetByIDCall struct { +// MockITxGetByIDCall wrap *gomock.Call +type MockITxGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxGetByIDCall) Return(arg0 *storage.Tx, arg1 error) *ITxGetByIDCall { +func (c *MockITxGetByIDCall) Return(arg0 *storage.Tx, arg1 error) *MockITxGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ITxGetByIDCall) Do(f func(context.Context, uint64) (*storage.Tx, error)) *ITxGetByIDCall { +func (c *MockITxGetByIDCall) Do(f func(context.Context, uint64) (*storage.Tx, error)) *MockITxGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Tx, error)) *ITxGetByIDCall { +func (c *MockITxGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Tx, error)) *MockITxGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -287,31 +285,31 @@ func (m *MockITx) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockITxMockRecorder) IsNoRows(err any) *ITxIsNoRowsCall { +func (mr *MockITxMockRecorder) IsNoRows(err any) *MockITxIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockITx)(nil).IsNoRows), err) - return &ITxIsNoRowsCall{Call: call} + return &MockITxIsNoRowsCall{Call: call} } -// ITxIsNoRowsCall wrap *gomock.Call -type ITxIsNoRowsCall struct { +// MockITxIsNoRowsCall wrap *gomock.Call +type MockITxIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxIsNoRowsCall) Return(arg0 bool) *ITxIsNoRowsCall { +func (c *MockITxIsNoRowsCall) Return(arg0 bool) *MockITxIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ITxIsNoRowsCall) Do(f func(error) bool) *ITxIsNoRowsCall { +func (c *MockITxIsNoRowsCall) Do(f func(error) bool) *MockITxIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxIsNoRowsCall) DoAndReturn(f func(error) bool) *ITxIsNoRowsCall { +func (c *MockITxIsNoRowsCall) DoAndReturn(f func(error) bool) *MockITxIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -326,31 +324,31 @@ func (m *MockITx) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockITxMockRecorder) LastID(ctx any) *ITxLastIDCall { +func (mr *MockITxMockRecorder) LastID(ctx any) *MockITxLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockITx)(nil).LastID), ctx) - return &ITxLastIDCall{Call: call} + return &MockITxLastIDCall{Call: call} } -// ITxLastIDCall wrap *gomock.Call -type ITxLastIDCall struct { +// MockITxLastIDCall wrap *gomock.Call +type MockITxLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxLastIDCall) Return(arg0 uint64, arg1 error) *ITxLastIDCall { +func (c *MockITxLastIDCall) Return(arg0 uint64, arg1 error) *MockITxLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ITxLastIDCall) Do(f func(context.Context) (uint64, error)) *ITxLastIDCall { +func (c *MockITxLastIDCall) Do(f func(context.Context) (uint64, error)) *MockITxLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *ITxLastIDCall { +func (c *MockITxLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockITxLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -365,31 +363,31 @@ func (m *MockITx) List(ctx context.Context, limit, offset uint64, order storage0 } // List indicates an expected call of List. -func (mr *MockITxMockRecorder) List(ctx, limit, offset, order any) *ITxListCall { +func (mr *MockITxMockRecorder) List(ctx, limit, offset, order any) *MockITxListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockITx)(nil).List), ctx, limit, offset, order) - return &ITxListCall{Call: call} + return &MockITxListCall{Call: call} } -// ITxListCall wrap *gomock.Call -type ITxListCall struct { +// MockITxListCall wrap *gomock.Call +type MockITxListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxListCall) Return(arg0 []*storage.Tx, arg1 error) *ITxListCall { +func (c *MockITxListCall) Return(arg0 []*storage.Tx, arg1 error) *MockITxListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ITxListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Tx, error)) *ITxListCall { +func (c *MockITxListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Tx, error)) *MockITxListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Tx, error)) *ITxListCall { +func (c *MockITxListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Tx, error)) *MockITxListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -403,31 +401,31 @@ func (m_2 *MockITx) Save(ctx context.Context, m *storage.Tx) error { } // Save indicates an expected call of Save. -func (mr *MockITxMockRecorder) Save(ctx, m any) *ITxSaveCall { +func (mr *MockITxMockRecorder) Save(ctx, m any) *MockITxSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockITx)(nil).Save), ctx, m) - return &ITxSaveCall{Call: call} + return &MockITxSaveCall{Call: call} } -// ITxSaveCall wrap *gomock.Call -type ITxSaveCall struct { +// MockITxSaveCall wrap *gomock.Call +type MockITxSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxSaveCall) Return(arg0 error) *ITxSaveCall { +func (c *MockITxSaveCall) Return(arg0 error) *MockITxSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ITxSaveCall) Do(f func(context.Context, *storage.Tx) error) *ITxSaveCall { +func (c *MockITxSaveCall) Do(f func(context.Context, *storage.Tx) error) *MockITxSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxSaveCall) DoAndReturn(f func(context.Context, *storage.Tx) error) *ITxSaveCall { +func (c *MockITxSaveCall) DoAndReturn(f func(context.Context, *storage.Tx) error) *MockITxSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -441,31 +439,31 @@ func (m_2 *MockITx) Update(ctx context.Context, m *storage.Tx) error { } // Update indicates an expected call of Update. -func (mr *MockITxMockRecorder) Update(ctx, m any) *ITxUpdateCall { +func (mr *MockITxMockRecorder) Update(ctx, m any) *MockITxUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockITx)(nil).Update), ctx, m) - return &ITxUpdateCall{Call: call} + return &MockITxUpdateCall{Call: call} } -// ITxUpdateCall wrap *gomock.Call -type ITxUpdateCall struct { +// MockITxUpdateCall wrap *gomock.Call +type MockITxUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ITxUpdateCall) Return(arg0 error) *ITxUpdateCall { +func (c *MockITxUpdateCall) Return(arg0 error) *MockITxUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *ITxUpdateCall) Do(f func(context.Context, *storage.Tx) error) *ITxUpdateCall { +func (c *MockITxUpdateCall) Do(f func(context.Context, *storage.Tx) error) *MockITxUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ITxUpdateCall) DoAndReturn(f func(context.Context, *storage.Tx) error) *ITxUpdateCall { +func (c *MockITxUpdateCall) DoAndReturn(f func(context.Context, *storage.Tx) error) *MockITxUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/mock/validator.go b/internal/storage/mock/validator.go index 4b13c68..f05c58f 100644 --- a/internal/storage/mock/validator.go +++ b/internal/storage/mock/validator.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: validator.go // @@ -8,6 +5,7 @@ // // mockgen -source=validator.go -destination=mock/validator.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockIValidator) CursorList(ctx context.Context, id, limit uint64, order } // CursorList indicates an expected call of CursorList. -func (mr *MockIValidatorMockRecorder) CursorList(ctx, id, limit, order, cmp any) *IValidatorCursorListCall { +func (mr *MockIValidatorMockRecorder) CursorList(ctx, id, limit, order, cmp any) *MockIValidatorCursorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CursorList", reflect.TypeOf((*MockIValidator)(nil).CursorList), ctx, id, limit, order, cmp) - return &IValidatorCursorListCall{Call: call} + return &MockIValidatorCursorListCall{Call: call} } -// IValidatorCursorListCall wrap *gomock.Call -type IValidatorCursorListCall struct { +// MockIValidatorCursorListCall wrap *gomock.Call +type MockIValidatorCursorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IValidatorCursorListCall) Return(arg0 []*storage.Validator, arg1 error) *IValidatorCursorListCall { +func (c *MockIValidatorCursorListCall) Return(arg0 []*storage.Validator, arg1 error) *MockIValidatorCursorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IValidatorCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Validator, error)) *IValidatorCursorListCall { +func (c *MockIValidatorCursorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Validator, error)) *MockIValidatorCursorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IValidatorCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Validator, error)) *IValidatorCursorListCall { +func (c *MockIValidatorCursorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder, storage0.Comparator) ([]*storage.Validator, error)) *MockIValidatorCursorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +90,31 @@ func (m *MockIValidator) GetByID(ctx context.Context, id uint64) (*storage.Valid } // GetByID indicates an expected call of GetByID. -func (mr *MockIValidatorMockRecorder) GetByID(ctx, id any) *IValidatorGetByIDCall { +func (mr *MockIValidatorMockRecorder) GetByID(ctx, id any) *MockIValidatorGetByIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockIValidator)(nil).GetByID), ctx, id) - return &IValidatorGetByIDCall{Call: call} + return &MockIValidatorGetByIDCall{Call: call} } -// IValidatorGetByIDCall wrap *gomock.Call -type IValidatorGetByIDCall struct { +// MockIValidatorGetByIDCall wrap *gomock.Call +type MockIValidatorGetByIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IValidatorGetByIDCall) Return(arg0 *storage.Validator, arg1 error) *IValidatorGetByIDCall { +func (c *MockIValidatorGetByIDCall) Return(arg0 *storage.Validator, arg1 error) *MockIValidatorGetByIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IValidatorGetByIDCall) Do(f func(context.Context, uint64) (*storage.Validator, error)) *IValidatorGetByIDCall { +func (c *MockIValidatorGetByIDCall) Do(f func(context.Context, uint64) (*storage.Validator, error)) *MockIValidatorGetByIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IValidatorGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Validator, error)) *IValidatorGetByIDCall { +func (c *MockIValidatorGetByIDCall) DoAndReturn(f func(context.Context, uint64) (*storage.Validator, error)) *MockIValidatorGetByIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -130,31 +128,31 @@ func (m *MockIValidator) IsNoRows(err error) bool { } // IsNoRows indicates an expected call of IsNoRows. -func (mr *MockIValidatorMockRecorder) IsNoRows(err any) *IValidatorIsNoRowsCall { +func (mr *MockIValidatorMockRecorder) IsNoRows(err any) *MockIValidatorIsNoRowsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNoRows", reflect.TypeOf((*MockIValidator)(nil).IsNoRows), err) - return &IValidatorIsNoRowsCall{Call: call} + return &MockIValidatorIsNoRowsCall{Call: call} } -// IValidatorIsNoRowsCall wrap *gomock.Call -type IValidatorIsNoRowsCall struct { +// MockIValidatorIsNoRowsCall wrap *gomock.Call +type MockIValidatorIsNoRowsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IValidatorIsNoRowsCall) Return(arg0 bool) *IValidatorIsNoRowsCall { +func (c *MockIValidatorIsNoRowsCall) Return(arg0 bool) *MockIValidatorIsNoRowsCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IValidatorIsNoRowsCall) Do(f func(error) bool) *IValidatorIsNoRowsCall { +func (c *MockIValidatorIsNoRowsCall) Do(f func(error) bool) *MockIValidatorIsNoRowsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IValidatorIsNoRowsCall) DoAndReturn(f func(error) bool) *IValidatorIsNoRowsCall { +func (c *MockIValidatorIsNoRowsCall) DoAndReturn(f func(error) bool) *MockIValidatorIsNoRowsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -169,31 +167,31 @@ func (m *MockIValidator) LastID(ctx context.Context) (uint64, error) { } // LastID indicates an expected call of LastID. -func (mr *MockIValidatorMockRecorder) LastID(ctx any) *IValidatorLastIDCall { +func (mr *MockIValidatorMockRecorder) LastID(ctx any) *MockIValidatorLastIDCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastID", reflect.TypeOf((*MockIValidator)(nil).LastID), ctx) - return &IValidatorLastIDCall{Call: call} + return &MockIValidatorLastIDCall{Call: call} } -// IValidatorLastIDCall wrap *gomock.Call -type IValidatorLastIDCall struct { +// MockIValidatorLastIDCall wrap *gomock.Call +type MockIValidatorLastIDCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IValidatorLastIDCall) Return(arg0 uint64, arg1 error) *IValidatorLastIDCall { +func (c *MockIValidatorLastIDCall) Return(arg0 uint64, arg1 error) *MockIValidatorLastIDCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IValidatorLastIDCall) Do(f func(context.Context) (uint64, error)) *IValidatorLastIDCall { +func (c *MockIValidatorLastIDCall) Do(f func(context.Context) (uint64, error)) *MockIValidatorLastIDCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IValidatorLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *IValidatorLastIDCall { +func (c *MockIValidatorLastIDCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockIValidatorLastIDCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -208,31 +206,31 @@ func (m *MockIValidator) List(ctx context.Context, limit, offset uint64, order s } // List indicates an expected call of List. -func (mr *MockIValidatorMockRecorder) List(ctx, limit, offset, order any) *IValidatorListCall { +func (mr *MockIValidatorMockRecorder) List(ctx, limit, offset, order any) *MockIValidatorListCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockIValidator)(nil).List), ctx, limit, offset, order) - return &IValidatorListCall{Call: call} + return &MockIValidatorListCall{Call: call} } -// IValidatorListCall wrap *gomock.Call -type IValidatorListCall struct { +// MockIValidatorListCall wrap *gomock.Call +type MockIValidatorListCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IValidatorListCall) Return(arg0 []*storage.Validator, arg1 error) *IValidatorListCall { +func (c *MockIValidatorListCall) Return(arg0 []*storage.Validator, arg1 error) *MockIValidatorListCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *IValidatorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Validator, error)) *IValidatorListCall { +func (c *MockIValidatorListCall) Do(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Validator, error)) *MockIValidatorListCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IValidatorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Validator, error)) *IValidatorListCall { +func (c *MockIValidatorListCall) DoAndReturn(f func(context.Context, uint64, uint64, storage0.SortOrder) ([]*storage.Validator, error)) *MockIValidatorListCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -246,31 +244,31 @@ func (m_2 *MockIValidator) Save(ctx context.Context, m *storage.Validator) error } // Save indicates an expected call of Save. -func (mr *MockIValidatorMockRecorder) Save(ctx, m any) *IValidatorSaveCall { +func (mr *MockIValidatorMockRecorder) Save(ctx, m any) *MockIValidatorSaveCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockIValidator)(nil).Save), ctx, m) - return &IValidatorSaveCall{Call: call} + return &MockIValidatorSaveCall{Call: call} } -// IValidatorSaveCall wrap *gomock.Call -type IValidatorSaveCall struct { +// MockIValidatorSaveCall wrap *gomock.Call +type MockIValidatorSaveCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IValidatorSaveCall) Return(arg0 error) *IValidatorSaveCall { +func (c *MockIValidatorSaveCall) Return(arg0 error) *MockIValidatorSaveCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IValidatorSaveCall) Do(f func(context.Context, *storage.Validator) error) *IValidatorSaveCall { +func (c *MockIValidatorSaveCall) Do(f func(context.Context, *storage.Validator) error) *MockIValidatorSaveCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IValidatorSaveCall) DoAndReturn(f func(context.Context, *storage.Validator) error) *IValidatorSaveCall { +func (c *MockIValidatorSaveCall) DoAndReturn(f func(context.Context, *storage.Validator) error) *MockIValidatorSaveCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -284,31 +282,31 @@ func (m_2 *MockIValidator) Update(ctx context.Context, m *storage.Validator) err } // Update indicates an expected call of Update. -func (mr *MockIValidatorMockRecorder) Update(ctx, m any) *IValidatorUpdateCall { +func (mr *MockIValidatorMockRecorder) Update(ctx, m any) *MockIValidatorUpdateCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockIValidator)(nil).Update), ctx, m) - return &IValidatorUpdateCall{Call: call} + return &MockIValidatorUpdateCall{Call: call} } -// IValidatorUpdateCall wrap *gomock.Call -type IValidatorUpdateCall struct { +// MockIValidatorUpdateCall wrap *gomock.Call +type MockIValidatorUpdateCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *IValidatorUpdateCall) Return(arg0 error) *IValidatorUpdateCall { +func (c *MockIValidatorUpdateCall) Return(arg0 error) *MockIValidatorUpdateCall { c.Call = c.Call.Return(arg0) return c } // Do rewrite *gomock.Call.Do -func (c *IValidatorUpdateCall) Do(f func(context.Context, *storage.Validator) error) *IValidatorUpdateCall { +func (c *MockIValidatorUpdateCall) Do(f func(context.Context, *storage.Validator) error) *MockIValidatorUpdateCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *IValidatorUpdateCall) DoAndReturn(f func(context.Context, *storage.Validator) error) *IValidatorUpdateCall { +func (c *MockIValidatorUpdateCall) DoAndReturn(f func(context.Context, *storage.Validator) error) *MockIValidatorUpdateCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/internal/storage/postgres/action.go b/internal/storage/postgres/action.go index 9cf8010..9ac60c4 100644 --- a/internal/storage/postgres/action.go +++ b/internal/storage/postgres/action.go @@ -37,21 +37,28 @@ func (a *Action) ByBlock(ctx context.Context, height types.Level, limit, offset err = a.DB().NewSelect(). TableExpr("(?) as action", query). ColumnExpr("action.*"). + ColumnExpr("fee.asset as fee__asset, fee.amount as fee__amount"). ColumnExpr("tx.hash as tx__hash"). Join("left join tx on tx.id = action.tx_id"). + Join("left join fee on fee.action_id = action.id"). Scan(ctx, &actions) return } func (a *Action) ByTxId(ctx context.Context, txId uint64, limit, offset int) (actions []storage.Action, err error) { query := a.DB().NewSelect(). - Model(&actions). + Model((*storage.Action)(nil)). Where("tx_id = ?", txId) query = limitScope(query, limit) query = offsetScope(query, offset) - err = query.Scan(ctx) + err = a.DB().NewSelect(). + TableExpr("(?) as action", query). + ColumnExpr("fee.asset as fee__asset, fee.amount as fee__amount"). + ColumnExpr("action.*"). + Join("left join fee on fee.action_id = action.id"). + Scan(ctx, &actions) return } @@ -72,9 +79,11 @@ func (a *Action) ByAddress(ctx context.Context, addressId uint64, filters storag TableExpr("(?) as address_action", subQuery). ColumnExpr("address_action.*"). ColumnExpr("action.id as action__id, action.height as action__height, action.time as action__time, action.position as action__position, action.type as action__type, action.tx_id as action__tx_id, action.data as action__data"). + ColumnExpr("fee.asset as action__fee__asset, fee.amount as action__fee__amount"). ColumnExpr("tx.hash as tx__hash"). Join("left join tx on tx.id = address_action.tx_id"). - Join("left join action on action.id = address_action.action_id") + Join("left join action on action.id = address_action.action_id"). + Join("left join fee on fee.action_id = address_action.action_id") query = sortScope(query, "action_id", filters.Sort) err = query.Scan(ctx, &actions) return @@ -92,10 +101,12 @@ func (a *Action) ByRollup(ctx context.Context, rollupId uint64, limit, offset in query := a.DB().NewSelect(). TableExpr("(?) as rollup_action", subQuery). ColumnExpr("rollup_action.*"). + ColumnExpr("fee.asset as action__fee__asset, fee.amount as action__fee__amount"). ColumnExpr("action.id as action__id, action.height as action__height, action.time as action__time, action.position as action__position, action.type as action__type, action.tx_id as action__tx_id, action.data as action__data"). ColumnExpr("tx.hash as tx__hash"). Join("left join tx on tx.id = rollup_action.tx_id"). - Join("left join action on action.id = rollup_action.action_id") + Join("left join action on action.id = rollup_action.action_id"). + Join("left join fee on fee.action_id = rollup_action.action_id") query = sortScope(query, "action_id", sort) err = query.Scan(ctx, &actions) return diff --git a/internal/storage/postgres/action_test.go b/internal/storage/postgres/action_test.go index d00f8d9..ed371a6 100644 --- a/internal/storage/postgres/action_test.go +++ b/internal/storage/postgres/action_test.go @@ -27,6 +27,7 @@ func (s *StorageTestSuite) TestActionByBlock() { s.Require().EqualValues(1, action.TxId) s.Require().EqualValues(types.ActionTypeSequence, action.Type) s.Require().NotNil(action.Data) + s.Require().NotNil(action.Fee) s.Require().NotNil(action.Tx) s.Require().NotEmpty(action.Tx.Hash) } @@ -46,6 +47,7 @@ func (s *StorageTestSuite) TestActionByTxId() { s.Require().EqualValues(1, action.TxId) s.Require().EqualValues(types.ActionTypeSequence, action.Type) s.Require().NotNil(action.Data) + s.Require().NotNil(action.Fee) } func (s *StorageTestSuite) TestActionByAddress() { @@ -69,6 +71,7 @@ func (s *StorageTestSuite) TestActionByAddress() { s.Require().EqualValues(1, action.Action.TxId) s.Require().EqualValues(types.ActionTypeSequence, action.Action.Type) s.Require().NotNil(action.Action.Data) + s.Require().NotNil(action.Action.Fee) } func (s *StorageTestSuite) TestActionByRollup() { @@ -88,4 +91,5 @@ func (s *StorageTestSuite) TestActionByRollup() { s.Require().EqualValues(1, action.Action.TxId) s.Require().EqualValues(types.ActionTypeSequence, action.Action.Type) s.Require().NotNil(action.Action.Data) + s.Require().NotNil(action.Action.Fee) } diff --git a/internal/storage/postgres/core.go b/internal/storage/postgres/core.go index 0c52d86..1210fef 100644 --- a/internal/storage/postgres/core.go +++ b/internal/storage/postgres/core.go @@ -28,6 +28,7 @@ type Storage struct { Bridges models.IBridge Constants models.IConstant Tx models.ITx + Fee models.IFee Action models.IAction Address models.IAddress Rollup models.IRollup @@ -55,6 +56,7 @@ func Create(ctx context.Context, cfg config.Database, scriptsDir string) (Storag Bridges: NewBridge(strg.Connection()), Constants: NewConstant(strg.Connection()), Action: NewAction(strg.Connection()), + Fee: NewFee(strg.Connection()), Address: NewAddress(strg.Connection()), BlockSignatures: NewBlockSignature(strg.Connection()), Rollup: NewRollup(strg.Connection()), diff --git a/internal/storage/postgres/fee.go b/internal/storage/postgres/fee.go new file mode 100644 index 0000000..4d1b56c --- /dev/null +++ b/internal/storage/postgres/fee.go @@ -0,0 +1,22 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + +package postgres + +import ( + "github.com/celenium-io/astria-indexer/internal/storage" + "github.com/dipdup-net/go-lib/database" + "github.com/dipdup-net/indexer-sdk/pkg/storage/postgres" +) + +// Fee - +type Fee struct { + *postgres.Table[*storage.Fee] +} + +// NewFee - +func NewFee(db *database.Bun) *Fee { + return &Fee{ + Table: postgres.NewTable[*storage.Fee](db), + } +} diff --git a/internal/storage/postgres/index.go b/internal/storage/postgres/index.go index b5fdaf9..b08a99f 100644 --- a/internal/storage/postgres/index.go +++ b/internal/storage/postgres/index.go @@ -246,6 +246,35 @@ func createIndices(ctx context.Context, conn *database.Bun) error { return err } + // Fee + if _, err := tx.NewCreateIndex(). + IfNotExists(). + Model((*storage.Fee)(nil)). + Index("fee_height_idx"). + Column("height"). + Using("BRIN"). + Exec(ctx); err != nil { + return err + } + if _, err := tx.NewCreateIndex(). + IfNotExists(). + Model((*storage.Fee)(nil)). + Index("fee_action_id_idx"). + Column("action_id"). + Using("BRIN"). + Exec(ctx); err != nil { + return err + } + if _, err := tx.NewCreateIndex(). + IfNotExists(). + Model((*storage.Fee)(nil)). + Index("fee_tx_id_idx"). + Column("tx_id"). + Using("BRIN"). + Exec(ctx); err != nil { + return err + } + return nil }) } diff --git a/internal/storage/postgres/transaction.go b/internal/storage/postgres/transaction.go index 5dd6000..1412c9f 100644 --- a/internal/storage/postgres/transaction.go +++ b/internal/storage/postgres/transaction.go @@ -101,6 +101,15 @@ func (tx Transaction) SaveActions(ctx context.Context, actions ...*models.Action return err } +func (tx Transaction) SaveFees(ctx context.Context, fees ...*models.Fee) error { + if len(fees) == 0 { + return nil + } + + _, err := tx.Tx().NewInsert().Model(&fees).Returning("id").Exec(ctx) + return err +} + func (tx Transaction) SaveValidators(ctx context.Context, validators ...*models.Validator) error { if len(validators) == 0 { return nil @@ -312,6 +321,14 @@ func (tx Transaction) RollbackRollups(ctx context.Context, height types.Level) ( return } +func (tx Transaction) RollbackFees(ctx context.Context, height types.Level) (err error) { + _, err = tx.Tx().NewDelete(). + Model((*models.Fee)(nil)). + Where("height = ?", height). + Exec(ctx) + return +} + func (tx Transaction) RollbackBalances(ctx context.Context, ids []uint64) error { if len(ids) == 0 { return nil diff --git a/internal/storage/rollup.go b/internal/storage/rollup.go index f18d725..765c33a 100644 --- a/internal/storage/rollup.go +++ b/internal/storage/rollup.go @@ -8,14 +8,13 @@ import ( "encoding/hex" "github.com/celenium-io/astria-indexer/pkg/types" - "github.com/dipdup-net/indexer-sdk/pkg/storage" sdk "github.com/dipdup-net/indexer-sdk/pkg/storage" "github.com/uptrace/bun" ) //go:generate mockgen -source=$GOFILE -destination=mock/$GOFILE -package=mock -typed type IRollup interface { - storage.Table[*Rollup] + sdk.Table[*Rollup] ActionsByHeight(ctx context.Context, height types.Level, limit, offset int) ([]RollupAction, error) CountActionsByHeight(ctx context.Context, height types.Level) (int64, error) diff --git a/internal/storage/types/action_type_enum.go b/internal/storage/types/action_type_enum.go index 047d050..2b6d74a 100644 --- a/internal/storage/types/action_type_enum.go +++ b/internal/storage/types/action_type_enum.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by go-enum DO NOT EDIT. // Version: 0.5.7 // Revision: bf63e108589bbd2327b13ec2c5da532aad234029 diff --git a/internal/storage/types/module_enum.go b/internal/storage/types/module_enum.go index f1574fb..7f790ad 100644 --- a/internal/storage/types/module_enum.go +++ b/internal/storage/types/module_enum.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by go-enum DO NOT EDIT. // Version: 0.5.7 // Revision: bf63e108589bbd2327b13ec2c5da532aad234029 diff --git a/internal/storage/types/status_enum.go b/internal/storage/types/status_enum.go index fe296df..9520183 100644 --- a/internal/storage/types/status_enum.go +++ b/internal/storage/types/status_enum.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by go-enum DO NOT EDIT. // Version: 0.5.7 // Revision: bf63e108589bbd2327b13ec2c5da532aad234029 diff --git a/pkg/indexer/decode/actions.go b/pkg/indexer/decode/actions.go index 68abf55..e8ea1e5 100644 --- a/pkg/indexer/decode/actions.go +++ b/pkg/indexer/decode/actions.go @@ -18,8 +18,12 @@ import ( ) func parseActions(height types.Level, blockTime time.Time, from string, tx *DecodedTx, ctx *Context) ([]storage.Action, error) { - rawActions := tx.UnsignedTx.GetActions() - actions := make([]storage.Action, len(rawActions)) + var ( + feeCounter = 0 + rawActions = tx.UnsignedTx.GetActions() + actions = make([]storage.Action, len(rawActions)) + ) + for i := range rawActions { if tx.UnsignedTx.Actions[i].Value == nil { return nil, errors.Errorf("nil action") @@ -30,48 +34,64 @@ func parseActions(height types.Level, blockTime time.Time, from string, tx *Deco actions[i].Addresses = make([]*storage.AddressAction, 0) actions[i].BalanceUpdates = make([]storage.BalanceUpdate, 0) - var err error + var ( + err error + feeType string + ) switch val := rawActions[i].GetValue().(type) { case *astria.Action_IbcAction: tx.ActionTypes.Set(storageTypes.ActionTypeIbcRelayBits) err = parseIbcAction(val, &actions[i]) + feeType = "penumbra.core.component.ibc.v1.IbcAction" case *astria.Action_Ics20Withdrawal: tx.ActionTypes.Set(storageTypes.ActionTypeIcs20WithdrawalBits) err = parseIcs20Withdrawal(val, from, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.Ics20Withdrawal" case *astria.Action_SequenceAction: tx.ActionTypes.Set(storageTypes.ActionTypeSequenceBits) err = parseSequenceAction(val, from, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.SequenceAction" case *astria.Action_SudoAddressChangeAction: tx.ActionTypes.Set(storageTypes.ActionTypeSudoAddressChangeBits) err = parseSudoAddressChangeAction(val, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.SudoAddressChangeAction" case *astria.Action_TransferAction: tx.ActionTypes.Set(storageTypes.ActionTypeTransferBits) err = parseTransferAction(val, from, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.TransferAction" case *astria.Action_ValidatorUpdateAction: tx.ActionTypes.Set(storageTypes.ActionTypeValidatorUpdateBits) err = parseValidatorUpdateAction(val, height, ctx, &actions[i]) + feeType = "tendermint.abci.ValidatorUpdateAction" case *astria.Action_BridgeLockAction: tx.ActionTypes.Set(storageTypes.ActionTypeBridgeLockBits) err = parseBridgeLock(val, from, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.BridgeUnlockAction" case *astria.Action_FeeAssetChangeAction: tx.ActionTypes.Set(storageTypes.ActionTypeFeeAssetChangeBits) err = parseFeeAssetChange(val, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.FeeAssetChangeAction" case *astria.Action_IbcRelayerChangeAction: tx.ActionTypes.Set(storageTypes.ActionTypeIbcRelayerChangeBits) err = parseIbcRelayerChange(val, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.IbcRelayerChangeAction" case *astria.Action_InitBridgeAccountAction: tx.ActionTypes.Set(storageTypes.ActionTypeInitBridgeAccountBits) err = parseInitBridgeAccount(val, from, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.InitBridgeAccountAction" case *astria.Action_BridgeSudoChangeAction: tx.ActionTypes.Set(storageTypes.ActionTypeBridgeSudoChangeBits) err = parseBridgeSudoChange(val, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.BridgeSudoChangeAction" case *astria.Action_BridgeUnlockAction: tx.ActionTypes.Set(storageTypes.ActionTypeBridgeUnlockBits) err = parseBridgeUnlock(val, from, height, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.BridgeUnlockAction" case *astria.Action_FeeChangeAction: tx.ActionTypes.Set(storageTypes.ActionTypeFeeChangeBits) err = parseFeeChange(val, ctx, &actions[i]) + feeType = "astria.protocol.transactions.v1alpha1.FeeChangeAction" default: return nil, errors.Errorf( @@ -82,6 +102,35 @@ func parseActions(height types.Level, blockTime time.Time, from string, tx *Deco if err != nil { return nil, err } + + // merge fees + if len(ctx.Fees) > feeCounter { + if ctx.Fees[feeCounter].ActionType == feeType { + ctx.Fees[feeCounter].Height = height + ctx.Fees[feeCounter].Time = blockTime + ctx.Fees[feeCounter].Payer = &storage.Address{ + Hash: from, + } + actions[i].Fee = ctx.Fees[feeCounter] + fromAmount := ctx.Fees[feeCounter].Amount.Neg() + addr := ctx.Addresses.Set(from, height, fromAmount, ctx.Fees[feeCounter].Asset, 0, 0) + actions[i].BalanceUpdates = append(actions[i].BalanceUpdates, storage.BalanceUpdate{ + Address: addr, + Height: actions[i].Height, + Currency: ctx.Fees[feeCounter].Asset, + Update: fromAmount, + }) + + to := ctx.Addresses.Set(ctx.Proposer, height, ctx.Fees[feeCounter].Amount, ctx.Fees[feeCounter].Asset, 0, 0) + actions[i].BalanceUpdates = append(actions[i].BalanceUpdates, storage.BalanceUpdate{ + Address: to, + Height: actions[i].Height, + Currency: ctx.Fees[feeCounter].Asset, + Update: ctx.Fees[feeCounter].Amount, + }) + feeCounter++ + } + } } return actions, nil diff --git a/pkg/indexer/decode/context.go b/pkg/indexer/decode/context.go index d0bed56..fe83557 100644 --- a/pkg/indexer/decode/context.go +++ b/pkg/indexer/decode/context.go @@ -25,6 +25,8 @@ type Context struct { ActionTypes storageTypes.Bits Constants map[string]*storage.Constant Bridges map[string]*storage.Bridge + Fees []*storage.Fee + Proposer string } func NewContext() Context { @@ -36,6 +38,7 @@ func NewContext() Context { Validators: NewValidators(), Constants: make(map[string]*storage.Constant), Bridges: make(map[string]*storage.Bridge), + Fees: make([]*storage.Fee, 0), } } @@ -67,3 +70,7 @@ func (ctx *Context) BridgesArray() []*storage.Bridge { } return arr } + +func (ctx *Context) AddFee(fee *storage.Fee) { + ctx.Fees = append(ctx.Fees, fee) +} diff --git a/pkg/indexer/genesis/constant.go b/pkg/indexer/genesis/constant.go index ab4a96d..92166aa 100644 --- a/pkg/indexer/genesis/constant.go +++ b/pkg/indexer/genesis/constant.go @@ -76,36 +76,36 @@ func (module *Module) parseConstants(appState nodeTypes.AppState, consensus pkgT data.constants = append(data.constants, storage.Constant{ Module: storageTypes.ModuleNameGeneric, Name: "bridge_lock_byte_cost_multiplier", - Value: strconv.FormatInt(appState.Fees.BridgeLockByteCostMultiplier, 10), + Value: appState.Fees.BridgeLockByteCostMultiplier.String(), }) data.constants = append(data.constants, storage.Constant{ Module: storageTypes.ModuleNameGeneric, Name: "ics20_withdrawal_base_fee", - Value: strconv.FormatInt(appState.Fees.Ics20WithdrawalBaseFee, 10), + Value: appState.Fees.Ics20WithdrawalBaseFee.String(), }) data.constants = append(data.constants, storage.Constant{ Module: storageTypes.ModuleNameGeneric, Name: "init_bridge_account_base_fee", - Value: strconv.FormatInt(appState.Fees.InitBridgeAccountBaseFee, 10), + Value: appState.Fees.InitBridgeAccountBaseFee.String(), }) data.constants = append(data.constants, storage.Constant{ Module: storageTypes.ModuleNameGeneric, Name: "sequence_base_fee", - Value: strconv.FormatInt(appState.Fees.SequenceBaseFee, 10), + Value: appState.Fees.SequenceBaseFee.String(), }) data.constants = append(data.constants, storage.Constant{ Module: storageTypes.ModuleNameGeneric, Name: "sequence_byte_cost_multiplier", - Value: strconv.FormatInt(appState.Fees.SequenceByteCostMultiplier, 10), + Value: appState.Fees.SequenceByteCostMultiplier.String(), }) data.constants = append(data.constants, storage.Constant{ Module: storageTypes.ModuleNameGeneric, Name: "transfer_base_fee", - Value: strconv.FormatInt(appState.Fees.TransferBaseFee, 10), + Value: appState.Fees.TransferBaseFee.String(), }) data.constants = append(data.constants, storage.Constant{ Module: storageTypes.ModuleNameGeneric, Name: "bridge_sudo_change_fee", - Value: strconv.FormatInt(appState.Fees.BridgeSudoChangeFee, 10), + Value: appState.Fees.BridgeSudoChangeFee.String(), }) } diff --git a/pkg/indexer/genesis/genesis_test.go b/pkg/indexer/genesis/genesis_test.go index a67ddf6..896d457 100644 --- a/pkg/indexer/genesis/genesis_test.go +++ b/pkg/indexer/genesis/genesis_test.go @@ -36,9 +36,9 @@ func TestParseAccounts(t *testing.T) { require.NoError(t, err) want := map[string]*storage.Address{ - "astria1lhpxecq5ffhq68dgu9s8y2g5h53jqw5cvudrkk": { + "astria12znlg972crgwspaw2ljsnglsvs0yk2waf7wxqw": { Height: 1, - Hash: "astria1lhpxecq5ffhq68dgu9s8y2g5h53jqw5cvudrkk", + Hash: "astria12znlg972crgwspaw2ljsnglsvs0yk2waf7wxqw", Balance: []*storage.Balance{ { Id: 0, @@ -47,20 +47,20 @@ func TestParseAccounts(t *testing.T) { }, }, }, - "astria1lm45urgugesyhaymn68xww0m6g49zreqa32w7p": { + "astria14arwxsq84vjj0eeywah8e80lt6ehgunkn7pxf7": { Height: 1, - Hash: "astria1lm45urgugesyhaymn68xww0m6g49zreqa32w7p", + Hash: "astria14arwxsq84vjj0eeywah8e80lt6ehgunkn7pxf7", Balance: []*storage.Balance{ { Id: 0, - Total: decimal.RequireFromString("60"), + Total: decimal.RequireFromString("333333333333333333"), Currency: "nria", }, }, }, - "astria1c220qfmjrwqlk939ca5a5z2rjxryyr9m3ah8gl": { + "astria1umqxfss8wua2ptcclwf7z3ly9phvsjt0hxpcjm": { Height: 1, - Hash: "astria1c220qfmjrwqlk939ca5a5z2rjxryyr9m3ah8gl", + Hash: "astria1umqxfss8wua2ptcclwf7z3ly9phvsjt0hxpcjm", Balance: []*storage.Balance{ { Id: 0, @@ -69,9 +69,9 @@ func TestParseAccounts(t *testing.T) { }, }, }, - "astria1475jkpuvznd44szgfz8wwdf9w6xh5dx9jwqgvz": { + "astria1hrukdtz6xxk4x0hjrvc2wlx9wqc86s6u6tjmhy": { Height: 1, - Hash: "astria1475jkpuvznd44szgfz8wwdf9w6xh5dx9jwqgvz", + Hash: "astria1hrukdtz6xxk4x0hjrvc2wlx9wqc86s6u6tjmhy", Balance: []*storage.Balance{ { Id: 0, @@ -80,24 +80,24 @@ func TestParseAccounts(t *testing.T) { }, }, }, - "astria16rgmx2s86kk2r69rhjnvs9y44ujfhadc7yav9a": { + "astria1je48an7fhxfl70nv5x4s4mphe7nszm6t0fryy7": { Height: 1, - Hash: "astria16rgmx2s86kk2r69rhjnvs9y44ujfhadc7yav9a", + Hash: "astria1je48an7fhxfl70nv5x4s4mphe7nszm6t0fryy7", Balance: []*storage.Balance{ { Id: 0, - Total: decimal.RequireFromString("340282366920938463463374607431768211455"), + Total: decimal.RequireFromString("60"), Currency: "nria", }, }, }, - "astria1phym4uktjn6gjle226009ge7u82w0dgtszs8x2": { + "astria10cgc54dxh3sdetsr03rkhhkt3vsn3r7j46yvqh": { Height: 1, - Hash: "astria1phym4uktjn6gjle226009ge7u82w0dgtszs8x2", + Hash: "astria10cgc54dxh3sdetsr03rkhhkt3vsn3r7j46yvqh", Balance: []*storage.Balance{ { Id: 0, - Total: decimal.Zero, + Total: decimal.RequireFromString("1000000000000"), Currency: "nria", }, }, @@ -135,6 +135,17 @@ func TestParseAccounts(t *testing.T) { }, }, }, + "astria1phym4uktjn6gjle226009ge7u82w0dgtszs8x2": { + Height: 1, + Hash: "astria1phym4uktjn6gjle226009ge7u82w0dgtszs8x2", + Balance: []*storage.Balance{ + { + Id: 0, + Total: decimal.Zero, + Currency: "nria", + }, + }, + }, } require.Equal(t, want, data.addresses) } diff --git a/pkg/indexer/parser/parse.go b/pkg/indexer/parser/parse.go index d34bbbe..0369fdf 100644 --- a/pkg/indexer/parser/parse.go +++ b/pkg/indexer/parser/parse.go @@ -22,18 +22,19 @@ func (p *Module) parse(b types.BlockData) error { Int64("height", b.Block.Height). Msg("parsing block...") + proposer, err := astria.EncodeFromHex(b.Block.ProposerAddress.String()) + if err != nil { + return errors.Wrap(err, "decoding block proposer address") + } + decodeCtx := decode.NewContext() + decodeCtx.Proposer = proposer txs, err := parseTxs(b, &decodeCtx) if err != nil { return errors.Wrapf(err, "while parsing block on level=%d", b.Height) } - proposer, err := astria.EncodeFromHex(b.Block.ProposerAddress.String()) - if err != nil { - return errors.Wrap(err, "decoding block proposer address") - } - block := &storage.Block{ Height: b.Height, Time: b.Block.Time, diff --git a/pkg/indexer/parser/parseEvents.go b/pkg/indexer/parser/parseEvents.go new file mode 100644 index 0000000..368e72c --- /dev/null +++ b/pkg/indexer/parser/parseEvents.go @@ -0,0 +1,58 @@ +// SPDX-FileCopyrightText: 2024 PK Lab AG +// SPDX-License-Identifier: MIT + +package parser + +import ( + "github.com/celenium-io/astria-indexer/internal/currency" + "github.com/celenium-io/astria-indexer/internal/storage" + "github.com/celenium-io/astria-indexer/pkg/indexer/decode" + "github.com/celenium-io/astria-indexer/pkg/types" + "github.com/pkg/errors" + "github.com/shopspring/decimal" +) + +func parseEvents(events []types.Event, ctx *decode.Context) error { + for i := range events { + var err error + switch events[i].Type { + case "tx.fees": + err = parseTxFees(events[i].Attributes, ctx) + default: + continue + } + + if err != nil { + return errors.Wrap(err, events[i].Type) + } + } + return nil +} + +func parseTxFees(attrs []types.EventAttribute, ctx *decode.Context) error { + var ( + fee = new(storage.Fee) + err error + ) + for i := range attrs { + switch attrs[i].Key { + case "asset": + fee.Asset = attrs[i].Value + // TODO: think about general logic with IBC channels + if fee.Asset == "ibc/704031c868fd3d3c84a1cfa8cb45deba4ea746b44697f7f4a6ed1b8f6c239b82" { + fee.Asset = string(currency.Nria) + } + case "feeAmount": + fee.Amount, err = decimal.NewFromString(attrs[i].Value) + if err != nil { + return err + } + case "actionType": + fee.ActionType = attrs[i].Value + default: + } + } + + ctx.AddFee(fee) + return nil +} diff --git a/pkg/indexer/parser/parseTxs.go b/pkg/indexer/parser/parseTxs.go index a25fd4d..37cae18 100644 --- a/pkg/indexer/parser/parseTxs.go +++ b/pkg/indexer/parser/parseTxs.go @@ -27,6 +27,10 @@ func parseTxs(b types.BlockData, ctx *decode.Context) ([]*storage.Tx, error) { txs := make([]*storage.Tx, count) for i := index; i < len(b.TxsResults); i++ { + if err := parseEvents(b.TxsResults[i].Events, ctx); err != nil { + return nil, errors.Wrap(err, "parse events") + } + t, err := parseTx(b, i, b.TxsResults[i], ctx) if err != nil { return nil, err diff --git a/pkg/indexer/parser/parseTxs_test.go b/pkg/indexer/parser/parseTxs_test.go index 2ad4b0a..41fd45d 100644 --- a/pkg/indexer/parser/parseTxs_test.go +++ b/pkg/indexer/parser/parseTxs_test.go @@ -31,7 +31,23 @@ func TestParseTxs_SuccessTx(t *testing.T) { Info: "info", GasWanted: 12000, GasUsed: 1000, - Events: nil, + Events: []types.Event{ + { + Type: "tx.fees", + Attributes: []types.EventAttribute{ + { + Key: "asset", + Value: "ibc/704031c868fd3d3c84a1cfa8cb45deba4ea746b44697f7f4a6ed1b8f6c239b82", + }, { + Key: "feeAmount", + Value: "153", + }, { + Key: "actionType", + Value: "astria.protocol.transactions.v1alpha1.FeeAssetChangeAction", + }, + }, + }, + }, Codespace: "codespace", } block, now := testsuite.CreateTestBlock(txRes, true) diff --git a/pkg/indexer/rollback/rollback.go b/pkg/indexer/rollback/rollback.go index 0f2a7bb..6a14ff8 100644 --- a/pkg/indexer/rollback/rollback.go +++ b/pkg/indexer/rollback/rollback.go @@ -206,6 +206,10 @@ func rollbackBlock(ctx context.Context, tx storage.Transaction, height types.Lev return err } + if err := tx.RollbackFees(ctx, height); err != nil { + return err + } + if err := tx.RollbackBlockSignatures(ctx, height); err != nil { return err } diff --git a/pkg/indexer/rollback/rollback_test.go b/pkg/indexer/rollback/rollback_test.go index 14edffe..6d77bde 100644 --- a/pkg/indexer/rollback/rollback_test.go +++ b/pkg/indexer/rollback/rollback_test.go @@ -262,6 +262,12 @@ func Test_rollbackBlock(t *testing.T) { MaxTimes(1). MinTimes(1) + tx.EXPECT(). + RollbackFees(ctx, height). + Return(nil). + MaxTimes(1). + MinTimes(1) + lastBlock := storage.Block{ Height: height - 1, Time: blockTime.Add(-time.Minute), diff --git a/pkg/indexer/storage/action.go b/pkg/indexer/storage/action.go index d4c22e5..f9317a9 100644 --- a/pkg/indexer/storage/action.go +++ b/pkg/indexer/storage/action.go @@ -7,12 +7,14 @@ import ( "context" "github.com/celenium-io/astria-indexer/internal/storage" + "github.com/pkg/errors" ) func saveAction( ctx context.Context, tx storage.Transaction, actions []*storage.Action, + addrToId map[string]uint64, ) error { if len(actions) == 0 { return nil @@ -26,6 +28,7 @@ func saveAction( rollupActions = make([]*storage.RollupAction, 0) addrActions = make([]*storage.AddressAction, 0) balanceUpdates = make([]storage.BalanceUpdate, 0) + fees = make([]*storage.Fee, 0) ) for i := range actions { if actions[i].RollupAction != nil { @@ -46,6 +49,17 @@ func saveAction( actions[i].BalanceUpdates[j].AddressId = actions[i].BalanceUpdates[j].Address.Id } balanceUpdates = append(balanceUpdates, actions[i].BalanceUpdates...) + + if actions[i].Fee != nil { + actions[i].Fee.ActionId = actions[i].Id + actions[i].Fee.TxId = actions[i].TxId + if payerId, ok := addrToId[actions[i].Fee.Payer.Hash]; ok { + actions[i].Fee.PayerId = payerId + } else { + return errors.Errorf("unknown payer id") + } + fees = append(fees, actions[i].Fee) + } } if err := tx.SaveRollupActions(ctx, rollupActions...); err != nil { @@ -57,6 +71,9 @@ func saveAction( if err := tx.SaveBalanceUpdates(ctx, balanceUpdates...); err != nil { return err } + if err := tx.SaveFees(ctx, fees...); err != nil { + return err + } return nil } diff --git a/pkg/indexer/storage/storage.go b/pkg/indexer/storage/storage.go index 654cdcc..8826256 100644 --- a/pkg/indexer/storage/storage.go +++ b/pkg/indexer/storage/storage.go @@ -194,7 +194,7 @@ func (module *Module) processBlockInTransaction(ctx context.Context, tx storage. } } - if err := saveAction(ctx, tx, actions); err != nil { + if err := saveAction(ctx, tx, actions, addrToId); err != nil { return state, err } diff --git a/pkg/node/mock/api.go b/pkg/node/mock/api.go index 2ac0b6e..7605819 100644 --- a/pkg/node/mock/api.go +++ b/pkg/node/mock/api.go @@ -1,6 +1,3 @@ -// SPDX-FileCopyrightText: 2024 PK Lab AG -// SPDX-License-Identifier: MIT - // Code generated by MockGen. DO NOT EDIT. // Source: api.go // @@ -8,6 +5,7 @@ // // mockgen -source=api.go -destination=mock/api.go -package=mock -typed // + // Package mock is a generated GoMock package. package mock @@ -53,31 +51,31 @@ func (m *MockApi) Block(ctx context.Context, level types0.Level) (types0.ResultB } // Block indicates an expected call of Block. -func (mr *MockApiMockRecorder) Block(ctx, level any) *ApiBlockCall { +func (mr *MockApiMockRecorder) Block(ctx, level any) *MockApiBlockCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Block", reflect.TypeOf((*MockApi)(nil).Block), ctx, level) - return &ApiBlockCall{Call: call} + return &MockApiBlockCall{Call: call} } -// ApiBlockCall wrap *gomock.Call -type ApiBlockCall struct { +// MockApiBlockCall wrap *gomock.Call +type MockApiBlockCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ApiBlockCall) Return(arg0 types0.ResultBlock, arg1 error) *ApiBlockCall { +func (c *MockApiBlockCall) Return(arg0 types0.ResultBlock, arg1 error) *MockApiBlockCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ApiBlockCall) Do(f func(context.Context, types0.Level) (types0.ResultBlock, error)) *ApiBlockCall { +func (c *MockApiBlockCall) Do(f func(context.Context, types0.Level) (types0.ResultBlock, error)) *MockApiBlockCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ApiBlockCall) DoAndReturn(f func(context.Context, types0.Level) (types0.ResultBlock, error)) *ApiBlockCall { +func (c *MockApiBlockCall) DoAndReturn(f func(context.Context, types0.Level) (types0.ResultBlock, error)) *MockApiBlockCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -92,31 +90,31 @@ func (m *MockApi) BlockData(ctx context.Context, level types0.Level) (types0.Blo } // BlockData indicates an expected call of BlockData. -func (mr *MockApiMockRecorder) BlockData(ctx, level any) *ApiBlockDataCall { +func (mr *MockApiMockRecorder) BlockData(ctx, level any) *MockApiBlockDataCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockData", reflect.TypeOf((*MockApi)(nil).BlockData), ctx, level) - return &ApiBlockDataCall{Call: call} + return &MockApiBlockDataCall{Call: call} } -// ApiBlockDataCall wrap *gomock.Call -type ApiBlockDataCall struct { +// MockApiBlockDataCall wrap *gomock.Call +type MockApiBlockDataCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ApiBlockDataCall) Return(arg0 types0.BlockData, arg1 error) *ApiBlockDataCall { +func (c *MockApiBlockDataCall) Return(arg0 types0.BlockData, arg1 error) *MockApiBlockDataCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ApiBlockDataCall) Do(f func(context.Context, types0.Level) (types0.BlockData, error)) *ApiBlockDataCall { +func (c *MockApiBlockDataCall) Do(f func(context.Context, types0.Level) (types0.BlockData, error)) *MockApiBlockDataCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ApiBlockDataCall) DoAndReturn(f func(context.Context, types0.Level) (types0.BlockData, error)) *ApiBlockDataCall { +func (c *MockApiBlockDataCall) DoAndReturn(f func(context.Context, types0.Level) (types0.BlockData, error)) *MockApiBlockDataCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -131,31 +129,31 @@ func (m *MockApi) BlockDataGet(ctx context.Context, level types0.Level) (types0. } // BlockDataGet indicates an expected call of BlockDataGet. -func (mr *MockApiMockRecorder) BlockDataGet(ctx, level any) *ApiBlockDataGetCall { +func (mr *MockApiMockRecorder) BlockDataGet(ctx, level any) *MockApiBlockDataGetCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockDataGet", reflect.TypeOf((*MockApi)(nil).BlockDataGet), ctx, level) - return &ApiBlockDataGetCall{Call: call} + return &MockApiBlockDataGetCall{Call: call} } -// ApiBlockDataGetCall wrap *gomock.Call -type ApiBlockDataGetCall struct { +// MockApiBlockDataGetCall wrap *gomock.Call +type MockApiBlockDataGetCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ApiBlockDataGetCall) Return(arg0 types0.BlockData, arg1 error) *ApiBlockDataGetCall { +func (c *MockApiBlockDataGetCall) Return(arg0 types0.BlockData, arg1 error) *MockApiBlockDataGetCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ApiBlockDataGetCall) Do(f func(context.Context, types0.Level) (types0.BlockData, error)) *ApiBlockDataGetCall { +func (c *MockApiBlockDataGetCall) Do(f func(context.Context, types0.Level) (types0.BlockData, error)) *MockApiBlockDataGetCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ApiBlockDataGetCall) DoAndReturn(f func(context.Context, types0.Level) (types0.BlockData, error)) *ApiBlockDataGetCall { +func (c *MockApiBlockDataGetCall) DoAndReturn(f func(context.Context, types0.Level) (types0.BlockData, error)) *MockApiBlockDataGetCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -170,31 +168,31 @@ func (m *MockApi) BlockResults(ctx context.Context, level types0.Level) (types0. } // BlockResults indicates an expected call of BlockResults. -func (mr *MockApiMockRecorder) BlockResults(ctx, level any) *ApiBlockResultsCall { +func (mr *MockApiMockRecorder) BlockResults(ctx, level any) *MockApiBlockResultsCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockResults", reflect.TypeOf((*MockApi)(nil).BlockResults), ctx, level) - return &ApiBlockResultsCall{Call: call} + return &MockApiBlockResultsCall{Call: call} } -// ApiBlockResultsCall wrap *gomock.Call -type ApiBlockResultsCall struct { +// MockApiBlockResultsCall wrap *gomock.Call +type MockApiBlockResultsCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ApiBlockResultsCall) Return(arg0 types0.ResultBlockResults, arg1 error) *ApiBlockResultsCall { +func (c *MockApiBlockResultsCall) Return(arg0 types0.ResultBlockResults, arg1 error) *MockApiBlockResultsCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ApiBlockResultsCall) Do(f func(context.Context, types0.Level) (types0.ResultBlockResults, error)) *ApiBlockResultsCall { +func (c *MockApiBlockResultsCall) Do(f func(context.Context, types0.Level) (types0.ResultBlockResults, error)) *MockApiBlockResultsCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ApiBlockResultsCall) DoAndReturn(f func(context.Context, types0.Level) (types0.ResultBlockResults, error)) *ApiBlockResultsCall { +func (c *MockApiBlockResultsCall) DoAndReturn(f func(context.Context, types0.Level) (types0.ResultBlockResults, error)) *MockApiBlockResultsCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -209,31 +207,31 @@ func (m *MockApi) Genesis(ctx context.Context) (types.Genesis, error) { } // Genesis indicates an expected call of Genesis. -func (mr *MockApiMockRecorder) Genesis(ctx any) *ApiGenesisCall { +func (mr *MockApiMockRecorder) Genesis(ctx any) *MockApiGenesisCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Genesis", reflect.TypeOf((*MockApi)(nil).Genesis), ctx) - return &ApiGenesisCall{Call: call} + return &MockApiGenesisCall{Call: call} } -// ApiGenesisCall wrap *gomock.Call -type ApiGenesisCall struct { +// MockApiGenesisCall wrap *gomock.Call +type MockApiGenesisCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ApiGenesisCall) Return(arg0 types.Genesis, arg1 error) *ApiGenesisCall { +func (c *MockApiGenesisCall) Return(arg0 types.Genesis, arg1 error) *MockApiGenesisCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ApiGenesisCall) Do(f func(context.Context) (types.Genesis, error)) *ApiGenesisCall { +func (c *MockApiGenesisCall) Do(f func(context.Context) (types.Genesis, error)) *MockApiGenesisCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ApiGenesisCall) DoAndReturn(f func(context.Context) (types.Genesis, error)) *ApiGenesisCall { +func (c *MockApiGenesisCall) DoAndReturn(f func(context.Context) (types.Genesis, error)) *MockApiGenesisCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -248,31 +246,31 @@ func (m *MockApi) Head(ctx context.Context) (types0.ResultBlock, error) { } // Head indicates an expected call of Head. -func (mr *MockApiMockRecorder) Head(ctx any) *ApiHeadCall { +func (mr *MockApiMockRecorder) Head(ctx any) *MockApiHeadCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Head", reflect.TypeOf((*MockApi)(nil).Head), ctx) - return &ApiHeadCall{Call: call} + return &MockApiHeadCall{Call: call} } -// ApiHeadCall wrap *gomock.Call -type ApiHeadCall struct { +// MockApiHeadCall wrap *gomock.Call +type MockApiHeadCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ApiHeadCall) Return(arg0 types0.ResultBlock, arg1 error) *ApiHeadCall { +func (c *MockApiHeadCall) Return(arg0 types0.ResultBlock, arg1 error) *MockApiHeadCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ApiHeadCall) Do(f func(context.Context) (types0.ResultBlock, error)) *ApiHeadCall { +func (c *MockApiHeadCall) Do(f func(context.Context) (types0.ResultBlock, error)) *MockApiHeadCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ApiHeadCall) DoAndReturn(f func(context.Context) (types0.ResultBlock, error)) *ApiHeadCall { +func (c *MockApiHeadCall) DoAndReturn(f func(context.Context) (types0.ResultBlock, error)) *MockApiHeadCall { c.Call = c.Call.DoAndReturn(f) return c } @@ -287,31 +285,31 @@ func (m *MockApi) Status(ctx context.Context) (types.Status, error) { } // Status indicates an expected call of Status. -func (mr *MockApiMockRecorder) Status(ctx any) *ApiStatusCall { +func (mr *MockApiMockRecorder) Status(ctx any) *MockApiStatusCall { mr.mock.ctrl.T.Helper() call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockApi)(nil).Status), ctx) - return &ApiStatusCall{Call: call} + return &MockApiStatusCall{Call: call} } -// ApiStatusCall wrap *gomock.Call -type ApiStatusCall struct { +// MockApiStatusCall wrap *gomock.Call +type MockApiStatusCall struct { *gomock.Call } // Return rewrite *gomock.Call.Return -func (c *ApiStatusCall) Return(arg0 types.Status, arg1 error) *ApiStatusCall { +func (c *MockApiStatusCall) Return(arg0 types.Status, arg1 error) *MockApiStatusCall { c.Call = c.Call.Return(arg0, arg1) return c } // Do rewrite *gomock.Call.Do -func (c *ApiStatusCall) Do(f func(context.Context) (types.Status, error)) *ApiStatusCall { +func (c *MockApiStatusCall) Do(f func(context.Context) (types.Status, error)) *MockApiStatusCall { c.Call = c.Call.Do(f) return c } // DoAndReturn rewrite *gomock.Call.DoAndReturn -func (c *ApiStatusCall) DoAndReturn(f func(context.Context) (types.Status, error)) *ApiStatusCall { +func (c *MockApiStatusCall) DoAndReturn(f func(context.Context) (types.Status, error)) *MockApiStatusCall { c.Call = c.Call.DoAndReturn(f) return c } diff --git a/pkg/node/types/genesis.go b/pkg/node/types/genesis.go index 49cc134..ddffaa9 100644 --- a/pkg/node/types/genesis.go +++ b/pkg/node/types/genesis.go @@ -4,7 +4,7 @@ package types import ( - "encoding/json" + "math/big" "time" "github.com/celenium-io/astria-indexer/pkg/types" @@ -39,8 +39,8 @@ type AppState struct { } type Account struct { - Address Bech32m `json:"address"` - Balance json.Number `json:"balance"` + Address Bech32m `json:"address"` + Balance BigInt `json:"balance"` } type Bech32m struct { @@ -52,11 +52,27 @@ type Prefixes struct { } type Fees struct { - TransferBaseFee int64 `json:"transfer_base_fee"` - SequenceBaseFee int64 `json:"sequence_base_fee"` - SequenceByteCostMultiplier int64 `json:"sequence_byte_cost_multiplier"` - InitBridgeAccountBaseFee int64 `json:"init_bridge_account_base_fee"` - BridgeLockByteCostMultiplier int64 `json:"bridge_lock_byte_cost_multiplier"` - Ics20WithdrawalBaseFee int64 `json:"ics20_withdrawal_base_fee"` - BridgeSudoChangeFee int64 `json:"bridge_sudo_change_fee"` + TransferBaseFee BigInt `json:"transfer_base_fee"` + SequenceBaseFee BigInt `json:"sequence_base_fee"` + SequenceByteCostMultiplier BigInt `json:"sequence_byte_cost_multiplier"` + InitBridgeAccountBaseFee BigInt `json:"init_bridge_account_base_fee"` + BridgeLockByteCostMultiplier BigInt `json:"bridge_lock_byte_cost_multiplier"` + Ics20WithdrawalBaseFee BigInt `json:"ics20_withdrawal_base_fee"` + BridgeSudoChangeFee BigInt `json:"bridge_sudo_change_fee"` +} + +type BigInt struct { + Low uint64 `json:"lo"` + High uint64 `json:"hi"` +} + +func (bi BigInt) String() string { + b := new(big.Int) + b = b.SetUint64(bi.High) + b = b.Lsh(b, 64) + + lo := new(big.Int) + lo = lo.SetUint64(bi.Low) + b = b.Xor(b, lo) + return b.String() } diff --git a/test/data/fee.yml b/test/data/fee.yml new file mode 100644 index 0000000..be4dad6 --- /dev/null +++ b/test/data/fee.yml @@ -0,0 +1,8 @@ +- id: 1 + height: 7316 + time: '2023-11-30T23:52:23.265Z' + action_id: 1 + tx_id: 1 + asset: nria + amount: 100 + payer_id: 1 \ No newline at end of file diff --git a/test/json/genesis.json b/test/json/genesis.json index 56c37bb..afe78a6 100644 --- a/test/json/genesis.json +++ b/test/json/genesis.json @@ -1,6 +1,6 @@ { - "genesis_time": "2024-05-20T00:49:11.964127Z", - "chain_id": "astria-dusk-8", + "genesis_time": "2024-07-27T00:49:11.964127Z", + "chain_id": "astria-dusk-10", "initial_height": "1", "consensus_params": { "block": { @@ -66,16 +66,30 @@ "app_state": { "native_asset_base_denomination": "nria", "fees": { - "transfer_base_fee": 12, - "sequence_base_fee": 32, - "sequence_byte_cost_multiplier": 1, - "init_bridge_account_base_fee": 48, - "bridge_lock_byte_cost_multiplier": 1, - "bridge_sudo_change_fee": 24, - "ics20_withdrawal_base_fee": 24 + "transfer_base_fee": { + "lo": 12 + }, + "sequence_base_fee": { + "lo": 32 + }, + "sequence_byte_cost_multiplier": { + "lo": 1 + }, + "init_bridge_account_base_fee": { + "lo": 48 + }, + "bridge_lock_byte_cost_multiplier": { + "lo": 1 + }, + "bridge_sudo_change_fee": { + "lo": 24 + }, + "ics20_withdrawal_base_fee": { + "lo": 24 + } }, "allowed_fee_assets": [], - "ibc_params": { + "ibc_parameters": { "ibc_enabled": true, "inbound_ics20_transfers_enabled": true, "outbound_ics20_transfers_enabled": true @@ -86,40 +100,58 @@ "accounts": [ { "address": { - "bech32m": "astria1c220qfmjrwqlk939ca5a5z2rjxryyr9m3ah8gl" + "bech32m": "astria12znlg972crgwspaw2ljsnglsvs0yk2waf7wxqw" + }, + "balance": { + "lo": 333333333333333333 + } + }, + { + "address": { + "bech32m": "astria14arwxsq84vjj0eeywah8e80lt6ehgunkn7pxf7" }, - "balance": 333333333333333333 + "balance": { + "lo": 333333333333333333 + } }, { "address": { - "bech32m": "astria16rgmx2s86kk2r69rhjnvs9y44ujfhadc7yav9a" + "bech32m": "astria1umqxfss8wua2ptcclwf7z3ly9phvsjt0hxpcjm" }, - "balance": 340282366920938463463374607431768211455 + "balance": { + "lo": 333333333333333333 + } }, { "address": { - "bech32m": "astria1475jkpuvznd44szgfz8wwdf9w6xh5dx9jwqgvz" + "bech32m": "astria1hrukdtz6xxk4x0hjrvc2wlx9wqc86s6u6tjmhy" }, - "balance": 333333333333333333 + "balance": { + "lo": 333333333333333333 + } }, { "address": { - "bech32m": "astria1lhpxecq5ffhq68dgu9s8y2g5h53jqw5cvudrkk" + "bech32m": "astria1je48an7fhxfl70nv5x4s4mphe7nszm6t0fryy7" }, - "balance": 333333333333333333 + "balance": { + "lo": 60 + } }, { "address": { - "bech32m": "astria1lm45urgugesyhaymn68xww0m6g49zreqa32w7p" + "bech32m": "astria10cgc54dxh3sdetsr03rkhhkt3vsn3r7j46yvqh" }, - "balance": 60 + "balance": { + "lo": 1000000000000 + } } ], "authority_sudo_address": { - "bech32m": "astria1e9q7egqgz8rz6aej8nr57swqgaeujhz04vd9q5" + "bech32m": "astria12znlg972crgwspaw2ljsnglsvs0yk2waf7wxqw" }, "ibc_sudo_address": { - "bech32m": "astria1y2250n7jwv9ejfuqflt53v0p7skq6hhvvrcrey" + "bech32m": "astria1x62tjjddjspjquk503ww6l2nck46vxjaz6nq4f" }, "ibc_relayer_addresses": [] }