diff --git a/crates/aiken/src/cmd/blueprint/convert.rs b/crates/aiken/src/cmd/blueprint/convert.rs index 934e621f..09be5aab 100644 --- a/crates/aiken/src/cmd/blueprint/convert.rs +++ b/crates/aiken/src/cmd/blueprint/convert.rs @@ -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 }))