@@ -77,54 +77,88 @@ impl ConfigurableArtifacts {
7777
7878    /// Returns the `Settings` this configuration corresponds to 
7979     pub  fn  solc_settings ( & self )  -> Settings  { 
80-         SolcConfig :: builder ( ) . additional_outputs ( self . output_selection ( ) ) . build ( ) . into ( ) 
80+         SolcConfig :: builder ( ) 
81+             . additional_outputs ( self . output_selection ( ) ) 
82+             . ast ( self . additional_values . ast ) 
83+             . build ( ) 
8184    } 
8285
8386    /// Returns the output selection corresponding to this configuration 
8487     pub  fn  output_selection ( & self )  -> Vec < ContractOutputSelection >  { 
8588        let  mut  selection = ContractOutputSelection :: basic ( ) ; 
8689
87-         if  self . additional_values . ir  || self . additional_files . ir  { 
90+         let  ExtraOutputValues  { 
91+             // handled above 
92+             ast :  _, 
93+             userdoc, 
94+             devdoc, 
95+             method_identifiers, 
96+             storage_layout, 
97+             transient_storage_layout, 
98+             assembly, 
99+             gas_estimates, 
100+             metadata, 
101+             ir, 
102+             ir_optimized, 
103+             ir_optimized_ast, 
104+             ewasm, 
105+             function_debug_data, 
106+             generated_sources, 
107+             source_map, 
108+             opcodes, 
109+             __non_exhaustive, 
110+         }  = self . additional_values ; 
111+ 
112+         if  ir || self . additional_files . ir  { 
88113            selection. push ( ContractOutputSelection :: Ir ) ; 
89114        } 
90-         if  self . additional_values . ir_optimized  || self . additional_files . ir_optimized  { 
115+         if  ir_optimized || self . additional_files . ir_optimized  { 
91116            selection. push ( ContractOutputSelection :: IrOptimized ) ; 
92117        } 
93-         if  self . additional_values . metadata  || self . additional_files . metadata  { 
118+         if  metadata || self . additional_files . metadata  { 
94119            selection. push ( ContractOutputSelection :: Metadata ) ; 
95120        } 
96-         if  self . additional_values . storage_layout  { 
121+         if  storage_layout { 
97122            selection. push ( ContractOutputSelection :: StorageLayout ) ; 
98123        } 
99-         if  self . additional_values . devdoc  { 
124+         if  devdoc { 
100125            selection. push ( ContractOutputSelection :: DevDoc ) ; 
101126        } 
102-         if  self . additional_values . userdoc  { 
127+         if  userdoc { 
103128            selection. push ( ContractOutputSelection :: UserDoc ) ; 
104129        } 
105-         if  self . additional_values . gas_estimates  { 
130+         if  gas_estimates { 
106131            selection. push ( EvmOutputSelection :: GasEstimates . into ( ) ) ; 
107132        } 
108-         if  self . additional_values . assembly  || self . additional_files . assembly  { 
133+         if  assembly || self . additional_files . assembly  { 
109134            selection. push ( EvmOutputSelection :: Assembly . into ( ) ) ; 
110135        } 
111-         if  self . additional_values . ewasm  || self . additional_files . ewasm  { 
136+         if  ewasm || self . additional_files . ewasm  { 
112137            selection. push ( EwasmOutputSelection :: All . into ( ) ) ; 
113138        } 
114-         if  self . additional_values . function_debug_data  { 
139+         if  function_debug_data { 
115140            selection. push ( BytecodeOutputSelection :: FunctionDebugData . into ( ) ) ; 
116141        } 
117-         if  self . additional_values . method_identifiers  { 
142+         if  method_identifiers { 
118143            selection. push ( EvmOutputSelection :: MethodIdentifiers . into ( ) ) ; 
119144        } 
120-         if  self . additional_values . generated_sources  { 
145+         if  generated_sources { 
121146            selection. push ( 
122147                EvmOutputSelection :: ByteCode ( BytecodeOutputSelection :: GeneratedSources ) . into ( ) , 
123148            ) ; 
124149        } 
125-         if  self . additional_values . source_map  { 
150+         if  source_map { 
126151            selection. push ( EvmOutputSelection :: ByteCode ( BytecodeOutputSelection :: SourceMap ) . into ( ) ) ; 
127152        } 
153+         if  ir_optimized_ast { 
154+             selection. push ( ContractOutputSelection :: IrOptimizedAst ) ; 
155+         } 
156+         if  opcodes { 
157+             selection. push ( EvmOutputSelection :: ByteCode ( BytecodeOutputSelection :: Opcodes ) . into ( ) ) ; 
158+         } 
159+         if  transient_storage_layout { 
160+             selection. push ( ContractOutputSelection :: TransientStorageLayout ) ; 
161+         } 
128162        selection
129163    } 
130164} 
@@ -165,6 +199,7 @@ impl ArtifactOutput for ConfigurableArtifacts {
165199        let  mut  artifact_metadata = None ; 
166200        let  mut  artifact_ir = None ; 
167201        let  mut  artifact_ir_optimized = None ; 
202+         let  mut  artifact_ir_optimized_ast = None ; 
168203        let  mut  artifact_ewasm = None ; 
169204        let  mut  artifact_bytecode = None ; 
170205        let  mut  artifact_deployed_bytecode = None ; 
@@ -173,6 +208,7 @@ impl ArtifactOutput for ConfigurableArtifacts {
173208        let  mut  artifact_method_identifiers = None ; 
174209        let  mut  artifact_assembly = None ; 
175210        let  mut  artifact_storage_layout = None ; 
211+         let  mut  artifact_transient_storage_layout = None ; 
176212        let  mut  generated_sources = None ; 
177213        let  mut  opcodes = None ; 
178214
@@ -183,9 +219,11 @@ impl ArtifactOutput for ConfigurableArtifacts {
183219            devdoc, 
184220            ir, 
185221            storage_layout, 
222+             transient_storage_layout, 
186223            evm, 
187224            ewasm, 
188225            ir_optimized, 
226+             ir_optimized_ast, 
189227        }  = contract; 
190228
191229        if  self . additional_values . metadata  { 
@@ -209,9 +247,15 @@ impl ArtifactOutput for ConfigurableArtifacts {
209247        if  self . additional_values . ir_optimized  { 
210248            artifact_ir_optimized = ir_optimized; 
211249        } 
250+         if  self . additional_values . ir_optimized_ast  { 
251+             artifact_ir_optimized_ast = ir_optimized_ast; 
252+         } 
212253        if  self . additional_values . storage_layout  { 
213254            artifact_storage_layout = Some ( storage_layout) ; 
214255        } 
256+         if  self . additional_values . transient_storage_layout  { 
257+             artifact_transient_storage_layout = Some ( transient_storage_layout) ; 
258+         } 
215259
216260        if  let  Some ( evm)  = evm { 
217261            let  Evm  { 
@@ -260,10 +304,12 @@ impl ArtifactOutput for ConfigurableArtifacts {
260304            raw_metadata :  artifact_raw_metadata, 
261305            metadata :  artifact_metadata, 
262306            storage_layout :  artifact_storage_layout, 
307+             transient_storage_layout :  artifact_transient_storage_layout, 
263308            userdoc :  artifact_userdoc, 
264309            devdoc :  artifact_devdoc, 
265310            ir :  artifact_ir, 
266311            ir_optimized :  artifact_ir_optimized, 
312+             ir_optimized_ast :  artifact_ir_optimized_ast, 
267313            ewasm :  artifact_ewasm, 
268314            id :  source_file. as_ref ( ) . map ( |s| s. id ) , 
269315            ast :  source_file. and_then ( |s| s. ast . clone ( ) ) , 
@@ -376,12 +422,13 @@ pub struct ExtraOutputValues {
376422    pub  devdoc :  bool , 
377423    pub  method_identifiers :  bool , 
378424    pub  storage_layout :  bool , 
425+     pub  transient_storage_layout :  bool , 
379426    pub  assembly :  bool , 
380427    pub  gas_estimates :  bool , 
381-     pub  compact_format :  bool , 
382428    pub  metadata :  bool , 
383429    pub  ir :  bool , 
384430    pub  ir_optimized :  bool , 
431+     pub  ir_optimized_ast :  bool , 
385432    pub  ewasm :  bool , 
386433    pub  function_debug_data :  bool , 
387434    pub  generated_sources :  bool , 
@@ -409,12 +456,13 @@ impl ExtraOutputValues {
409456            devdoc :  true , 
410457            method_identifiers :  true , 
411458            storage_layout :  true , 
459+             transient_storage_layout :  true , 
412460            assembly :  true , 
413461            gas_estimates :  true , 
414-             compact_format :  true , 
415462            metadata :  true , 
416463            ir :  true , 
417464            ir_optimized :  true , 
465+             ir_optimized_ast :  true , 
418466            ewasm :  true , 
419467            function_debug_data :  true , 
420468            generated_sources :  true , 
@@ -484,7 +532,13 @@ impl ExtraOutputValues {
484532                ContractOutputSelection :: Ewasm ( _)  => { 
485533                    config. ewasm  = true ; 
486534                } 
487-                 _ => { } 
535+                 ContractOutputSelection :: IrOptimizedAst  => { 
536+                     config. ir_optimized_ast  = true ; 
537+                 } 
538+                 ContractOutputSelection :: TransientStorageLayout  => { 
539+                     config. transient_storage_layout  = true ; 
540+                 } 
541+                 ContractOutputSelection :: Abi  => { } 
488542            } 
489543        } 
490544
0 commit comments