Untyped Plutus Language Core
This is a basic library to support creating and manipulating programs written in UPLC.
Installation
Install anything between python 3.8 and 3.11.
Then run
pip install uplc
Secp256k1
If you want to use the builtin functions for verification of ECDSA and Schnorr signatures,
follow the instructions to install libsecp256k1
with schnorr support enabled:
https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/install.md#installing-secp256k1
This makes sure that the exact same version is used that is used in the cardano-node
.
Usage
This tool may be used to parse, reformat (/dump), evaluate or build contract artifacts from UPLC code.
uplc parse examples/fibonacci.uplc
uplc dump examples/fibonacci.uplc --dialect plutus --unique-varnames
uplc dump examples/fibonacci.uplc --dialect legacy-aiken
uplc eval examples/fibonacci.uplc "(con integer 5)"
uplc build examples/fibonacci.uplc
uplc dump build/fibonacci/script.cbor --from-cbor
uplc build script.cbor --from-cbor "(con integer 5)"
uplc --help
Scope and Contributions
This is a side product of the development of a pythonic smart contract language for the Cardano blockchain
and hence much tailored to the needs of that development.
Most likely it can do what you would like to do but its not properly documented. Please do reach out via Discord or GitHub issue if you think this tool could be of use to you.
Contributions are very welcome.