DApp Client Tutorial
มาเรียนรู้วิธีการเขียนโปรแกรมเชื่อมต่อกับบล็อกเชน และ Smart Contract กันเถอะ
Let's learn how to develop a software connecting to Blockchains and Smart Contracts.
git clone https://github.com/earthchie/DApp-Client-Tutorial/
cd ./DApp-Client-Tutorial
npm i
Resources
BSC RPC list https://docs.binance.org/smart-chain/developer/rpc.html
BSCScan Testnet https://testnet.bscscan.com/
Faucet (Free BNB for Testnet) https://testnet.binance.org/faucet-smart
DEX Testnet (PancakeSwap & BekerySwap) https://bsc.kiemtienonline360.com/
Chapters
1. Hello World
บทเรียนนี้ผู้เรียนจะได้ศึกษาวิธีเชื่อมต่อกับบล็อกเชนผ่าน RPC อ่านข้อมูล Block Number และสร้างกระเป๋าไว้ใช้งานในภายหลัง
In this chapter, you'll learn how to connect to blockchain RPC, get a block number, and create a wallet for future project.
2. Check BNB Balance
ในบทเรียนนี้ ผู้เรียนจะได้ศึกษาวิธีการเช็คยอดคงเหลือของเงินสกุล BNB ซึ่งเป็นเงินสกุลหลักบน Binance Smart Chain
In this chapter, you'll learn how to check a balance of BNB which is a native currency for Binance Smart Chain.
3. Check token balance
ในบทเรียนนี้ ผู้เรียนจะได้ศึกษาวิธีการเช็คยอดคงเหลือของโทเค ตามาตรฐาน ERC-20
In this chapter, you'll learn how to check a balance of ERC-20 token.
4. Transfer BNB
ในบทเรียนนี้ ผู้เรียนจะได้ศึกษาวิธีการเขียนโปรแกรมเชื่อมต่อเข้า TESTNET และเรียนรู้คำสั่งโอน BNB ไปยังกระเป๋าปลายทางที่กำหนด
In this chapter, you'll learn how to connect to TESTNET and learn how to transfer BNB to a specific recipient address.
5. Transfer Token
ในบทเรียนนี้ ผู้เรียนจะได้ศึกษาวิธีการโอนเหรียญ ERC-20 ไปยังกระเป๋าปลายทางที่กำหนด
In this chapter, you'll learn how to transfer ERC-20 token to a specific recipient address.
6. Get Exchange Rate
ในบทเรียนนี้ ผู้เรียนจะได้ศึกษาวิธีการหาอัตราแลกเปลี่ยน จากกระดาน DEX เช่น PancakeSwap
In this chapter, you'll learn how to get a exchange rate of tokens from DEX (e.g. PancakeSwap).
7. Monitoring Exchange Rate
ในบทเรียนนี้ ผู้เรียนจะได้ศึกษาวิธีการเฝ้าติดตามราคาของเหรียญที่สนใจ
In this chapter, you'll learn how to monitor the exchange rate of token, constantly.
8. Swapping Tokens (Buy & Sell)
ในบทเรียนนี้ ผู้เรียนจะได้ศึกษาวิธีการใช้คำสั่งแลกเปลี่ยนเหรียญบนกระดาน DEX
In this chapter, you'll learn how to swap tokens using DEX.
9. Simple Bot - Limit Order
ในบทเรียนนี้ ผู้เรียนจะได้มีโอกาสเขียนบอทอย่างง่าย เพื่อให้สร้างคำสั่งซื้อ/ขาย เหรียญ เมื่ออัตราแลกเปลี่ยนถึงราคาที่ต้องการ
In this chapter, you'll learn how to place a buy/sell limit order when the exchange rate is reach a specific price.
10. Simple Bot - Rebalancing
ในบทเรียนนี้ ผู้เรียนจะได้มีโอกาสเขียนบอท Rebalancing อย่างง่าย ซึ่งเป็นกลยุทธ์ที่มีประสิทธิภาพและมีความเสี่ยงปานกลาง
In this chapter, you'll learn how to create a Rebalancing bot. This strategy is efficient and has a moderate risk.