Skip to content

Development environment for the Partisia Blockchain, made for creating applications and smart contracts.

Notifications You must be signed in to change notification settings

RedScouser/dapp-playground-partisia

 
 

Repository files navigation

The DApp Playground for Partisia Blockchain

This a development environment for the Partisia Blockchain, made for creating applications and smart contracts utilizing the Zk Rust and public blockchain.

Read the documentation to better understand the fundamentals of the Partisia Blockchain

The repo contains two simple smart contracts with simple front-ends: The petition contract and the average salary contract This is provided in a codespace, where all the tooling needed for developing smart contracts and front-ends is installed.

To develop in your browser create a codespace for a repository, select the main branch. You can read more here

Inside the codespace you can run predefined tasks by pressing Ctrl+Shift+B.

It is an Automated setup

To interact with the Partisia Blockchain you need an account with gas. The codespace automatically provides you with three new accounts, Account-A.pk, Account-B.pk and Account-C.pk.

The created accounts have test_coins pre-minted which gives you 100.000.000 gas on the Testnet to interact, deploy and play around with as part of the codespace. You can continue using these outside of the codespace, just remember the private keys, because they are not saved when you delete the codespace.

Read how addresses works for accounts and smart contracts.

It is your own online personalized DApp playground

To use the codespace to develop your own DApps, fork the repository. On the fork you can modify the contract- and client code, to make your own DApp. To save your changes, use git to commit those changes to your forked repository.

Read about using codespaces in a forked repository here.

When forking the repository you can drastically decrease boot up time for new dev containers by configuring prebuilds.

If you want to do local development read the dev container documentation.

Try, Learn and Interact with Partisia Blockchain

We have included 2 challenge-based tutorials as part of your codespace, to help you learn and experiment.

The first one explores the Petition example application, showing how to collect signatures for showing interests in making specific changes in the world. The application consists of a smart contract written in Rust and a web frontend written in TypeScript.

The second one explores the Average Salary example application, showing how to compute the average salary of a group, without revealing the salary of any individual. This example uses the superpower of Partisia Blockchain, Zk contracts. The application consists of a smart contract written in Rust and Zk Rust and a web frontend written in TypeScript.

If you want to know more about the blockchain, ZK Rust or just contracts in general, we urge you to visit our documentation and participate in our active community on Discord.

About

Development environment for the Partisia Blockchain, made for creating applications and smart contracts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 82.9%
  • HTML 7.2%
  • Rust 6.4%
  • JavaScript 2.9%
  • Other 0.6%