Open-Sourced UI
Dive into our open-source frontend and learn how our UI interacts with Solana!
Objective: focus here is on Solana specific code and not so much on react or css
**Note: If you are looking to integrate Friktion with your protocol, go here instead!
Getting Started
Download the repo here: https://github.com/Friktion-Labs/frontend
Ok, let's dive in.
An important concept this UI uses is a waterfall style data flow. As many UI components have dependencies such as price of assets, user deposit info, and Volt specific data, we need a way to propagate this data based on dependency.
More Important files
registry10.tsx - Contains important metadata
AppProviders.tsx - View all the providers as well as see how we use @solana/wallet-adapter-wallets
EvilTwinSisterOfVFAC.tsx - UserDeposits10.tsx actually depends on this file for depositedForAssets
and vaultsForAssets
OwnedTokenAccounts.tsx - Load connected wallet's tokens
transactionHandler.ts - Where the actual use of Friktion's SDK is to deposit/withdraw/etc
Important Patterns
You will notice AsyncButton09
includes goodies
object which is what those functions in transactionHandler.ts
require to perform a transaction.
Sail is a React library for Solana account management and transaction handling. You can also see the use of sail when fetching Volt data in SubvoltLoader10.tsx
Last updated