mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 15:11:02 +00:00
Merge remote-tracking branch 'origin/main' into resolc.js
This commit is contained in:
@@ -5,9 +5,10 @@ pub mod contract;
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::Path;
|
||||
|
||||
use crate::compiler::combined_json::CombinedJson;
|
||||
use crate::compiler::standard_json::output::Output as StandardJsonOutput;
|
||||
use crate::compiler::version::Version as SolcVersion;
|
||||
use crate::solc::combined_json::CombinedJson;
|
||||
use crate::solc::standard_json::output::Output as StandardJsonOutput;
|
||||
use crate::solc::version::Version as SolcVersion;
|
||||
use crate::ResolcVersion;
|
||||
|
||||
use self::contract::Contract;
|
||||
|
||||
@@ -40,11 +41,7 @@ impl Build {
|
||||
}
|
||||
|
||||
/// Writes all contracts assembly and bytecode to the combined JSON.
|
||||
pub fn write_to_combined_json(
|
||||
self,
|
||||
combined_json: &mut CombinedJson,
|
||||
resolc_version: &semver::Version,
|
||||
) -> anyhow::Result<()> {
|
||||
pub fn write_to_combined_json(self, combined_json: &mut CombinedJson) -> anyhow::Result<()> {
|
||||
for (path, contract) in self.contracts.into_iter() {
|
||||
let combined_json_contract = combined_json
|
||||
.contracts
|
||||
@@ -61,7 +58,7 @@ impl Build {
|
||||
contract.write_to_combined_json(combined_json_contract)?;
|
||||
}
|
||||
|
||||
combined_json.zk_version = Some(resolc_version.to_string());
|
||||
combined_json.revive_version = Some(ResolcVersion::default().long);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -71,7 +68,6 @@ impl Build {
|
||||
mut self,
|
||||
standard_json: &mut StandardJsonOutput,
|
||||
solc_version: &SolcVersion,
|
||||
resolc_version: &semver::Version,
|
||||
) -> anyhow::Result<()> {
|
||||
let contracts = match standard_json.contracts.as_mut() {
|
||||
Some(contracts) => contracts,
|
||||
@@ -90,7 +86,7 @@ impl Build {
|
||||
|
||||
standard_json.version = Some(solc_version.default.to_string());
|
||||
standard_json.long_version = Some(solc_version.long.to_owned());
|
||||
standard_json.zk_version = Some(resolc_version.to_string());
|
||||
standard_json.revive_version = Some(ResolcVersion::default().long);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user