@@ -4,17 +4,15 @@ use std::io::{prelude::*, BufReader, Read};
44use std:: path:: PathBuf ;
55use std:: { env, process} ;
66
7- use crate :: poke:: load_session;
7+ use crate :: generate:: {
8+ self ,
9+ changes:: { Changes , TOMLEdition } ,
10+ } ;
811use crate :: integrate:: { self , DevnetOrchestrator } ;
9- use crate :: publish:: { Network , publish_contracts} ;
12+ use crate :: poke:: load_session;
13+ use crate :: publish:: { publish_contracts, Network } ;
1014use crate :: test:: run_tests;
1115use crate :: types:: { MainConfig , MainConfigFile , RequirementConfig } ;
12- use crate :: {
13- generate:: {
14- self ,
15- changes:: { Changes , TOMLEdition } ,
16- } ,
17- } ;
1816use clarity_repl:: repl;
1917
2018use clap:: Clap ;
@@ -44,7 +42,7 @@ enum Command {
4442 /// Check contracts syntax
4543 #[ clap( name = "check" ) ]
4644 Check ( Check ) ,
47- /// Publish contracts on chain
45+ /// Publish contracts on chain
4846 #[ clap( name = "publish" ) ]
4947 Publish ( Publish ) ,
5048 /// Execute Clarinet Extension
@@ -148,14 +146,26 @@ struct Run {
148146#[ derive( Clap ) ]
149147struct Publish {
150148 /// Deploy contracts on devnet, using settings/Devnet.toml
151- #[ clap( long = "devnet" , conflicts_with = "testnet" , conflicts_with = "mainnet" ) ]
149+ #[ clap(
150+ long = "devnet" ,
151+ conflicts_with = "testnet" ,
152+ conflicts_with = "mainnet"
153+ ) ]
152154 pub devnet : bool ,
153155 /// Deploy contracts on testnet, using settings/Testnet.toml
154- #[ clap( long = "testnet" , conflicts_with = "devnet" , conflicts_with = "mainnet" ) ]
156+ #[ clap(
157+ long = "testnet" ,
158+ conflicts_with = "devnet" ,
159+ conflicts_with = "mainnet"
160+ ) ]
155161 pub testnet : bool ,
156162 /// Deploy contracts on mainnet, using settings/Mainnet.toml
157- #[ clap( long = "testnet" , conflicts_with = "testnet" , conflicts_with = "devnet" ) ]
158- pub mainnet : bool ,
163+ #[ clap(
164+ long = "testnet" ,
165+ conflicts_with = "testnet" ,
166+ conflicts_with = "devnet"
167+ ) ]
168+ pub mainnet : bool ,
159169 /// Path to Clarinet.toml
160170 #[ clap( long = "manifest-path" ) ]
161171 pub manifest_path : Option < String > ,
@@ -265,8 +275,7 @@ pub fn main() {
265275 Command :: Poke ( cmd) => {
266276 let manifest_path = get_manifest_path_or_exit ( cmd. manifest_path ) ;
267277 let start_repl = true ;
268- load_session ( manifest_path, start_repl, Network :: Devnet )
269- . expect ( "Unable to start REPL" ) ;
278+ load_session ( manifest_path, start_repl, Network :: Devnet ) . expect ( "Unable to start REPL" ) ;
270279 }
271280 Command :: Check ( cmd) => {
272281 let manifest_path = get_manifest_path_or_exit ( cmd. manifest_path ) ;
@@ -321,7 +330,7 @@ pub fn main() {
321330 } ;
322331 match publish_contracts ( manifest_path, network) {
323332 Ok ( results) => println ! ( "{}" , results. join( "\n " ) ) ,
324- Err ( e) => println ! ( "{}" , e)
333+ Err ( e) => println ! ( "{}" , e) ,
325334 } ;
326335 }
327336 Command :: Integrate ( cmd) => {
@@ -330,7 +339,7 @@ pub fn main() {
330339 "Start orchestrating stacks-node, stacks-blockchain-api, bitcoind, bitcoin explorer, stacks-explorer"
331340 ) ;
332341 let devnet = DevnetOrchestrator :: new ( manifest_path) ;
333- integrate:: run_devnet ( devnet) ;
342+ integrate:: run_devnet ( devnet) ;
334343 }
335344 } ;
336345}
0 commit comments