In the post, I walk you through step by step of illustrating the new pStore’s functionalities along with pMultisig - the first pApp listed on pStore.
pMultisig is an independent privacy application hosting on a separate domain (https://psafe.app). In my design, any developers can develop their own pApps for Incognito with ease by integrating with pStore in order to reuse heavy and repetitive works (i.e. SHIELD, DEPLOY, UNDEPLOY, and UNSHIELD). And from the end-user side, wallets and balances could be used seamlessly between pStore and the integrated pApps (as long as the pApps opening on the same browser).
I’m going to write up and publish a series of posts to explain the technical underneath in detail so that developers can get how to build a pApp for Incognito via my platform. Here pMultisig is just a sample pApp, imagine how cool it is if you can build your own pKyber, pUniswap, etc only with pretty small development effort
Note: if somebody wants to experience my platform then feel free to ping me, I’ll give you a couple of accounts having some tokens so that you can give it a try quickly.
Pre-requires
As you could know, pMultisig wallet is an application that requires the signatures of multiple people before the funds can be withdrawn (or transferred) so in this illustration, we need to create 2 wallets (each will comprise a couple of account types - a.k.a Ethereum account and Incognito account).
From https://pstore.app, you can go to BALANCES page to create or import both Ethereum account (notice: the account should have some Ether for paying fee when interacting with Incognito contract) and Incognito account.
Once you create or import an Incognito account successfully, a new Ethereum account would also be generated. This account will be used for deploying pToken to and spending the deployed Token from on pApps, you can see its role on pMultisig app in a moment.
For me, I created 2 accounts respectively as follows:
The generated Ethereum account with address 0x98e83309d307dcc345aa109956b6e9c59a94c1d3
Similarly, you can create or import the second wallet on another browser and the generated Ethereum address would be: 0x7cd85e739232a9f84dbc3a5b5f6cbb0a94a2c971
Now I have everything ready for seamlessly experiences from pStore to pMultisig.
Shield
Go to SHIELD page to turn 0.2 Ether into 0.2 pEther.
The process status would be updated automatically. If everything goes okay then you would see the following screen with a CHECK BALANCES button after waiting for a while.
Press CHECK BALANCES button to navigate to BALANCES page for checking shielded Ether (pETH) balance
Deploy
Go to DEPLOY page to deploy 0.2 pEther just shielded onto Incognito smart contract and you should be able to use the deployed tokens on any pApps. In this case, it’s pMultisig.
Wait for a while and press DEPLOY button to submit the deploy proof to Incognito contract.
If everything goes okay then you would see a screen with a CHECK BALANCES button.
Press CHECK BALANCES button to go to BALANCES page for checking deployed pEther balance
pMultisig
From pStore’s APPS menu item, you can see the integrated pApp with pStore. Click on pMultisig to open the app (at https://psafe.app)
Tap on the Person icon on pMultisig app, you can see the deployed Ethereum address along with its deployed balances in the previous step.
Press New Wallet button to create a new multisig wallet with 2 owners: 0x98e83309d307dcc345aa109956b6e9c59a94c1d3 and 0x7cd85e739232a9f84dbc3a5b5f6cbb0a94a2c971.
These are the generated Ethereum accounts in earlier steps. The wallet requires 2/2 signatures to be able to withdraw funds from it.
After the wallet is created successfully (Wallet ID - 2), it’ll be listed on the wallet list.
You can tap on the wallet row to see wallet detail along with its balances.
Press Fund button to send 0.01 deployed USDC to the wallet.
After funded, you can see the wallet’s USDC balance as well as the deployed account’s remaining USDC balance.
Press Withdraw button to make a withdrawal request (0.01 USDC) to the wallet’s owners.
After the withdrawal request made, wallet status would update to Pending
Here the requester address is 0x98e83309d307dcc345aa109956b6e9c59a94c1d3 so it only needs signature of the second owner (0x7cd85e739232a9f84dbc3a5b5f6cbb0a94a2c971) to be able to take requested funds from the wallet.
At this point, if the second owner (0x7cd85e739232a9f84dbc3a5b5f6cbb0a94a2c971) opens the pMultisig app and goes to SIGN page then he would see the withdrawal request above. He can either approve or reject.
When the withdrawal is approved, wallet status would update to Submit
Press Submit button to withdraw 0.01 USDC from the wallet to the deployed account (0x98e83309d307dcc345aa109956b6e9c59a94c1d3)
Undeploy
Go to UNDEPLOY page to undeploy 0.03 deployed USDC from the deployed account to Incognito account.
The process status would be updated automatically. If everything goes okay then you would see the following screen with a CHECK BALANCES button after waiting for a while.
Press CHECK BALANCES button to navigate to BALANCES page for checking undeployed Ether (pUSDC) balance
Unshield
Go to UNSHIELD page to turn 0.03 pUSDC to USDC and send to the original Ethereum account (0x3ea83820b473368df77ae02e65a8607b901e96cd)
Wait for a while and press UNSHIELD button to submit the unshield proof to Incognito contract.
If everything goes okay then you would see a screen with a CHECK BALANCES button.
Press CHECK BALANCES button to go to BALANCES page for checking unshielded Ether balance
Happy building!