feat(upstream): Make output generic by adapter (#236)
This commit is contained in:
parent
6ac63a04e2
commit
44465369be
7 changed files with 63 additions and 42 deletions
|
|
@ -7,13 +7,10 @@ use crate::MultiEraTx;
|
|||
impl<'b> MultiEraTx<'b> {
|
||||
pub fn aux_plutus_v1_scripts(&self) -> &[alonzo::PlutusScript] {
|
||||
if let Some(aux_data) = self.aux_data() {
|
||||
match aux_data.deref() {
|
||||
alonzo::AuxiliaryData::PostAlonzo(x) => {
|
||||
if let Some(plutus) = &x.plutus_scripts {
|
||||
return plutus.as_ref();
|
||||
}
|
||||
if let alonzo::AuxiliaryData::PostAlonzo(x) = aux_data.deref() {
|
||||
if let Some(plutus) = &x.plutus_scripts {
|
||||
return plutus.as_ref();
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use std::{borrow::Cow, ops::Deref};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use pallas_codec::minicbor;
|
||||
use pallas_crypto::hash::Hash;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue