Short Description
This project is aimed at helping developers generate a template that implements cartesi-wallet functions and UI for sending, withdrawing and transfering Ethers or ERC20.
Aim
We aim to allow developers build ontop the cartesi by extracting the need to set up and implement cartesi wallet feature UI and backend for ethers and erc20 features.
Detailed Description
This project was built with typescript, oclif and react. It has templates for javascript, typescript and rust (wallet implementation and frontend).
It integrates cartesi wallet library to help execute ethers and erc20 transactions.
This template consist of both frontend and backend code, it bootstraps a simple wallet functionality for handling both erc20 and ethers transactions.
Please follow the steps below to set up properly:
cd into the directory u wish to create your project
1. run "npm install -g cartesi-wallet-template" to install the library globally
2. run "cartesi-wallet-template create your-project-name --template javascript" to bootstrap a template with wallet feture
You will start with the backend setup locally and run it in a no-backend environment
1. CD into the backend - "cd /backend"
2. Install the dependencies - "npm install"
3. Start your backend docker container - "npm run backend"
4. Start your backend - "npm run start" With your backend docker running and the project backend running locally.
You can start the frontend
1. CD into the frontend directory - "cd /frontend"
2. don't worry, the dependencies were install when you bootstrap the project
3. run "npm run start" to start the frontend.
To fully test, make sure, you are connected to your metamask wallet and to the local chain. (RPC- http://127.0.0.1:8545/, chain-id - 31337)
The javascript and typescript are built with react. While the rust frontend with "Yew" (A framework for creating reliable and efficient web applications.).
The frontend designs was done with tailwind css and daisy UI. The wallet implementation was achieved with the cartesi wallet library.
Challenges
The major challenge was implementing a rust template for cartesi vault that has cartesi wallet dependency. We intend to add a backend template, so that developers won't have to create a backend and set it up. By bootstrapping with our dependency, and a choice of your template, everything will be set up for you to extend and build your desired project.
git repo - https://github.com/gr4yha7/cartesi-wallet-template