File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,12 @@ pub struct ScriptArgs {
175175 #[ clap( long) ]
176176 pub slow : bool ,
177177
178+ /// Disables interactive prompts that might appear when deploying big contracts.
179+ ///
180+ /// For more info on the contract size limit, see EIP-170: <https://eips.ethereum.org/EIPS/eip-170>
181+ #[ clap( long) ]
182+ pub non_interactive : bool ,
183+
178184 /// The Etherscan (or equivalent) API key
179185 #[ clap( long, env = "ETHERSCAN_API_KEY" , value_name = "KEY" ) ]
180186 pub etherscan_api_key : Option < String > ,
@@ -624,7 +630,9 @@ impl ScriptArgs {
624630 }
625631 }
626632
633+ // Only prompt if we're broadcasting and we've not disabled interactivity.
627634 if prompt_user &&
635+ !self . non_interactive &&
628636 !Confirm :: new ( ) . with_prompt ( "Do you wish to continue?" . to_string ( ) ) . interact ( ) ?
629637 {
630638 eyre:: bail!( "User canceled the script." ) ;
You can’t perform that action at this time.
0 commit comments