Skip to content

Commit

Permalink
Better error handling for missing testing network in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Oct 6, 2023
1 parent d889d8c commit f0c78cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ func testCode(
contracts := make(map[string]common.Address, 0)
for _, contract := range *state.Contracts() {
alias := contract.Aliases.ByNetwork("testing")
if alias == nil {
return nil, fmt.Errorf(
"unable to find 'testing' alias for contract: %s", contract.Name,
)
}
contracts[contract.Name] = common.Address(alias.Address)
}

Expand Down

0 comments on commit f0c78cb

Please sign in to comment.