Cardano is a blockchain platform that has gained a reputation for its focus on security and formal verification. However, one of the criticisms of Cardano is that its native language for smart contract development, Plutus, is relatively new and lacks the robust tooling and development ecosystem of more established languages like Solidity. This has made it challenging for developers to build, test, and deploy smart contracts on the Cardano network. In response to this challenge, a number of open source tools have emerged to support the development of smart contracts on Cardano. These tools include libraries, frameworks, and development environments that provide developers with the building blocks they need to create and test smart contracts on the Cardano network.
Cardano smart contracts languages and libraries
The Plutus Application Framework by IOG (Input Output Global) is for Haskell enthusiasts who are looking to develop distributed applications on the Cardano blockchain. As a part of the Plutus Platform, it comes loaded with libraries that implement the framework and a host of end-to-end use cases. To get started with the Plutus Platform, you can find the main documentation available on the project's website link.
Plutarch-plutus is a library that provides an integration between Plutarch and Plutus. It offers tools for generating Plutus scripts from Plutarch-written validators, and also provides functions to generate Plutus Core code from Plutarch expressions, which can be used as building blocks for more complex validators. This library aims to make it easier to use Plutarch with Plutus, and to take advantage of the benefits of both tools. To use this library, you can add it as a dependency in your cabal file, along with the plutarch library.
Marlowe-Cardano is an implementation of the Marlowe platform for financial products as smart contracts on the Cardano blockchain by IOG (Input Output Global), using Plutus as the underlying smart contract language. The Marlowe repository includes the implementation of the Marlowe domain-specific language, tools for working with Marlowe, such as static analysis, and a variety of examples, including those based on the ACTUS financial standard. The Marlowe Playground is also included, which is a web-based environment for learning and writing Marlowe applications. For those who wish to contribute to the development of Marlowe, the repository includes detailed documentation on how to contribute and work with the project.
Plu-TS is a library aimed at allowing developers to write Cardano-related software entirely in TypeScript. It is designed to support a wider developer ecosystem adoption and easier integration. The project is divided into two main parts: on-chain and off-chain. The on-chain part handles smart contract creation, while the off-chain part takes care of transaction creation and smart contract interaction.
OpShin is an innovative project that enables developers to write smart contracts for Cardano using a strict subset of valid Python. The primary goal of this compiler is to ensure that if the program compiles, it is a valid Python program and its output when run with Python will be the same as when executed on-chain. OpShin boasts various advantages, such as compatibility with 100% valid Python code, leveraging the existing Python tool stack, an intuitive and flexible syntax, and efficient, secure code through static type inference. To get started, developers can explore the OpShin Pioneer Program, which offers a range of educational example contracts, test cases, and off-chain code. For a quick start in setting up a development environment and compiling sample contracts, the OpShin Starter Kit repository is available.
Aiken is a modern smart contract platform for Cardano that aims to provide developers with an efficient and streamlined experience. To get started with Aiken, you'll need Rust installed, which can be done through rustup. Once Rust is installed, you can install Aiken using the provided command, and then access the available help options with 'aiken --help'. For those who prefer, nix builds are also available via flakes. To better understand how to use Aiken, you can refer to the user manual for more detailed information. Aiken's roadmap is defined using GitHub Milestones, offering a high-level overview of the project's direction. While the roadmap is not set in stone, it gives developers an idea of the project's future plans and goals.
Naumachia is a Rust-based framework for writing smart contracts on the Cardano blockchain. It is a work-in-progress project that aims to provide a user-friendly environment for developing and testing smart contracts. Naumachia prioritizes end-user experience, contributor experience, and maintainability, making it a popular choice for Cardano developers.
- Cardano Transaction Lib (CTL)
CTL is a PureScript library for building smart contract transactions on Cardano. It aims to port the functionality and interface of Plutus off-chain code to the browser environment and NodeJS. The library supports multiple light wallets, including Nami, Gero, Flint, Lode, Eternl, and NuFi, and plans to support Lace, Typhon, and Yoroi. CTL's development roadmap includes building a simple transaction, submitting transactions with Nami, creating Plutus smart contract transactions, and developing a DSL for transactions.
- Carp (Cardano Postgres Indexer)
Carp (Cardano Postgres Indexer) is a tool that syncs data from the Cardano blockchain and stores it in a Postgres database. Developed with Rust using Oura and CML for the backend, and Typescript for the server and client, Carp focuses on speed, modularity, flexibility, type safety, and documentation.
Bridger interfaces and Chain indexer tools
Cardano DB Sync is a tool that follows the Cardano blockchain, extracts information, and maintains an internal ledger state. This data is inserted into a PostgreSQL database, enabling users to run SQL queries for various operations, such as looking up blocks, transactions, addresses, or stake pools, and checking balances or delegations.
Ogmios is a lightweight bridge interface for cardano-node, providing a WebSocket API that enables local clients to interact with Ouroboros' mini-protocols via JSON/RPC. It offers fast synchronization of blocks, transaction submission with enhanced error messages, evaluation of Plutus script execution units, local mempool monitoring, ledger state queries, and dual WebSocket/HTTP support, it comes with client implementation in typescript @cardano-ogmios/client, and they are other clients implementation like kogmios in Kotlin, and Ogmios Java Client in Java.
Kupo is a solution for small or large applications requiring a global chain index for resolving outputs by address, policy ID, or output reference, or on-the-fly monitoring of an address, policy ID, or specific transaction output. It runs in constant memory and boasts exceptional speed. Its use-cases, however, are limited. Some alternatives to Kupo with different trade-offs include Scrolls, Oura, Carp, cardano-db-sync, and Marconi.
- Carp (Cardano Postgres Indexer)
Carp (Cardano Postgres Indexer) is a tool that syncs data from the Cardano blockchain and stores it in a Postgres database. Developed with Rust using Oura and CML for the backend, and Typescript for the server and client, Carp focuses on speed, modularity, flexibility, type safety, and documentation. Speed is a priority, ensuring that queries are fast enough for production applications like wallets without compromising responsiveness. Carp's modular design allows users to enable only the necessary database functionality, optimizing sync times and storage requirements.
Scrolls is a tool designed for building and maintaining read-optimized collections of Cardano's on-chain entities. It processes the entire history of the chain, aggregating data to reflect the current state of affairs, and monitors the chain's tip to keep collections up-to-date. Examples of collections include "utxo by address," "chain parameters by epoch," "pool metadata by pool id," and "tx cbor by hash." Essentially, Scrolls operates as a map-reduce algorithm that aggregates the chain's history into use-case-specific key-value dictionaries
Oura is a rust-native implementation of a pipeline that connects to the tip of a Cardano node through a combination of Ouroboros mini-protocol, filters the events that match a particular pattern, and submits a succinct, self-contained payload to pluggable observers called "sinks". Under the hood, the Pallas library provides an implementation of the Ouroboros multiplexer and a few of the required mini-protocol state-machines, while the Gasket library provides a framework for building staged, event-driven applications. Oura can be used as a CLI tool to watch live transactions or as a bridge to other persistence mechanisms, and can also trigger custom actions and be used as a library for custom scenarios.
Marconi is a customizable solution for indexing and querying the Cardano blockchain. It consists of a set of components including marconi-core, marconi-chain-indexer, and marconi-sidechain. To develop and contribute to the project, users can run nix develop to enter the development shell and access a list of available commands. Marconi also provides user documentation, and users can generate Haskell API documentations directly from the nix shell for each of its components. The dependency update policy for Marconi is dependent on the protected branch, with specific rules regarding cardano-node, plutus, and other dependencies.
Cardano-graphql is the official GraphQL API by IOG (Input Output Global), the company behind Cardano. It is a cross-platform, typed, and queryable API for Cardano that contains multiple packages for composing GraphQL services to meet specific application demands.
Koios is a decentralized and elastic RESTful query layer for exploring data on the Cardano blockchain. It allows users to consume blockchain data within applications, wallets, explorers, and other tools. Developed by ]Cardano Community Guild](https://github.com/cardano-community), Koios offers an easy-to-use REST API that can be further simplified using the Koios Java Client or the Koios Python wrapper. With Koios, users can efficiently explore and analyze Cardano blockchain data for their specific needs.
Dandelion API by Gimbalabs offers an easy and efficient way for developers to get started with Cardano blockchain development. Instead of spending hours on setup, users can cut their setup time down to minutes using the Dandelion endpoint. With Dandelion API, developers can easily access and work with the Cardano blockchain without the hassle of setting up their own infrastructure.
Demeter is a robust infrastructure-as-a-service (IaaS) platform that allows developers to build and deploy Cardano dApps without the need for complex infrastructure setup. Demeter comes equipped with most extensions, tools, and start-up kits needed to start coding applications right away. This makes it an excellent option for developers who want to focus on writing code rather than spending time on infrastructure setup. Demeter removes the hassle of installing necessary tools to start developing on Cardano, including cardano-node, DB-Sync, Kupo, Ogmios, and more.