In this chapter, we will implement the methods to check the balances in the main chain and Plasma chain.
Let's see if you deposited successfully!
4-1. Implement to get your L2 balance
Just call the
getBalance function of the plasma light client to easily check your balance.
4-2. Implement to get your L1 balance
In order to make sure that your main chain balance has been properly reduced after the deposit, you should also prepare a method to obtain the main chain balance.
4-3. Add getBalance functions to the CLI
To call the
getBalance function in the CLI Wallet, add some processing to the ReadLine.
4-4. Check your L2 balance
Launch the CLI Wallet and check your balance of Layer2!
Start the app with the node command and try
4-5. Check your L1 balance
Also, check your balance in the main chain was reduced.
Current source code
Go to the next step!
Now that you've checked your balance and confirmed that the token has been properly deposited to Plasma, right?
In the next chapter, we'll be transferring tokens on Plasma!
Move on to the 5. Transfer step.