From 107c4f1e6e34b8fad291606dfae4488676578375 Mon Sep 17 00:00:00 2001 From: rvcas Date: Tue, 31 Oct 2023 23:11:54 -0400 Subject: [PATCH] feat(primitives): add field 3 to post alonzo auxiliary data --- pallas-primitives/src/alonzo/model.rs | 5 ++++- pallas-traverse/src/auxiliary.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pallas-primitives/src/alonzo/model.rs b/pallas-primitives/src/alonzo/model.rs index efc08a28..12f423f1 100644 --- a/pallas-primitives/src/alonzo/model.rs +++ b/pallas-primitives/src/alonzo/model.rs @@ -1333,7 +1333,10 @@ pub struct PostAlonzoAuxiliaryData { pub native_scripts: Option>, #[n(2)] - pub plutus_scripts: Option>, + pub plutus_v1_scripts: Option>, + + #[n(3)] + pub plutus_v2_scripts: Option>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq, PartialOrd, Ord, Clone)] diff --git a/pallas-traverse/src/auxiliary.rs b/pallas-traverse/src/auxiliary.rs index 3df55992..fac5459a 100644 --- a/pallas-traverse/src/auxiliary.rs +++ b/pallas-traverse/src/auxiliary.rs @@ -8,7 +8,7 @@ impl<'b> MultiEraTx<'b> { pub fn aux_plutus_v1_scripts(&self) -> &[alonzo::PlutusScript] { if let Some(aux_data) = self.aux_data() { if let alonzo::AuxiliaryData::PostAlonzo(x) = aux_data.deref() { - if let Some(plutus) = &x.plutus_scripts { + if let Some(plutus) = &x.plutus_v1_scripts { return plutus.as_ref(); } }