Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapping deployin try catch and logging #1608

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Changes from all commits
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
18 changes: 16 additions & 2 deletions scripts/local_fuzz_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from agent0.ethpy.base.errors import ContractCallException, UnknownBlockError
from agent0.hyperfuzz import FuzzAssertionException
from agent0.hyperfuzz.system_fuzz import generate_fuzz_hyperdrive_config, run_fuzz_bots
from agent0.hyperlogs.rollbar_utilities import initialize_rollbar
from agent0.hyperlogs.rollbar_utilities import initialize_rollbar, log_rollbar_exception


def _fuzz_ignore_errors(exc: Exception) -> bool:
Expand Down Expand Up @@ -178,7 +178,21 @@ def main(argv: Sequence[str] | None = None) -> None:
hyperdrive_config = generate_fuzz_hyperdrive_config(
rng, lp_share_price_test=parsed_args.lp_share_price_test, steth=parsed_args.steth
)
hyperdrive_pool = LocalHyperdrive(chain, hyperdrive_config)

try:
hyperdrive_pool = LocalHyperdrive(chain, hyperdrive_config)
except Exception as e: # pylint: disable=broad-except
logging.error(
"Error deploying hyperdrive: %s",
repr(e),
)
log_rollbar_exception(
e,
log_level=logging.ERROR,
rollbar_log_prefix="Error deploying hyperdrive poolError deploying hyperdrive pool",
)
chain.cleanup()
continue

raise_error_on_fail = False
if parsed_args.pause_on_invariance_fail:
Expand Down
Loading