@@ -113,6 +113,7 @@ impl<'de, N: Network> Deserialize<'de> for DeployResponse<N> {
113113impl < N : Network > Package < N > {
114114 pub fn deploy < A : crate :: circuit:: Aleo < Network = N , BaseField = N :: Field > > (
115115 & self ,
116+ process : & Process < N > ,
116117 endpoint : Option < String > ,
117118 ) -> Result < Deployment < N > > {
118119 // Retrieve the main program.
@@ -122,9 +123,6 @@ impl<N: Network> Package<N> {
122123
123124 dev_println ! ( "⏳ Deploying '{}'...\n " , program_id. to_string( ) ) ;
124125
125- // Get the process.
126- let process = self . get_process ( ) ?;
127-
128126 // Initialize the RNG.
129127 let rng = & mut rand:: thread_rng ( ) ;
130128 // Compute the deployment.
@@ -158,8 +156,11 @@ mod tests {
158156 // Samples a new package at a temporary directory.
159157 let ( directory, package) = crate :: package:: test_helpers:: sample_token_package ( ) ;
160158
159+ // Generate the process with the appropriate imports.
160+ let process = package. get_process ( ) . unwrap ( ) ;
161+
161162 // Deploy the package.
162- let deployment = package. deploy :: < CurrentAleo > ( None ) . unwrap ( ) ;
163+ let deployment = package. deploy :: < CurrentAleo > ( & process , None ) . unwrap ( ) ;
163164
164165 // Ensure the deployment edition matches.
165166 assert_eq ! ( 0 , deployment. edition( ) ) ;
@@ -177,8 +178,11 @@ mod tests {
177178 // Samples a new package at a temporary directory.
178179 let ( directory, package) = crate :: package:: test_helpers:: sample_wallet_package ( ) ;
179180
181+ // Generate the process with the appropriate imports.
182+ let process = package. get_process ( ) . unwrap ( ) ;
183+
180184 // Deploy the package.
181- let deployment = package. deploy :: < CurrentAleo > ( None ) . unwrap ( ) ;
185+ let deployment = package. deploy :: < CurrentAleo > ( & process , None ) . unwrap ( ) ;
182186
183187 // Ensure the deployment edition matches.
184188 assert_eq ! ( 0 , deployment. edition( ) ) ;
0 commit comments