mlabs-haskell / ply

A helper library for working with compiled, parameterized Plutus Scripts
MIT License
18 stars 12 forks source link

Possibly incorrect substitution definition inside `applyConstant` #54

Closed sourabhxyz closed 1 month ago

sourabhxyz commented 1 month ago

https://github.com/mlabs-haskell/ply/blob/efeb0baddffccdbbf38d1e7e02cd1778422eeb78/ply-core/src/Ply/Core/UPLC.hs#L35

reads subst 1 (const body) f which appears weird as there is no use of c being made here, shouldn't it instead be something along the lines subst 1 (const arg) body?

TotallyNotChase commented 1 month ago

I think you're right. This seems like a nasty bug that probably only got unchecked because real scripts usually don't apply small constants.