mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-15 03:21:06 +00:00
use the long revive version string in the contract metadata (#109)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::ResolcVersion;
|
||||
|
||||
/// The Solidity contract metadata.
|
||||
/// Is used to append the metadata hash to the contract bytecode.
|
||||
#[derive(Debug, Serialize)]
|
||||
@@ -9,11 +11,11 @@ pub struct Metadata {
|
||||
/// The `solc` metadata.
|
||||
pub solc_metadata: serde_json::Value,
|
||||
/// The `solc` version.
|
||||
pub solc_version: semver::Version,
|
||||
pub solc_version: String,
|
||||
/// The pallet revive edition.
|
||||
pub revive_pallet_version: Option<semver::Version>,
|
||||
/// The PolkaVM compiler version.
|
||||
pub revive_version: semver::Version,
|
||||
pub revive_version: String,
|
||||
/// The PolkaVM compiler optimizer settings.
|
||||
pub optimizer_settings: revive_llvm_context::OptimizerSettings,
|
||||
}
|
||||
@@ -22,16 +24,15 @@ impl Metadata {
|
||||
/// A shortcut constructor.
|
||||
pub fn new(
|
||||
solc_metadata: serde_json::Value,
|
||||
solc_version: semver::Version,
|
||||
solc_version: String,
|
||||
revive_pallet_version: Option<semver::Version>,
|
||||
revive_version: semver::Version,
|
||||
optimizer_settings: revive_llvm_context::OptimizerSettings,
|
||||
) -> Self {
|
||||
Self {
|
||||
solc_metadata,
|
||||
solc_version,
|
||||
revive_pallet_version,
|
||||
revive_version,
|
||||
revive_version: ResolcVersion::default().long,
|
||||
optimizer_settings,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user