Commit ec8fa36b authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

op-chain-ops: better error message (#3645)

Improve the error message on failed deployments.
This will make it much easier to debug issues with config.
The name of the deployment will not be returned as part of the
error, along with the error message itself. This error
is likely due to a revert in the constructor or an out of gas
during deployment.
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 89f1abfa
...@@ -113,7 +113,7 @@ func Deploy(backend *backends.SimulatedBackend, constructors []Constructor, cb D ...@@ -113,7 +113,7 @@ func Deploy(backend *backends.SimulatedBackend, constructors []Constructor, cb D
backend.Commit() backend.Commit()
addr, err := bind.WaitDeployed(ctx, backend, tx) addr, err := bind.WaitDeployed(ctx, backend, tx)
if err != nil { if err != nil {
return nil, err return nil, fmt.Errorf("%s: %w", deployment.Name, err)
} }
if addr == (common.Address{}) { if addr == (common.Address{}) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment