The app allows users to ape into random token from selected sector for amount and token of their choice.
it uses React, Next.js, Wagmi, Privy, Chakra-UI, and @ensofinance/sdk-ts
to access Enso API.
- NEXT_PUBLIC_ENSO_API_KEY: API key for Enso Finance.
- NEXT_PUBLIC_PRIVY_KEY: API key for Privy.
pnpm dev
- State Management: Manages the state for
swapValue
,tokenIn
andrandomMeme
- Token Approval:Validates user allowance and prepares approval data
- Quoting: Uses sdk to get swap quote even in case user doesn't have
balance
/allowance
. - Swapping: Sends a transaction to swap tokens with data received from
/route
. - Token List: Retrieves token information from a list.
- UI: Renders essential UI elements and components
- WalletButton: Connects the user's wallet.
- TokenSelector: Allows users to select a token from a list.
- useEnsoApprove: Used to get approval data for a token.
- useEnsoQuote: Used to get a quote for a token swap.
- useEnsoRouterData: Used to get router data for a token swap.
- useTokenList: Used to get a list of tokens.
- useErc20Balance: Used to get the balance of an ERC20 token.
- useAllowance: Used to get the allowance of an ERC20 token.
- useApprove: Used to approve an ERC20 token.
- other app specific functions to handle txs progress tracking