chore(plutus_version): use a cuter name in the config field
This commit is contained in:
parent
489eff7f5b
commit
f5c4f4cb37
|
@ -144,7 +144,7 @@ impl From<&Config> for Preamble {
|
|||
name: "Aiken".to_string(),
|
||||
version: config::compiler_version(true),
|
||||
}),
|
||||
plutus_version: config.plutus_version,
|
||||
plutus_version: config.plutus,
|
||||
version: config.version.clone(),
|
||||
license: config.license.clone(),
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ pub use aiken_lang::plutus_version::PlutusVersion;
|
|||
pub struct Config {
|
||||
pub name: PackageName,
|
||||
pub version: String,
|
||||
pub plutus_version: PlutusVersion,
|
||||
pub plutus: PlutusVersion,
|
||||
pub license: Option<String>,
|
||||
#[serde(default)]
|
||||
pub description: String,
|
||||
|
@ -58,7 +58,7 @@ impl Config {
|
|||
Config {
|
||||
name: name.clone(),
|
||||
version: "0.0.0".to_string(),
|
||||
plutus_version: PlutusVersion::default(),
|
||||
plutus: PlutusVersion::default(),
|
||||
license: Some("Apache-2.0".to_string()),
|
||||
description: format!("Aiken contracts for project '{name}'"),
|
||||
repository: Some(Repository {
|
||||
|
|
|
@ -142,7 +142,7 @@ where
|
|||
|
||||
pub fn new_generator(&'_ self, tracing: Tracing) -> CodeGenerator<'_> {
|
||||
CodeGenerator::new(
|
||||
self.config.plutus_version,
|
||||
self.config.plutus,
|
||||
utils::indexmap::as_ref_values(&self.functions),
|
||||
utils::indexmap::as_ref_values(&self.data_types),
|
||||
utils::indexmap::as_str_ref_values(&self.module_types),
|
||||
|
@ -437,7 +437,7 @@ where
|
|||
Ok(validator.program.address(
|
||||
network,
|
||||
delegation_part.to_owned(),
|
||||
&self.config.plutus_version.into(),
|
||||
&self.config.plutus.into(),
|
||||
))
|
||||
}
|
||||
})
|
||||
|
@ -466,7 +466,7 @@ where
|
|||
} else {
|
||||
let cbor = validator.program.to_cbor().unwrap();
|
||||
|
||||
let validator_hash = match self.config.plutus_version {
|
||||
let validator_hash = match self.config.plutus {
|
||||
PlutusVersion::V1 => cardano::PlutusV1Script(cbor.into()).compute_hash(),
|
||||
PlutusVersion::V2 => cardano::PlutusV2Script(cbor.into()).compute_hash(),
|
||||
PlutusVersion::V3 => cardano::PlutusV3Script(cbor.into()).compute_hash(),
|
||||
|
@ -853,7 +853,7 @@ where
|
|||
|
||||
let data_types = utils::indexmap::as_ref_values(&self.data_types);
|
||||
|
||||
let plutus_version = &self.config.plutus_version;
|
||||
let plutus_version = &self.config.plutus;
|
||||
|
||||
tests
|
||||
.into_par_iter()
|
||||
|
|
|
@ -72,7 +72,7 @@ pub fn exec(
|
|||
let opt_config = Config::load(&project_path).ok();
|
||||
|
||||
let cardano_cli_type = opt_config
|
||||
.map(|config| config.plutus_version)
|
||||
.map(|config| config.plutus)
|
||||
.unwrap_or_default()
|
||||
.cardano_cli_type();
|
||||
|
||||
|
|
Loading…
Reference in New Issue