Please describe your proposed solution
We have completed technical milestones, deployed Catalyst project 1100097 PAAS MVP for smart contract developers to publish, provide free compiled smart contracts as JSON objects through APIs at: https://paas.bworks.app/web. There are already several published Aiken, Plutus smart contracts on PAAS MVP with various signature, string, number and time validators ready to use.
This proposal continues our F11 PAAS project by developing open-source typescript off-chain libraries, React components as web3 UIs that integrate with PAAS APIs for dApp developers to build smart contract transactions (TXs) via internet as below:
const lockTx = await paasLib.lock({wallet: 'connectedWallet', contract: 'paasContractId', assetPolicy: 'assetPolicy', amount: 'assetAmount', datum: 'datum'})
const unlockTxHash = await paasLib.unlock({wallet: 'connectedWallet', lockedUtxo: 'lockedUtxo', receiverAddress: 'receiverAddress', redeemer: ''redeemer})
<PaasTx onClick={lock || unlock || mint} />
The project to result out published open-source libraries, components on public NPM package registry for others can use freely via Yarn add, NPM install with below details:
Off-chain library functions
- Build, sign and submit a TX with available smart contracts on PAAS.
- Record submitted TX metadata, error message to PAAS API.
- Get locked UTXO, contractId to use for unlocking a locked TX.
- Utils, validations around Cardano smart contract subject.
React components
- Connect installed wallet.
- Lock asset to a smart contract.
- Unlock asset from a locked UTXO.
- Mint asset token with smart contract.
Features
- Sign TX by installed wallet.
- Tracking TX metadata, error message via the web and APIs.
- Support Plutus V3, Conway era and contract mint policy. Up to date nodeJs, React and Cardano node versions.
- WASM packing with webpack, vite.
Language
Typescript (javascript), the popular language to develop web frontend, mobile apps.
Diagram
Demo
<https://www.youtube.com/watch?v=lxcB5J475hU>Users
dApp developers, researchers and learners.
<u>Conclusion</u>
As a result others can use these open-source libraries, components with free and available smart contracts on PAAS to build dApp similarly to building web2, migrate existing web2 to Cardano web3 by including web3 React components into current projects. This benefits community at some level.