Playground


Please try in local when the server is busy :)

You can use Zkopru Playground to try the CLI wallet in a sandbox environment. It simply serves the CLI applications using the web interface through GoTTY. Note that the playground server may not be available due to the limited resources. If the server has any problem, please run it in your local environment using docker.


docker run -it zkoprunet/playground:latest

If you find any bug when using the playground, please report it through Github.



Sandbox demo


Instruction

Configure your accounts

  1. The password for your wallet is helloworld.
  2. Select "create a new account". You will see the new Ethereum account "0xffcf8..."
  3. Select the new account "0xffcf8..."
You can see the account "0xffc8..." has a babyjubjub public key "0x1b7a4a..."for Zkopru.

Deposit

We will send 3.3 Ethers from the 1st account to the 2nd account. To send ETH on the layer 2, you must deposit your ETH first.
  1. Select "Go to top menu" and then select the first account.
  2. Select "Deposit"
  3. Select "Ether"
  4. Type 10 ETH for your new deposit
  5. Type 0.1 ETH ETH for the fee. And press "y" to proceed.

Wait a few seconds for new block proposing.

Transfer

  1. Go to "Transfer" menu, and now you can see that you have 10 ETH for your balance on the layer 2.
  2. Select "Ether" to transfer.
  3. Copy and paste this babyjubjub public key for the second account 0x1b7a4a17377f17dcd254e69b4e51c761ee0b2c3953b14e168f7eaf4bea9e1cab
  4. Type 3.3 ETH to transfer.
  5. Type 100000 gwei for the fee per byte. The background coordinator will generate a new block since you've offered enough fee for block proposing.
  6. Wait until it creates the SNARK and send transaction to the coordinator.

Check transfer result

  • Once the transaction goes to the coordinator you can see that your ETH is locked for the transaction.
  • Wait for the new block that includes your transaction for about 30 seconds.
  • Select "Go back" and select "Transfer" again to check your transaction is executed.
  • If you see that it updates the 1st account's balance, go back and select the 2nd account.
  • And then, it should say that there is 3.3 ETH for the 2nd account on the layer 2.

Withdraw request

  1. Finally, go back to the menu and select "Withdrawal request".
  2. You can see "Withdraw Ether (balance: 3.3 ETH / locked: 0 ETH)" menu. Please select that item.
  3. Please copy and paste the 2nd account's address 0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0.
  4. Type 1 ETH for the amount that you want to withdraw out.
  5. Type 100000 gwei for the fee per byte. It is also to give enough fee for the coordinator to generate a block immediately.
  6. Type 0 for instant withdrawal fee. It means we will wait the block finalization.

And then we'll wait the network to generate and finalize the block that includes your withdrawal request. You may need to wait about a minute in this demo. In the main network, it will spend about 7 days for its finalization. But, don't worry too much :) Zkopru will provide instant withdrawal feature soon.

Withdraw out

  1. After waiting enough seconds, select "Withdraw out" menu to see the withdrawable notes.
  2. Select the 1 ETH note and withdraw out the note to the layer 1 network.

Do you want more details?