synapsecns/sanguine

View on GitHub
services/rfq/relayer/chain/chain.go

Summary

Maintainability
A
1 hr
Test Coverage

Function NewChain has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

func NewChain(ctx context.Context, cfg relconfig.Config, chainClient client.EVM, chainListener listener.ContractListener, ts submitter.TransactionSubmitter) (*Chain, error) {
Severity: Minor
Found in services/rfq/relayer/chain/chain.go - About 35 mins to fix

    Method Chain.SubmitRelay has 5 return statements (exceeds 4 allowed).
    Open

    func (c Chain) SubmitRelay(ctx context.Context, request reldb.QuoteRequest) (uint64, *big.Int, error) {
        gasAmount := big.NewInt(0)
        var err error
    
        // Check to see if ETH should be sent to destination
    Severity: Major
    Found in services/rfq/relayer/chain/chain.go - About 35 mins to fix

      Function NewChain has 5 return statements (exceeds 4 allowed).
      Open

      func NewChain(ctx context.Context, cfg relconfig.Config, chainClient client.EVM, chainListener listener.ContractListener, ts submitter.TransactionSubmitter) (*Chain, error) {
          chainID, err := chainClient.ChainID(ctx)
          if err != nil {
              return nil, fmt.Errorf("could not get chain id: %w", err)
          }
      Severity: Major
      Found in services/rfq/relayer/chain/chain.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status