synapsecns/sanguine

View on GitHub
agents/domains/evm/evm.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function NewEVM has 52 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func NewEVM(ctx context.Context, name string, domain config.DomainConfig, chainRPCURL string) (domains.DomainClient, error) {
    underlyingClient, err := chain.NewFromURL(ctx, chainRPCURL)
    if err != nil {
        return nil, fmt.Errorf("could not get evm: %w", err)
    }
Severity: Minor
Found in agents/domains/evm/evm.go - About 1 hr to fix

    Function NewEVM has 9 return statements (exceeds 4 allowed).
    Open

    func NewEVM(ctx context.Context, name string, domain config.DomainConfig, chainRPCURL string) (domains.DomainClient, error) {
        underlyingClient, err := chain.NewFromURL(ctx, chainRPCURL)
        if err != nil {
            return nil, fmt.Errorf("could not get evm: %w", err)
        }
    Severity: Major
    Found in agents/domains/evm/evm.go - About 55 mins to fix

      There are no issues that match your filters.

      Category
      Status