Skip to content

0xJuancito/polytonal

Repository files navigation

Polytonal - For Encode x Harmony Hackathon

Screen Shot 2022-10-20 at 11 36 12

Harmony SDK & Covalent Usage

Features

Required by the hackathon

  • Use of the Harmony Marketplace SDK to integrate with the blockchain and the HRC standards
  • Use of Covalent APIs for getting wallet token and NFTs balances
  • Accept multiple wallet addresses entered by user
  • Retrieve all transaction details for the address over a period of time (default 1 month)
  • Retrieve all HRC20/721/1155 transactions that impact the user (e.g. transactions made by user and tokens transferred to the user, etc)
  • Show this information in a dashboard with ability to drill into each transaction (send user to explorer for more info)
  • Opensource (MIT / BSD) github
  • Working website that can be demonstrated: https://polytonal.vercel.app

Extra features

  • Unified portfolio for transactions, balances and NFTs
  • Support both Harmony One (one...) and Ethereum (0x...) addresses
  • Display HRC20 tokens balances detail for all tokens the user has
  • Display the total price of the HRC20 assets the user has
  • Display a collection of NFTs owned by the user
  • Link to NFT metadata
  • Link to the explorer for the wallet address used
  • Link to the explorer for the address that the wallet interacted with
  • Display other interactions like Approval, Transfer, Mint, Burn, etc
  • Custom wallet icons to distinguish addresses
  • Filter by date or get all transactions
  • Local storage cache for quickly loading once the data has been retrieved

Screen Shot 2022-10-20 at 11 38 24         Screen Shot 2022-10-20 at 11 41 15         Screen Shot 2022-10-20 at 11 38 15         Screen Shot 2022-10-20 at 11 38 03

Wallet Examples

Known Issues

ℹ️ Sometimes Covalent is down for NFTs or Tokens responses with an error message: Failed to connect to upstream third-party service. When that happens, NFTs or Token won't be able to show on their respective sections.

ℹ️ For some addresses with lots of assets/transactions, Covalent is not able to respondo from their API

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.