Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions engine/cld/legacy/cli/mcmsv2/mcms_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion experimental/analyzer/evm_analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down