synapsecns/sanguine

View on GitHub
services/scribe/db/mocks/event_db.go

Summary

Maintainability
F
1 wk
Test Coverage

EventDB has 36 methods (exceeds 20 allowed). Consider refactoring.
Open

type EventDB struct {
    mock.Mock
}
Severity: Minor
Found in services/scribe/db/mocks/event_db.go - About 4 hrs to fix

    File event_db.go has 539 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    // Code generated by mockery v2.14.0. DO NOT EDIT.
    
    package mocks
    
    import (
    Severity: Minor
    Found in services/scribe/db/mocks/event_db.go - About 2 hrs to fix

      Method EventDB.StoreEthTx has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (_m *EventDB) StoreEthTx(ctx context.Context, tx *types.Transaction, chainID uint32, blockHash common.Hash, blockNumber uint64, transactionIndex uint64) error {
      Severity: Minor
      Found in services/scribe/db/mocks/event_db.go - About 45 mins to fix

        Method EventDB.RetrieveUnconfirmedEthTxsFromHeadRangeQuery has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func (_m *EventDB) RetrieveUnconfirmedEthTxsFromHeadRangeQuery(ctx context.Context, receiptFilter db.EthTxFilter, startBlock uint64, endBlock uint64, lastIndexed uint64, page int) ([]db.TxWithBlockNumber, error) {
        Severity: Minor
        Found in services/scribe/db/mocks/event_db.go - About 45 mins to fix

          Method EventDB.StoreEthTxAtHead has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          func (_m *EventDB) StoreEthTxAtHead(ctx context.Context, tx *types.Transaction, chainID uint32, blockHash common.Hash, blockNumber uint64, transactionIndex uint64) error {
          Severity: Minor
          Found in services/scribe/db/mocks/event_db.go - About 45 mins to fix

            Method EventDB.RetrieveReceiptsFromHeadRangeQuery has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func (_m *EventDB) RetrieveReceiptsFromHeadRangeQuery(ctx context.Context, receiptFilter db.ReceiptFilter, startBlock uint64, endBlock uint64, page int) ([]types.Receipt, error) {
            Severity: Minor
            Found in services/scribe/db/mocks/event_db.go - About 35 mins to fix

              Method EventDB.RetrieveLogsFromHeadRangeQuery has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              func (_m *EventDB) RetrieveLogsFromHeadRangeQuery(ctx context.Context, logFilter db.LogFilter, startBlock uint64, endBlock uint64, page int) ([]*types.Log, error) {
              Severity: Minor
              Found in services/scribe/db/mocks/event_db.go - About 35 mins to fix

                Method EventDB.RetrieveLogsInRangeAsc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                func (_m *EventDB) RetrieveLogsInRangeAsc(ctx context.Context, logFilter db.LogFilter, startBlock uint64, endBlock uint64, page int) ([]*types.Log, error) {
                Severity: Minor
                Found in services/scribe/db/mocks/event_db.go - About 35 mins to fix

                  Method EventDB.RetrieveEthTxsInRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  func (_m *EventDB) RetrieveEthTxsInRange(ctx context.Context, ethTxFilter db.EthTxFilter, startBlock uint64, endBlock uint64, page int) ([]db.TxWithBlockNumber, error) {
                  Severity: Minor
                  Found in services/scribe/db/mocks/event_db.go - About 35 mins to fix

                    Method EventDB.StoreLastIndexed has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    func (_m *EventDB) StoreLastIndexed(ctx context.Context, contractAddress common.Address, chainID uint32, blockNumber uint64, livefillAtHead bool) error {
                    Severity: Minor
                    Found in services/scribe/db/mocks/event_db.go - About 35 mins to fix

                      Method EventDB.RetrieveReceiptsWithStaleBlockHash has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      func (_m *EventDB) RetrieveReceiptsWithStaleBlockHash(ctx context.Context, chainID uint32, blockHashes []string, startBlock uint64, endBlock uint64) ([]types.Receipt, error) {
                      Severity: Minor
                      Found in services/scribe/db/mocks/event_db.go - About 35 mins to fix

                        Method EventDB.RetrieveLogsInRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        func (_m *EventDB) RetrieveLogsInRange(ctx context.Context, logFilter db.LogFilter, startBlock uint64, endBlock uint64, page int) ([]*types.Log, error) {
                        Severity: Minor
                        Found in services/scribe/db/mocks/event_db.go - About 35 mins to fix

                          Method EventDB.RetrieveReceiptsInRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func (_m *EventDB) RetrieveReceiptsInRange(ctx context.Context, receiptFilter db.ReceiptFilter, startBlock uint64, endBlock uint64, page int) ([]types.Receipt, error) {
                          Severity: Minor
                          Found in services/scribe/db/mocks/event_db.go - About 35 mins to fix

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveLogsFromHeadRangeQuery(ctx context.Context, logFilter db.LogFilter, startBlock uint64, endBlock uint64, page int) ([]*types.Log, error) {
                                ret := _m.Called(ctx, logFilter, startBlock, endBlock, page)
                            
                                var r0 []*types.Log
                                if rf, ok := ret.Get(0).(func(context.Context, db.LogFilter, uint64, uint64, int) []*types.Log); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 346..366
                            services/scribe/db/mocks/event_db.go on lines 369..389

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 332.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveLogsInRange(ctx context.Context, logFilter db.LogFilter, startBlock uint64, endBlock uint64, page int) ([]*types.Log, error) {
                                ret := _m.Called(ctx, logFilter, startBlock, endBlock, page)
                            
                                var r0 []*types.Log
                                if rf, ok := ret.Get(0).(func(context.Context, db.LogFilter, uint64, uint64, int) []*types.Log); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 323..343
                            services/scribe/db/mocks/event_db.go on lines 369..389

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 332.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveLogsInRangeAsc(ctx context.Context, logFilter db.LogFilter, startBlock uint64, endBlock uint64, page int) ([]*types.Log, error) {
                                ret := _m.Called(ctx, logFilter, startBlock, endBlock, page)
                            
                                var r0 []*types.Log
                                if rf, ok := ret.Get(0).(func(context.Context, db.LogFilter, uint64, uint64, int) []*types.Log); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 323..343
                            services/scribe/db/mocks/event_db.go on lines 346..366

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 332.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveReceiptsFromHeadRangeQuery(ctx context.Context, receiptFilter db.ReceiptFilter, startBlock uint64, endBlock uint64, page int) ([]types.Receipt, error) {
                                ret := _m.Called(ctx, receiptFilter, startBlock, endBlock, page)
                            
                                var r0 []types.Receipt
                                if rf, ok := ret.Get(0).(func(context.Context, db.ReceiptFilter, uint64, uint64, int) []types.Receipt); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 149..169
                            services/scribe/db/mocks/event_db.go on lines 459..479

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 324.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveReceiptsInRange(ctx context.Context, receiptFilter db.ReceiptFilter, startBlock uint64, endBlock uint64, page int) ([]types.Receipt, error) {
                                ret := _m.Called(ctx, receiptFilter, startBlock, endBlock, page)
                            
                                var r0 []types.Receipt
                                if rf, ok := ret.Get(0).(func(context.Context, db.ReceiptFilter, uint64, uint64, int) []types.Receipt); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 149..169
                            services/scribe/db/mocks/event_db.go on lines 436..456

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 324.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveEthTxsInRange(ctx context.Context, ethTxFilter db.EthTxFilter, startBlock uint64, endBlock uint64, page int) ([]db.TxWithBlockNumber, error) {
                                ret := _m.Called(ctx, ethTxFilter, startBlock, endBlock, page)
                            
                                var r0 []db.TxWithBlockNumber
                                if rf, ok := ret.Get(0).(func(context.Context, db.EthTxFilter, uint64, uint64, int) []db.TxWithBlockNumber); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 436..456
                            services/scribe/db/mocks/event_db.go on lines 459..479

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 324.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveEthTxsWithFilter(ctx context.Context, ethTxFilter db.EthTxFilter, page int) ([]db.TxWithBlockNumber, error) {
                                ret := _m.Called(ctx, ethTxFilter, page)
                            
                                var r0 []db.TxWithBlockNumber
                                if rf, ok := ret.Get(0).(func(context.Context, db.EthTxFilter, int) []db.TxWithBlockNumber); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 1 other location - About 3 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 482..502

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 296.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveReceiptsWithFilter(ctx context.Context, receiptFilter db.ReceiptFilter, page int) ([]types.Receipt, error) {
                                ret := _m.Called(ctx, receiptFilter, page)
                            
                                var r0 []types.Receipt
                                if rf, ok := ret.Get(0).(func(context.Context, db.ReceiptFilter, int) []types.Receipt); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 1 other location - About 3 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 172..192

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 296.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) StoreLogsAtHead(ctx context.Context, chainID uint32, log ...types.Log) error {
                                _va := make([]interface{}, len(log))
                                for _i := range log {
                                    _va[_i] = log[_i]
                                }
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 1 other location - About 2 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 635..653

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 234.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) StoreLogs(ctx context.Context, chainID uint32, log ...types.Log) error {
                                _va := make([]interface{}, len(log))
                                for _i := range log {
                                    _va[_i] = log[_i]
                                }
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 1 other location - About 2 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 656..674

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 234.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 7 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveLastConfirmedBlock(ctx context.Context, chainID uint32) (uint64, error) {
                                ret := _m.Called(ctx, chainID)
                            
                                var r0 uint64
                                if rf, ok := ret.Get(0).(func(context.Context, uint32) uint64); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 6 other locations - About 2 hrs to fix
                            services/rfq/relayer/pricer/mocks/coingecko_price_fetcher.go on lines 17..35
                            services/rfq/relayer/quoter/mocks/quoter.go on lines 19..37
                            services/scribe/db/mocks/event_db.go on lines 128..146
                            services/scribe/db/mocks/event_db.go on lines 195..213
                            services/scribe/db/mocks/event_db.go on lines 216..234
                            services/scribe/db/mocks/event_db.go on lines 415..433

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 228.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 7 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveBlockTimesCountForChain(ctx context.Context, chainID uint32) (int64, error) {
                                ret := _m.Called(ctx, chainID)
                            
                                var r0 int64
                                if rf, ok := ret.Get(0).(func(context.Context, uint32) int64); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 6 other locations - About 2 hrs to fix
                            services/rfq/relayer/pricer/mocks/coingecko_price_fetcher.go on lines 17..35
                            services/rfq/relayer/quoter/mocks/quoter.go on lines 19..37
                            services/scribe/db/mocks/event_db.go on lines 195..213
                            services/scribe/db/mocks/event_db.go on lines 216..234
                            services/scribe/db/mocks/event_db.go on lines 237..255
                            services/scribe/db/mocks/event_db.go on lines 415..433

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 228.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 7 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveFirstBlockStored(ctx context.Context, chainID uint32) (uint64, error) {
                                ret := _m.Called(ctx, chainID)
                            
                                var r0 uint64
                                if rf, ok := ret.Get(0).(func(context.Context, uint32) uint64); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 6 other locations - About 2 hrs to fix
                            services/rfq/relayer/pricer/mocks/coingecko_price_fetcher.go on lines 17..35
                            services/rfq/relayer/quoter/mocks/quoter.go on lines 19..37
                            services/scribe/db/mocks/event_db.go on lines 128..146
                            services/scribe/db/mocks/event_db.go on lines 216..234
                            services/scribe/db/mocks/event_db.go on lines 237..255
                            services/scribe/db/mocks/event_db.go on lines 415..433

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 228.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 7 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveLastBlockStored(ctx context.Context, chainID uint32) (uint64, error) {
                                ret := _m.Called(ctx, chainID)
                            
                                var r0 uint64
                                if rf, ok := ret.Get(0).(func(context.Context, uint32) uint64); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 6 other locations - About 2 hrs to fix
                            services/rfq/relayer/pricer/mocks/coingecko_price_fetcher.go on lines 17..35
                            services/rfq/relayer/quoter/mocks/quoter.go on lines 19..37
                            services/scribe/db/mocks/event_db.go on lines 128..146
                            services/scribe/db/mocks/event_db.go on lines 195..213
                            services/scribe/db/mocks/event_db.go on lines 237..255
                            services/scribe/db/mocks/event_db.go on lines 415..433

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 228.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 7 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) RetrieveReceiptCountForChain(ctx context.Context, chainID uint32) (int64, error) {
                                ret := _m.Called(ctx, chainID)
                            
                                var r0 int64
                                if rf, ok := ret.Get(0).(func(context.Context, uint32) int64); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 6 other locations - About 2 hrs to fix
                            services/rfq/relayer/pricer/mocks/coingecko_price_fetcher.go on lines 17..35
                            services/rfq/relayer/quoter/mocks/quoter.go on lines 19..37
                            services/scribe/db/mocks/event_db.go on lines 128..146
                            services/scribe/db/mocks/event_db.go on lines 195..213
                            services/scribe/db/mocks/event_db.go on lines 216..234
                            services/scribe/db/mocks/event_db.go on lines 237..255

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 228.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) StoreEthTxAtHead(ctx context.Context, tx *types.Transaction, chainID uint32, blockHash common.Hash, blockNumber uint64, transactionIndex uint64) error {
                                ret := _m.Called(ctx, tx, chainID, blockHash, blockNumber, transactionIndex)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, *types.Transaction, uint32, common.Hash, uint64, uint64) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 1 other location - About 2 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 565..576

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 201.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 2 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) StoreEthTx(ctx context.Context, tx *types.Transaction, chainID uint32, blockHash common.Hash, blockNumber uint64, transactionIndex uint64) error {
                                ret := _m.Called(ctx, tx, chainID, blockHash, blockNumber, transactionIndex)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, *types.Transaction, uint32, common.Hash, uint64, uint64) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 1 other location - About 2 hrs to fix
                            services/scribe/db/mocks/event_db.go on lines 579..590

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 201.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) StoreReceipt(ctx context.Context, chainID uint32, receipt types.Receipt) error {
                                ret := _m.Called(ctx, chainID, receipt)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, uint32, types.Receipt) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 3 other locations - About 1 hr to fix
                            services/scribe/db/mocks/event_db.go on lines 37..48
                            services/scribe/db/mocks/event_db.go on lines 79..90
                            services/scribe/db/mocks/event_db.go on lines 691..702

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 159.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) DeleteReceiptsForBlockHash(ctx context.Context, chainID uint32, blockHash common.Hash) error {
                                ret := _m.Called(ctx, chainID, blockHash)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, uint32, common.Hash) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 3 other locations - About 1 hr to fix
                            services/scribe/db/mocks/event_db.go on lines 37..48
                            services/scribe/db/mocks/event_db.go on lines 677..688
                            services/scribe/db/mocks/event_db.go on lines 691..702

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 159.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) ConfirmEthTxsForBlockHash(ctx context.Context, blockHash common.Hash, chainID uint32) error {
                                ret := _m.Called(ctx, blockHash, chainID)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, common.Hash, uint32) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 1 hr to fix
                            services/scribe/db/mocks/event_db.go on lines 51..62
                            services/scribe/db/mocks/event_db.go on lines 65..76

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 159.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) DeleteEthTxsForBlockHash(ctx context.Context, blockHash common.Hash, chainID uint32) error {
                                ret := _m.Called(ctx, blockHash, chainID)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, common.Hash, uint32) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 1 hr to fix
                            services/scribe/db/mocks/event_db.go on lines 23..34
                            services/scribe/db/mocks/event_db.go on lines 65..76

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 159.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) ConfirmLogsForBlockHash(ctx context.Context, chainID uint32, blockHash common.Hash) error {
                                ret := _m.Called(ctx, chainID, blockHash)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, uint32, common.Hash) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 3 other locations - About 1 hr to fix
                            services/scribe/db/mocks/event_db.go on lines 79..90
                            services/scribe/db/mocks/event_db.go on lines 677..688
                            services/scribe/db/mocks/event_db.go on lines 691..702

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 159.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) StoreReceiptAtHead(ctx context.Context, chainID uint32, receipt types.Receipt) error {
                                ret := _m.Called(ctx, chainID, receipt)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, uint32, types.Receipt) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 3 other locations - About 1 hr to fix
                            services/scribe/db/mocks/event_db.go on lines 37..48
                            services/scribe/db/mocks/event_db.go on lines 79..90
                            services/scribe/db/mocks/event_db.go on lines 677..688

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 159.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 3 locations. Consider refactoring.
                            Open

                            func (_m *EventDB) DeleteLogsForBlockHash(ctx context.Context, blockHash common.Hash, chainID uint32) error {
                                ret := _m.Called(ctx, blockHash, chainID)
                            
                                var r0 error
                                if rf, ok := ret.Get(0).(func(context.Context, common.Hash, uint32) error); ok {
                            Severity: Major
                            Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 1 hr to fix
                            services/scribe/db/mocks/event_db.go on lines 23..34
                            services/scribe/db/mocks/event_db.go on lines 51..62

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 159.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            There are no issues that match your filters.

                            Category
                            Status