From f6c0bd0ee1bb2efea228b33fc4c2fe55e3c4e464 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Mon, 3 Oct 2022 18:19:42 -0700 Subject: [PATCH] op-chain-ops: better error message 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. --- op-chain-ops/deployer/deployer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-chain-ops/deployer/deployer.go b/op-chain-ops/deployer/deployer.go index c2f0056ef7ac5..04efe2bbce147 100644 --- a/op-chain-ops/deployer/deployer.go +++ b/op-chain-ops/deployer/deployer.go @@ -113,7 +113,7 @@ func Deploy(backend *backends.SimulatedBackend, constructors []Constructor, cb D backend.Commit() addr, err := bind.WaitDeployed(ctx, backend, tx) if err != nil { - return nil, err + return nil, fmt.Errorf("%s: %w", deployment.Name, err) } if addr == (common.Address{}) {