Following this document, you will be able to build secure and scalable Dapps using Plasma. For this quick start document using Typescript SDK, you need Node.js with the version higher than v.10.x.
- Python (for
- Node v10.x
1. Run test aggregator
Get Plasma aggregator from gazelle repository.
Contracts config file
config.local.json is generated at the root directory after
npm run docker:build if you have not installed them yet.
Create your application
Install the following libraries using npm to enable fund transfers in Plasma.
- A client for communication between Plasma and Application.
- A primitive type to be handled on OVM.
- A database used by the Client.
config.local.json file to your application repository root.
You can instantiate light client object using Wallet class of ethers.js.
Do you want to run client on browser? You can choose IndexedDb for client database.
3. Get balance
You can get balance on Plasma.
4. Deposit to Plasma
Let's say you want to deposit L1 token to Plasma. Plasma requires a contract to deposit L1 tokens to Plasma. You can get default Deposit Contract for ETH.
Deposit 10 wei to Plasma.
You can make your first Plasma transaction!
6. Withdraw assets from Plasma
Start withdraw your asset from Plasma.
After dispute period, you can withdraw your asset to Ethereum.