-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use ByteString literals in on-chain code #3156
Comments
Thanks for the issue! Unfortunately, I may suggest to pass constants as a part of datum (fields in ADT) or as arguments for now. |
Yes, I hit this when trying to prepare the testnet exercises. I worked around it by using an integer literal. I believe you could also use strings in datums and redeemers. The problem I hit is partly down to staging in the Plutus compiler (byte strings have some dynamic component - they are not just calculated as compile-time constants). |
Hi @ak3n, I know that your team is busy and thank you for all the hard work to put Plutus closer to the production launch. I would like to ask if this issue has a high priority on the roadmap? I believe that having this issue fixed would be a great improvement to the developer experience. |
Thanks for that! |
Area
[*] Plutus Foundation Related to the GHC plugin, Haskell-to-Plutus compiler, on-chain code
Summary
I need to append some constant marker to a token name.
But when I use in on-chain code constant string literals that are meant to be
ByteString
\bs -> "a" <> bs
I get an error of PLC plugin:
Steps to reproduce
It happens when we use string literals for
ByteString
in on-chain code.Expected behavior
I would like to append some data to the ByteString in on-chain code.
System info:
The text was updated successfully, but these errors were encountered: