The plu-ts typescript smart-contracts project proposes to implement a library able to construct an Abstract Syntax Tree (AST) Untyped Plutus Core and serialize it, so that it can be submitted with a transaction and proposed on chain. This solution has been driven by the current challenge whereby, smart contract creation is limited to the Haskell programming language, limiting potential of smart contracts that do not need to be created on-the-fly by a Plutus Application Backend (PAB).
Plu-ts Typescript Smart-Contracts
The code that runs on the Cardano nodes when validating transactions containing smart contract input is not written in Haskell. Instead, Haskell compiles to Untyped Plutus Core using certain libraries. The code is therefore written in Untyped Plutus Core, which is meant to be a compilation target. The Plutus core specification is very clear about the language, allowing developers to understand how to create a representation of Untyped Plutus Core in any language. The project will then build an API on top of this core concept, possibly emulating Haskell’s PlutusTx API.
The solution is to implement the Untyped Plutus Core specification in Typescript by constructing the AST of an UPLC Program as an object using utility functions, and at the moment of compilation serialize it. This will result in testable code, inline documentation, useful debug features and reverse engineering by inspecting the code in a language familiar to developers. Additionally, the creation of smart contracts in Typescript will allow client-side parametrized smart contracts and PABs running on node js or deno.
This project aims to create a tool with the potential to be used by a wide community of developers. This tool will also allow existing dapp developers to generate smart contracts client-side, resulting in truly decentralized applications that could be served statistically.
Project Lead
This project only has one member called Michele Nuzzi. Michele is the brains behind Harmonic stake pool and Trace, a web3 product tracing solution on Cardano. On Project Catalyst, Michele identifies as a developer, entrepreneur and a stakepool operator. She has been a member since Feb. 21, 2022 and has contributed three ideas on the platform. Michele has experience building and maintaining the Cardano wallet interface npm package and is the lead developer at Cardano-Trace.
Michele is an active Twitter member and runs a Youtube channel where all her progress on this project will be posted. These sites will allow users to follow, question and understand the plu-tus typescript smart contract project better.
The budget
The project will require $105,840 to be fully operational. The projected amount of time for the project development is 8 months. The funds will be split up in the following manner:
- 8 months’ salary- $61,440
- Repository maintenance- $14,400
- Critical code audit- $30,000
The repository maintenance cost is important since Plutus being a relatively new tool, the smart contract creation details on Cardano are constantly changing. This amount will cover any additional and critical development without the need to create another fund request in future. For the critical code audit however, in case there is a necessity for a more in-depth audit, a new catalyst proposal will be created. This is because the current proposal only caters for code responsible for smart contract compilation and abstract syntax tree creation only.
Final Thoughts
The plu-ts typescript smart contract project seeks to make work easier for developers by creating a tool that will allow existing dapp developers to generate smart contracts client-side, resulting in truly decentralized applications that could be served statistically. Currently, smart contract creation is limited to the Haskell programming language which can limit the great potential of parametrized smart contracts that need to be created on-the-fly by a Plutus Application Backend. However, with the implementation of the Untyped Plutus Core specification in Typescript, it is easier for developers to test code and enjoy useful debug features.
The developer behind this project has made it easy for the community to follow its progress by making it open source as well as having active Twitter and YouTube accounts to constantly update followers. The community can therefore get more information through these channels and judge whether the developer is working according to provided schedule and timelines.
Image courtesy of pixabay