This project demonstrates how to use the Garden SDK to create a simple dApp for swapping from WBTC to BTC.
Note
For better developer experience, we are conducting the swap on a local network, but you can do the same on Testnet or Mainnet by changing the parameters.
- Merry : Provides a comprehensive environment for multichain operations.
- Swap Interface: Easily swap from WBTC to BTC.
- Transaction Management: Track and display the latest transactions.
- Garden SDK Integration: Uses Garden SDK to make the swap possible.
- State Management: We use zustand for state management.
To improve the developer experience, we will be using Merry to set up the multichain environment necessary for performing a swap. This setup includes all essential components such as the Orderbook, Filler, Faucet, and nodes for Bitcoin, Ethereum, and Arbitrum.
- Install Merry
curl https://get.merry.dev | bash
- Start Merry
# Start Merry with explorer
merry go
or
# Start Merry without explorer
merry go --headless
- Fund your EVM address
merry faucet --to <EVM Address>
- Clone the repository
git clone https://github.com/gardenfi/demo-app
cd demo-app
- Install dependencies
bun install
- Run the development server
bun run dev
The dApp should look something like this