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

Bolt-cli: Add dry-run flag for developmental/testing #756

Merged

Conversation

0ex-d
Copy link
Contributor

@0ex-d 0ex-d commented Jan 31, 2025

Improvements:

  • Add -d, --dry-run flag for bolt-cli: When provided commands will "simulate" actual behavior, for instance when making RPC calls or executing smart contracts without broadcasting on net.
  • Spin Anvil instance for use cases like testing (we can get rid of explicit declaration in test):
    async fn test_register_validators() {
    let _ = tracing_subscriber::fmt::try_init();
    let rpc_url = "https://holesky.drpc.org";
    let anvil = Anvil::default().fork(rpc_url).spawn();
    let anvil_url = Url::parse(&anvil.endpoint()).expect("valid URL");
    let provider = ProviderBuilder::new().on_http(anvil_url.clone());

Closes #416

@0ex-d
Copy link
Contributor Author

0ex-d commented Feb 10, 2025

Hi @merklefruit, just checking in on this PR. Let me know if any changes are needed. Looking forward to your feedback. Thanks!

Copy link
Collaborator

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work here! Really sorry about the delay. Thanks a lot for the contribution!

I left a couple nits :)

@0ex-d 0ex-d requested a review from merklefruit February 11, 2025 19:59
Copy link
Collaborator

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@merklefruit merklefruit merged commit 793f1b3 into chainbound:unstable Feb 12, 2025
3 checks passed
@0ex-d 0ex-d deleted the feat/bolt-cli-add-dry-run-flag-1 branch February 12, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(cli): add --dry-run flag for important commands
2 participants