HeliosLang / compiler

Helios is a DSL for writing Cardano smart contracts. This library lets you compile Helios scripts and build Cardano transactions.
https://www.hyperion-bt.org/helios-book
BSD 3-Clause "New" or "Revised" License
142 stars 31 forks source link

[Feature Request] Along w/ lovelaces, Value should allow to get assets only #61

Closed nemo83 closed 1 year ago

nemo83 commented 1 year ago

Currently Value has a get_lovelace() to get the lovelace value, but there is not get_assets or equivalent, where only native assets are returned.

I've currently worked around it w/

Value::from_map(myValue.to_map().filter((a: MintingPolicyHash, _) -> { a != MintingPolicyHash::new(#) }));
christianschmitz commented 1 year ago

Thanks for calling this out! I've just released v0.12.12 which implements value.get_assets(). Please take a look

nemo83 commented 1 year ago

Thanks for calling this out! I've just released v0.12.12 which implements value.get_assets(). Please take a look

All working. Thanks.