This repository was archived by the owner on Oct 19, 2024. It is now read-only.
File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
### Unreleased
6
6
7
+ * Allow configuring the optimizer & passing arbitrary arguments to solc [ #427 ] ( https://github.com/gakonst/ethers-rs/pull/427 )
8
+
7
9
### 0.5.2
8
10
* Correctly RLP Encode transactions as received from the mempool ([ #415 ] ( https://github.com/gakonst/ethers-rs/pull/415 ) )
9
11
Original file line number Diff line number Diff line change @@ -210,6 +210,22 @@ impl Solc {
210
210
}
211
211
212
212
/// Sets the optimizer runs (default = 200). None indicates no optimization
213
+ ///
214
+ /// ```rust,no_run
215
+ /// use ethers_core::utils::Solc;
216
+ ///
217
+ /// // No optimization
218
+ /// let contracts = Solc::new("./contracts/*")
219
+ /// .optimizer(None)
220
+ /// .build().unwrap();
221
+ ///
222
+ /// // Some(200) is default, optimizer on with 200 runs
223
+ /// // .arg() allows passing arbitrary args to solc command
224
+ /// let optimized_contracts = Solc::new("./contracts/*")
225
+ /// .optimizer(Some(200))
226
+ /// .arg("--metadata-hash=none")
227
+ /// .build().unwrap();
228
+ /// ```
213
229
pub fn optimizer ( mut self , runs : Option < usize > ) -> Self {
214
230
self . optimizer = runs;
215
231
self
You can’t perform that action at this time.
0 commit comments