diff --git a/engine/cld/legacy/cli/mcmsv2/mcms_v2.go b/engine/cld/legacy/cli/mcmsv2/mcms_v2.go index 7afd0bba..f9c33b72 100644 --- a/engine/cld/legacy/cli/mcmsv2/mcms_v2.go +++ b/engine/cld/legacy/cli/mcmsv2/mcms_v2.go @@ -833,6 +833,9 @@ func buildMCMSv2AnalyzeProposalCmd( }, RunE: func(cmd *cobra.Command, args []string) error { // Create config + if proposalCtxProvider == nil { + return errors.New("proposalCtxProvider is required, please provide one in the domain cli constructor") + } cfgv2, err := newCfgv2(lggr, cmd, domain, proposalCtxProvider, acceptExpiredProposal) if err != nil { return fmt.Errorf("error creating config: %w", err) @@ -1175,6 +1178,9 @@ func newCfgv2(lggr logger.Logger, cmd *cobra.Command, domain cldf_domain.Domain, if err != nil { return nil, fmt.Errorf("failed to provide proposal analysis context: %w", err) } + if cfg.proposalCtx == nil { + return nil, errors.New("proposal analysis context provider returned nil context, make sure the ProposalContextProvider is correctly initialized in your domain CLI on BuildMCMSv2Cmd()") + } } if flags.fork { diff --git a/experimental/analyzer/evm_analyzer.go b/experimental/analyzer/evm_analyzer.go index 59a63492..87392b44 100644 --- a/experimental/analyzer/evm_analyzer.go +++ b/experimental/analyzer/evm_analyzer.go @@ -55,7 +55,7 @@ func AnalyzeEVMTransaction( evmRegistry := proposalCtx.GetEVMRegistry() if evmRegistry == nil { - return nil, nil, "", errors.New("EVM registry is not available") + return nil, nil, "", errors.New("EVM registry is not available. Ensure you have provided one in the ProposalContextProvider via the WithEVMABIMappings() option") } abi, abiStr, err := evmRegistry.GetABIByAddress(chainSelector, mcmsTx.To) if err != nil {