Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit 63cdd0a

Browse files
committed
chore: add changelog for #427 changes
1 parent 664ccfe commit 63cdd0a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Diff for: CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### Unreleased
66

7+
* Allow configuring the optimizer & passing arbitrary arguments to solc [#427](https://github.com/gakonst/ethers-rs/pull/427)
8+
79
### 0.5.2
810
* Correctly RLP Encode transactions as received from the mempool ([#415](https://github.com/gakonst/ethers-rs/pull/415))
911

Diff for: ethers-core/src/utils/solc.rs

+16
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,22 @@ impl Solc {
210210
}
211211

212212
/// 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+
/// ```
213229
pub fn optimizer(mut self, runs: Option<usize>) -> Self {
214230
self.optimizer = runs;
215231
self

0 commit comments

Comments
 (0)