Fix deserialization of SerializedProgram into wrong Plutus version wrappers.

This commit is contained in:
KtorZ 2024-12-03 22:21:57 +01:00
parent c3b07dfe83
commit a9675fedc6
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## v1.1.8 - UNRELEASED
### Changed
- **aiken**: Fix `aiken blueprint policy` computing hashes as PlutusV1, instead of relying on the plutus version from the Blueprint. @KtorZ
## v1.1.7 - 2024-11-19
### Changed

View File

@ -239,7 +239,7 @@ impl<'a> Deserialize<'a> for SerializableProgram {
.and_then(|program| {
let cbor = || program.to_cbor().unwrap().into();
if conway::PlutusScript::<1>(cbor()).compute_hash().to_string() == hash {
if conway::PlutusScript::<3>(cbor()).compute_hash().to_string() == hash {
return Ok(SerializableProgram::PlutusV3Program(program));
}
@ -247,7 +247,7 @@ impl<'a> Deserialize<'a> for SerializableProgram {
return Ok(SerializableProgram::PlutusV2Program(program));
}
if conway::PlutusScript::<3>(cbor()).compute_hash().to_string() == hash {
if conway::PlutusScript::<1>(cbor()).compute_hash().to_string() == hash {
return Ok(SerializableProgram::PlutusV1Program(program));
}