parent
f306f1715a
commit
050d003b27
|
@ -69,6 +69,13 @@ pub fn exec(
|
||||||
let blueprint: Blueprint =
|
let blueprint: Blueprint =
|
||||||
serde_json::from_reader(BufReader::new(blueprint)).into_diagnostic()?;
|
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
|
// Perform the conversion
|
||||||
let when_too_many =
|
let when_too_many =
|
||||||
|known_validators| ProjectError::MoreThanOneValidatorFound { known_validators };
|
|known_validators| ProjectError::MoreThanOneValidatorFound { known_validators };
|
||||||
|
@ -89,7 +96,7 @@ pub fn exec(
|
||||||
let cbor_hex = hex::encode(double_cbor_bytes);
|
let cbor_hex = hex::encode(double_cbor_bytes);
|
||||||
|
|
||||||
Ok(json!({
|
Ok(json!({
|
||||||
"type": "PlutusScriptV2",
|
"type": cardano_cli_type,
|
||||||
"description": "Generated by Aiken",
|
"description": "Generated by Aiken",
|
||||||
"cborHex": cbor_hex
|
"cborHex": cbor_hex
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Reference in New Issue