Last updated 2 years ago
Variations across tools like cardano-cli, serialization libs and Plutus, like in data serialization create difficulty when more than one is present in a dApp stack.
Enrich the usability of cardano components with a RESTful abstraction for off-chain plutus for dApps that runs with the Plutus Application Backend (PAB).
This is the total amount allocated to RESTful wrapper for Plutus Offchain.
For dApps designed with a backend running on the PAB, it will add a lot of utility to have a RESTful abstraction for the off chain code. A frontend can interact with the PAB to invoke the endpoints exposed via the Plutus off-chain code but the PAB cannot return a response back to the calling frontend. A RESTful response from the Plutus off-chain will provide access to attributes deduced with Plutus. For example, the script address of a parameterized Plutus contract.
Benefits:
A convenient way to bridge the frontend/backend for DApps with off-chain Plutus. The RESTful API can be used to fetch at runtime
What is listed above is not an exhaustive set of use cases for getting attributes from the off-chain code. However they go a long way to simplify the frontend-backend-Plutus interaction for a dApp.
To call out a related case, there are differences in the way data serialization is done by different tools like cardano-cli, serialization libs and Plutus. Unless identical serialized bytes are used the corresponding hashes turn out to be different. This leaves an inconsistency across toolsets and can become inconvenient to dApps that use more than one of the tools in their tech stack. This RESTful abstraction will make it easier to employ Plutus Application Backend (PAB) running Plutus smart contracts in the dApp stack.
It is important to highlight that this wrapper tooling is non intrusive that it does not change the way the PAB or Plutus off-chain works. Instead, it provides an abstraction to communicate with the Plutus off-chain code at runtime.
This diagram shows how the deployment model will be when this tooling is used.
Deliverables:
How can dev teams use this solution?
The wrapper module (written in Haskell) can be imported into their projects which uses Plutus smart contracts. The wrapper will provide the necessary abstraction for the frontend/backend to access the Plutus off-chain. Dev teams can reuse the REST endpoints from this tooling and then wire those with their own smart contracts by following the examples which will be provided. The various endpoints can be invoked by a dApp frontend (or backend) and the REST based wrapper will interact with the off-chain code.
This proposal is to develop tooling that can make dApp development in Cardano richer and easier. It aligns directly with the following guiding questions of this challenge.
How do we attract developers from outside of our current community to participate in Catalyst? - A RESTful abstraction is one of the most convenient patterns in software development today for system integrations. New Cardano developers already have a steep learning curve of learning how Cardano blockchain works (eUTXO model etc) as well as Plutus. This solution will help them bridge frontend/backend with off-chain Plutus for dApps running Plutus smart contracts in a familiar manner.
What do developers want, and how do they get it from the Cardano dev ecosystem? - Developers often want open source and tested code that they can adopt in their development, preferably from those who have been in the space for longer. This will be one of the open source repositories through which we share our expertise and learning from working on Cardano.
What are enterprise dev managers looking for in order to be able to build out enterprise projects - either internal or commercial? - To have standard approaches to doing something and not having to reinvent the wheel are aspects that dev managers focus on. This solution gives a readily usable tooling/codebase to help in dApp development.
Among the potential directions listed in the challenge, this solution fits under 'Deployment, testing, and monitoring frameworks', 'Samples, recipes and templates' and 'Support structures'
Overall, this is a low-risk project as delivery can be only delayed but not prevented.
The roadmap for this project is planned based on the work breakdown, biweekly milestones and timeline are described here. Also, please note that though the team members have ongoing projects from previous funds which are on track. One of our Fund 8 projects under Open Source Developer Ecosystem got completed (visit repository) 2 weeks ahead of schedule. This gives us additional bandwidth to stick to the timeline below.
Week 1-2:
Develop a minimal version of RESTful wrapper component with one endpoint
PAB executable smart contract for one example use case
Review and test cases
Milestone: Dev complete for a single end to end flow
Week 3-4:
Integration as a PAB executable project
Preliminary testing on testnet with PAB
Add utility functions for easier extension
Milestone: Preliminary testing on testnet complete
Week 5-6:
Expand RESTful wrapper with more endpoints
Review and test cases
Integration testing
System testing on testnet with PAB
Milestone: Dev complete for project. Testing on testnet complete.
Week 7 - 8:
Acceptance testing on mainnet with PAB
Prepare Documentation and Tutorial
Video walkthrough
Close out
Milestone: Repository ready for use
Week 9:
Buffer window: To make up for any unexpected delay.
Week 10:
Buffer window: Close out
Maximum time required from start to close is 2.5 months.
The effort estmate and budget calculation is as follows:
Effort:
Total engineering hours = 405
Requested budget (@80/hr) : 32400
We are a group of experienced Software Engineers/Plutus Pioneers/ community ambassadors in the Cardano ecosystem. We are passionate about Cardano and open source development and have been building with Cardano for close to a year. You can view our work on open source repositories for Plutus/Cardano in our Github repo.
Github: https://github.com/lambdacc
People working on this project are:
Reshma Mohan
Software Engineer with 8 years of experience. She is Plutus Pioneer from the 1st cohort. She now spends most of her work time developing in Haskell and drafting articles about Cardano. She is also active in the community as an Ambassador to Genius Yield DEX platform. She holds a Bachelor of Technology degree in Electrical and Electronics Engineering.
Sandeep Sharma
Software engineer with over 10 years of experience. He holds a Bachelor of Technology degree in Computer Science. He specializes in backend development and API integrations.
No. The scope of this project is for a fullly functional tooling to assist developers. It will not need further funding.
Progress will be measured by as per the biweekly milestones listed. What we enumerated under the section for timelines and milestones is a work break down. That will be our basis for measuring the progress of this project. We will measure
These metrics will be included in progress reports that we submit during the course of implementation.
Success of this project will look like
This is an entirely new proposal.
SDG goals:
Build resilient infrastructure, promote inclusive and sustainable industrialization and foster innovation
SDG subgoals:
Develop quality, reliable, sustainable and resilient infrastructure, including regional and transborder infrastructure, to support economic development and human well-being, with a focus on affordable and equitable access for all
Key Performance Indicator (KPI):
Universal Human Rights Index (UHRI):
#proposertoolsdg
NB: Monthly reporting was deprecated from January 2024 and replaced fully by the Milestones Program framework. Learn more here
We are a group of experienced Software Engineers/Plutus Pioneers. Experienced at building open source repositories for Plutus/Cardano which can be found in our Github repo added in this proposal.