Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evm: Enable DST20 optimisation #2375

Merged
merged 9 commits into from
Sep 6, 2023
11 changes: 10 additions & 1 deletion lib/ain-contracts/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{env, fs, path::PathBuf};

use anyhow::format_err;
use ethers_solc::{Project, ProjectPathsConfig, Solc};
use ethers_solc::{artifacts::Optimizer, Project, ProjectPathsConfig, Solc, SolcConfig};

fn main() -> Result<(), Box<dyn std::error::Error>> {
// compile solidity project
Expand All @@ -26,8 +26,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.sources(&root)
.build()?;

let mut solc_config = SolcConfig::builder().build();

solc_config.settings.optimizer = Optimizer {
enabled: Some(true),
runs: Some(u32::MAX as usize),
details: None,
};

let project = Project::builder()
.solc(solc)
.solc_config(solc_config)
.paths(paths)
.set_auto_detect(true)
.no_artifacts()
Expand Down
Loading