Skip to content

lordshashank/wiz-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Wiz-Wallet

Easing mina transactions
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

Wiz-Wallet is a type of smart contract wallet that minimses the on-chain transactions by using off-chain storage and on-chain verification. It is a type of wallet that is used to store the crypto assets and can be used to send and receive the crypto assets. Currently its implemented for custom tokens where users token are locked in the smart contract and can be used to send and receive the tokens. The wallet is implemented using the concept of merkle maps where the users can send and receive the tokens without any on-chain transactions. The transactions are only done when the user wants to withdraw the tokens from the wallet.

(back to top)

Built With

(back to top)

How it works

HomePage

All the code for smart contract can be seen here. So as of now there are basic functions for usage-

Mint

  • To mint the tokens the custom tokens of specified value. The tokens are minted to the smart contract and the user is assigned its value using merkle maps.

Transfer

  • To transfer the tokens from one user to another. The tokens are transferred from one user to another by updating merkle map off-chain

Withdraw

  • To withdraw the tokens from the smart contract. The tokens are withdrawn from the smart contract by updating the merkle map off-chain and then the proof is generated and verified on-chain.

Update

  • To update the merkle map of the user. The merkle map is updated off-chain and then the proof is generated and verified on-chain.

These are the basic functionalities that we were able to implement during the hackathon. Being new to snarkyjs we had to work quite a lot to understand the concepts and implement them. We were able to implement the basic functionalities and we are looking forward to implement more functionalities in the future and implement off-chain and on-chain features for native tokens, storages, etc.

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g
  • Install the zk cli following the instructions from here

Installation

  1. Clone the repo
    git clone https://github.com/lordshashank/wiz-wallet.git
  2. Go to the contracts folder
    cd contracts
  3. Install NPM packages
    npm install
  4. Run the build command to build js files from the snarky files
    npm run build
  5. Run the local off-chain server
    node node_modules/experimental-zkapp-offchain-storage/build/src/storageServer.js
  6. Run various scripts to deploy and interact with the smart contract
    node build/src/main
    similarly frontend could also be run to test it.

(back to top)

Usage

This dapp can be used to make daily transactions on any custom tokens on the mina blockchain. It ensures less on-chain interactions for every small transaction and hence reduces the gas fees. The transactions are only done when the user wants to withdraw the tokens from the wallet. We look forward to implement this for the mainnet and also for the native tokens along with features that could be quite useful for the users.

For more examples, please refer to the Documentation

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @0xlord_forever - shashanktrivedi1917@gmail.com

Project Link: https://github.com/lordshashank/wiz-wallet

(back to top)

Acknowledgments

  • Mina for the amazing hackathon.
  • Also, thanks to the mina discord community for helping us out during the hackathon.

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published