changed 2 years ago
Linked with GitHub

Tech Stack

  • NextJS/ReactJS
  • Chakra UI
  • Wallet Providers:
    • Send Wallet (POKT Network)
    • Wallet Connect (Ethereum)
    • Metamask / injected providers
  • Wagmi
  • Rainbowkit

Core Functions

  • Connect Wallet
    • POKT: Send Wallet
    • Ethereum: Metamask, wallet connect, etc.
    • Check wallets on both networks are connected before enabling bridge
  • Bridge from POKT to wPOKT
    • Check balance
    • Check valid Ethereum address
    • Format memo and prompt send transaction
    • Check ETH balance of Ethereum address is greater than gas cost
      • Prompt if low balance
    • Fetch Mint signature and prompt mint (if pending)
      • After POKT send transaction confirmation
      • On page load or refresh
    • Execute Mint of wPOKT with user's Ethereum address and EIP712 signature
  • Bridge from wPOKT to POKT
    • Check balance
    • Check allowance
    • Approve amount
    • Check ETH balance of Ethereum address is greater than gas cost
      • Prompt if low balance
    • Prompt "bridge" transaction
    • Execute burn of wPOKT and "bridge" to Pocket Network
  • Feedback
    • Fetch transaction confirmations (ETH and POKT)
    • Fetch Copper confirmation (if applicable)
    • Fetch bridging status from backend
    • Timeout
  • Error handling

UI Components

  • Wallet Connection
    • Button to connect wallet
    • One each to connect to POKT network and Ethereum network
    • Fetch and persist address(es) and balance(s) of wallet(s)
  • Bridge
    • Button to connect send wallet (if not already)
    • Form input for amount
    • Text display / input for recipient ETH address
      • Autofilled if ETH wallet already connected
    • Icon and input to change address
    • Button to approve wPOKT amount (Ethereum only)
    • Button to confirm transaction
    • Widget for pending transactions
      • For POKT => wPOKT:
        • Displays bridge status
        • Displays button for mint wPOKT transaction when prompted
      • For wPOKT => POKT:
        • Displays bridge status
  • Feedback
    • Display visual for processing bridge
    • Share links of tx receipts from etherscan and pocket explorer
    • Time estimate and warning text if taking longer than usual
    • Error handle display
Select a repo