Skip to content

Commit

Permalink
Raise error when to and --create are not present (#6175)
Browse files Browse the repository at this point in the history
Co-authored-by: Arsenii Kulikov <klkvr@klkvr-pc.local>
  • Loading branch information
klkvr and Arsenii Kulikov authored Oct 30, 2023
1 parent e03110a commit 94ae897
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/cast/bin/cmd/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ impl SendTxArgs {
None
};

if code.is_none() && to.is_none() {
eyre::bail!("Must specify a destination or contract code to deploy");
}

// Case 1:
// Default to sending via eth_sendTransaction if the --unlocked flag is passed.
// This should be the only way this RPC method is used as it requires a local node
Expand Down

0 comments on commit 94ae897

Please sign in to comment.