Emurgo / cardano-serialization-lib

This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
231 stars 125 forks source link

How to calculate redeemer ex_units? #587

Closed jeffhappily closed 1 year ago

jeffhappily commented 1 year ago

There's an ex_units field in Redeemer https://github.com/Emurgo/cardano-serialization-lib/blob/dbcd3e3562d782def91a9f04f04377fa77a02a0a/rust/src/plutus.rs#L816-L821

I think it's possible to use tool like blockfrost to calculate the budget, but is there any other way to do it, preferably just using this library? Or is there any other way to construct the Redeemer without having to calculate the budget myself?

lisicky commented 1 year ago

@jeffhappily you can do by cardano-cli or Ogmios

lisicky commented 1 year ago

Unfortunately CSL doesn't support ExUnits calculation for Redeemer

jeffhappily commented 1 year ago

@lisicky Thanks for the pointer, what about for collateral amount, is there a way to calculate it too?

lisicky commented 1 year ago

@jeffhappily for collateral it would be better if you create a new issue