feat: use plutus version in convert command

relates to #907
This commit is contained in:
rvcas
2024-05-21 17:05:02 -04:00
parent f306f1715a
commit 050d003b27

View File

@@ -69,6 +69,13 @@ pub fn exec(
let blueprint: Blueprint =
serde_json::from_reader(BufReader::new(blueprint)).into_diagnostic()?;
let opt_config = Config::load(&project_path).ok();
let cardano_cli_type = opt_config
.map(|config| config.plutus_version)
.unwrap_or_default()
.cardano_cli_type();
// Perform the conversion
let when_too_many =
|known_validators| ProjectError::MoreThanOneValidatorFound { known_validators };
@@ -89,7 +96,7 @@ pub fn exec(
let cbor_hex = hex::encode(double_cbor_bytes);
Ok(json!({
"type": "PlutusScriptV2",
"type": cardano_cli_type,
"description": "Generated by Aiken",
"cborHex": cbor_hex
}))