chore(utxorpc): update spec to v0.14 and update redeemer mapper (#559)

Co-authored-by: ricomiles <ricoquiblat@gmail.com>
This commit is contained in:
Santiago Carmuega 2024-12-14 16:16:42 -03:00 committed by GitHub
parent e2aa8139fc
commit ac66eb9473
4 changed files with 49 additions and 1 deletions

View file

@ -12,7 +12,7 @@ authors = ["Santiago Carmuega <santiago@carmuega.me>"]
[dependencies]
# utxorpc-spec = { path = "../../../utxorpc/spec/gen/rust" }
utxorpc-spec = { version = "0.11.0" }
utxorpc-spec = { version = "0.14.0" }
pallas-traverse = { version = "=0.31.0", path = "../pallas-traverse" }
pallas-primitives = { version = "=0.31.0", path = "../pallas-primitives" }

View file

@ -65,6 +65,12 @@ impl<C: LedgerContext> Mapper<C> {
u5c::Redeemer {
purpose: self.map_purpose(&x.tag()).into(),
payload: self.map_plutus_datum(x.data()).into(),
index: x.index().into(),
ex_units: Some(u5c::ExUnits {
steps: x.ex_units().steps,
memory: x.ex_units().mem,
}),
original_cbor: x.encode().into(),
}
}