Skip to content

Commit

Permalink
handle verification bundle failure gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Oct 1, 2024
1 parent 2fe6980 commit e57f65c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion boa/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,18 @@ def deploy(

if (deployments_db := get_deployments_db()) is not None:
contract_name = getattr(contract, "contract_name", None)
source_bundle = get_verification_bundle(contract)
try:
source_bundle = get_verification_bundle(contract)
except Exception as e:
# there was a problem constructing the verification bundle.
# assume the user cares more about continuing, than getting
# the bundle into the db
msg = "While saving deployment data, couldn't construct"
msg += f" verification bundle for {contract_name}! Full stack"
msg += f" trace:\n```\n{e}\n```\nContinuing.\n"
warnings.warn(msg, stacklevel=2)
source_bundle = None

deployment_data = Deployment(
create_address,
contract_name,
Expand Down

0 comments on commit e57f65c

Please sign in to comment.