From 7b7285415eba9665a5d9342a6f39a28fa2bda9a3 Mon Sep 17 00:00:00 2001 From: omar-hgraph Date: Sat, 21 Feb 2026 05:11:10 +0200 Subject: [PATCH 1/3] docs(hedera-stats): add NFT collection ranking metrics documentation - Add ERC-721 smart contract NFT ranking documentation (PR #69) - Add HTS native NFT collection ranking documentation (PR #70) --- .../non-fungible-tokens/top-erc-nfts.md | 272 +++++++++++++++++ .../non-fungible-tokens/top-hts-nfts.md | 273 ++++++++++++++++++ 2 files changed, 545 insertions(+) create mode 100644 docs/hedera-stats/non-fungible-tokens/top-erc-nfts.md create mode 100644 docs/hedera-stats/non-fungible-tokens/top-hts-nfts.md diff --git a/docs/hedera-stats/non-fungible-tokens/top-erc-nfts.md b/docs/hedera-stats/non-fungible-tokens/top-erc-nfts.md new file mode 100644 index 0000000..2e4ec9b --- /dev/null +++ b/docs/hedera-stats/non-fungible-tokens/top-erc-nfts.md @@ -0,0 +1,272 @@ +--- +sidebar_position: 5 +title: Top ERC-721 Smart Contract NFTs +--- + +# Top ERC-721 Smart Contract NFT Collections + +## Overview +The Top ERC-721 NFT Collections statistic ranks the most active and valuable **ERC-721 smart contract** NFT collections on the Hedera network. This metric uses a composite scoring algorithm that balances financial activity (trading volume) with community engagement (transaction frequency) to identify the most significant collections in the ecosystem. + +:::note Hedera Data Access +To access this Hedera network statistic ([and others](/category/hedera-stats/)) via Hgraph's GraphQL & REST APIs, [get started here](https://www.hgraph.com/hedera). +::: + +Hedera Stat Name: **`top_non_fungible_tokens_erc`** + +## What are ERC-721 Collections? + +**ERC-721 (Ethereum Request for Comment)** is the standard smart contract interface for non-fungible tokens on the Hedera network. ERC-721 collections are **smart contracts deployed via Solidity** that manage NFTs with unique identifiers. Each NFT in an ERC-721 collection is a distinct token with its own metadata and ownership. + +## Methodology + +### Composite Scoring Algorithm + +The ranking algorithm evaluates each ERC-721 collection using a **weighted composite score** that combines two key metrics: + +``` +Composite Score = (Normalized Sales Volume × 0.60) + (Normalized Transaction Count × 0.40) +``` + +### Scoring Components + +| Component | Weight | Metric | Definition | +|-----------|--------|--------|------------| +| **Sales Volume** | 60% | HBAR traded | Total HBAR value exchanged within the collection during the evaluation period | +| **Transaction Activity** | 40% | Transaction count | Number of unique transactions involving the collection | + +### Min-Max Normalization + +Both metrics are normalized to a [0, 1] range to enable fair comparison: + +``` +normalized_value = (value - min_value) / (max_value - min_value) +``` + +This ensures that collections with vastly different scales are compared fairly. + +### Weighting Rationale + +- **60% Sales Volume**: Financial activity indicates real economic value, market demand, and liquidity +- **40% Transaction Activity**: High transaction count shows community engagement and active adoption + +### Time Window + +By default, rankings are calculated over a **72-hour rolling window** (configurable to 24h, 168h, 720h). This window balances capturing recent trends while avoiding short-term volatility. + +## Concentration Filter (Optional) + +To identify organic community collections vs. whale-dominated ones, an optional **concentration filter** identifies the proportion of transactions from the top 5 most active accounts: + +``` +Concentration Ratio = Top 5 Account Transactions / Total Transactions +``` + +The result is a ratio between **0 and 1** (e.g., 0.8 = 80% of transactions from top 5 accounts). + +**Usage**: Set `exclusion_threshold < 1.0` to filter out collections where concentration exceeds the threshold (e.g., 0.8 = exclude if top 5 accounts contribute >80% of transactions). + +## Data Sources + +| Source | Usage | +|--------|-------| +| `erc.token` | ERC-721 smart contract metadata (contract_type = 'ERC_721') | +| `erc.nft_transfer` | Transfer events (Transfer, Mint, Burn) | +| `crypto_transfer` | HBAR payment amounts linked to transfers | + +## Function Signature + +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_erc( + window_hours INTEGER DEFAULT 72, + result_limit INTEGER DEFAULT 50, + exclusion_threshold NUMERIC DEFAULT 1.0 +); +``` + +### Return Type + +| Field | Type | Description | +|-------|------|-------------| +| `rank` | INTEGER | Position in ranking (1 = highest score) | +| `token_id` | BIGINT | Hedera token ID of the ERC-721 contract | +| `token_evm_address` | TEXT | EVM address of the smart contract (0x...) | +| `collection_name` | TEXT | Name of the NFT collection | +| `sales_volume_hbar` | NUMERIC | Total HBAR trading volume in period | +| `transaction_count` | BIGINT | Number of transactions in period | +| `unique_accounts` | BIGINT | Count of distinct accounts trading | +| `normalized_volume` | NUMERIC | Volume metric normalized to [0,1] | +| `normalized_transactions` | NUMERIC | Transaction count normalized to [0,1] | +| `composite_score` | NUMERIC | Final weighted score (0-1) | +| `volume_contribution` | NUMERIC | Volume component (normalized_volume × 0.6) | +| `tx_contribution` | NUMERIC | Transaction component (normalized_tx × 0.4) | +| `concentration_ratio` | NUMERIC | % of transactions from top 5 accounts | + +## GraphQL API Examples + +Test out these queries using our [developer playground](https://dashboard.hgraph.com). + +### Fetch top 10 ERC-721 collections (last 72 hours) + +```graphql +query TopERC721Collections { + top_nft_collections_erc: ecosystem_top_non_fungible_tokens_erc( + args: {window_hours: 72, result_limit: 10, exclusion_threshold: 1.0} + ) { + rank + collection_name + token_evm_address + sales_volume_hbar + transaction_count + composite_score + } +} +``` + +### Fetch top collections with concentration filter (organic communities) + +```graphql +query OrganicERC721Collections { + top_nft_collections_erc: ecosystem_top_non_fungible_tokens_erc( + args: {window_hours: 72, result_limit: 50, exclusion_threshold: 0.8} + ) { + rank + collection_name + sales_volume_hbar + transaction_count + concentration_ratio + composite_score + } +} +``` + +### Compare 24-hour vs 7-day trends + +```graphql +query CompareERC721Trends { + last_24h: ecosystem_top_non_fungible_tokens_erc( + args: {window_hours: 24, result_limit: 20, exclusion_threshold: 1.0} + ) { + rank + collection_name + sales_volume_hbar + } + last_7days: ecosystem_top_non_fungible_tokens_erc( + args: {window_hours: 168, result_limit: 20, exclusion_threshold: 1.0} + ) { + rank + collection_name + sales_volume_hbar + } +} +``` + +### Analyze normalized score components + +```graphql +query ScoreComponentBreakdown { + erc721_collections: ecosystem_top_non_fungible_tokens_erc( + args: {window_hours: 72, result_limit: 25, exclusion_threshold: 1.0} + ) { + rank + collection_name + normalized_volume + normalized_transactions + volume_contribution + tx_contribution + composite_score + } +} +``` + +## Sample Output (Testnet - 72-hour window) + +``` + rank | collection_name | sales_volume_hbar | transaction_count | composite_score +------+-----------------+-------------------+-------------------+----------------- + 1 | MedicineRiskUnit| 202.15 | 10 | 1.0000 + 2 | TestNFT | 0.44 | 8 | 0.3118 + 3 | TestNFT | 0.44 | 8 | 0.3118 + 4 | TestNFT | 0.44 | 8 | 0.3118 + 5 | TestNFT | 0.44 | 8 | 0.3118 +``` + +## Usage Examples + +### Recommended Default (Top 50, 72-hour window) +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_erc(72, 50, 1.0); +``` + +### Alternative Time Windows + +**Last 24 Hours (Real-time Trends)** +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_erc(24, 50, 1.0); +``` + +**Last 7 Days (Weekly Trends)** +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_erc(168, 50, 1.0); +``` + +**Last 30 Days (Monthly Performance)** +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_erc(720, 50, 1.0); +``` + +### Enable Concentration Filter (Organic Communities Only) + +Exclude collections where the top 5 accounts contribute >80% of transactions: + +```sql +SELECT + rank, + collection_name, + sales_volume_hbar, + concentration_ratio +FROM ecosystem.top_non_fungible_tokens_erc(72, 50, 0.8) +WHERE concentration_ratio <= 0.8 +ORDER BY rank; +``` + +## Comparison with HTS NFTs + +| Aspect | ERC-721 | HTS Native | +|--------|---------|-----------| +| **Standard** | Smart contract interface | Hedera Token Service | +| **Created Via** | Solidity contracts | HTS tokens (NON_FUNGIBLE_UNIQUE) | +| **Data Schema** | `erc` schema | `public.token` table | +| **Contract Address** | EVM address (0x...) | Not applicable | +| **Flexibility** | High (custom logic) | Standard HTS features | +| **Use Cases** | Complex NFTs, DeFi integration | Native Hedera NFTs | + +## Important Notes + +- Sender account transfers are excluded from sales volume calculations (only positive inflows to recipients counted) +- Zero volume collections are included in rankings (scored by transaction count alone) +- Ranking is deterministic: secondary sorting by transaction count, then sales volume +- Normalization is recalculated independently for each query (not cached) +- All timestamps use nanosecond precision (Hedera timestamp9 format) + +## SQL Implementation + +The SQL function `ecosystem.top_non_fungible_tokens_erc()` is implemented with: +- Min-max normalization for fair value comparison +- CTE-based query composition for readability and maintainability +- PLPGSQL for parameterized execution +- Concentration filter via window functions + +**[View GitHub Repository →](https://github.com/hgraph-io/hedera-stats)** + +## Related Metrics + +- [Top HTS NFT Collections](/hedera-stats/non-fungible-tokens/top-hts-nfts) - Native Hedera NFTs +- [NFT Collection Sales Volume](/hedera-stats/non-fungible-tokens/nft-collection-sales-volume) - Period sales volume +- [NFT Collection Sales Volume (Total)](/hedera-stats/non-fungible-tokens/nft-collection-sales-volume-total) - Cumulative sales + +## Dependencies +* Hedera mirror node +* `erc.token` table with ERC-721 contract metadata +* `erc.nft_transfer` table with transfer events +* `crypto_transfer` table for HBAR values diff --git a/docs/hedera-stats/non-fungible-tokens/top-hts-nfts.md b/docs/hedera-stats/non-fungible-tokens/top-hts-nfts.md new file mode 100644 index 0000000..a17b3ba --- /dev/null +++ b/docs/hedera-stats/non-fungible-tokens/top-hts-nfts.md @@ -0,0 +1,273 @@ +--- +sidebar_position: 4 +title: Top HTS Native NFTs +--- + +# Top HTS Native NFT Collections + +## Overview +The Top HTS NFT Collections statistic ranks the most active and valuable **Hedera Token Service (HTS) native** NFT collections on the Hedera network. This metric uses a composite scoring algorithm that balances financial activity (trading volume) with community engagement (transaction frequency) to identify the most significant native NFT collections in the ecosystem. + +:::note Hedera Data Access +To access this Hedera network statistic ([and others](/category/hedera-stats/)) via Hgraph's GraphQL & REST APIs, [get started here](https://www.hgraph.com/hedera). +::: + +Hedera Stat Name: **`top_non_fungible_tokens_hts`** + +## What are HTS NFTs? + +**Hedera Token Service (HTS)** is Hedera's native token service for creating and managing both fungible and non-fungible tokens. HTS NFTs with type `NON_FUNGIBLE_UNIQUE` represent unique, indivisible tokens created directly on Hedera without requiring a smart contract. Each NFT is identified by a unique token ID in Hedera's format (0.0.X). + +## Methodology + +### Composite Scoring Algorithm + +The ranking algorithm evaluates each HTS NFT collection using a **weighted composite score** that combines two key metrics: + +``` +Composite Score = (Normalized Sales Volume × 0.60) + (Normalized Transaction Count × 0.40) +``` + +### Scoring Components + +| Component | Weight | Metric | Definition | +|-----------|--------|--------|------------| +| **Sales Volume** | 60% | HBAR traded | Total HBAR value exchanged within the collection during the evaluation period | +| **Transaction Activity** | 40% | Transaction count | Number of unique transactions involving the collection | + +### Min-Max Normalization + +Both metrics are normalized to a [0, 1] range to enable fair comparison: + +``` +normalized_value = (value - min_value) / (max_value - min_value) +``` + +This ensures that collections with vastly different scales are compared fairly. + +### Weighting Rationale + +- **60% Sales Volume**: Financial activity indicates real economic value, market demand, and liquidity +- **40% Transaction Activity**: High transaction count shows community engagement and active adoption + +### Time Window + +By default, rankings are calculated over a **72-hour rolling window** (configurable to 24h, 168h, 720h). This window balances capturing recent trends while avoiding short-term volatility. + +## Concentration Filter (Optional) + +To identify organic community collections vs. whale-dominated ones, an optional **concentration filter** identifies the proportion of transactions from the top 5 most active accounts: + +``` +Concentration Ratio = Top 5 Account Transactions / Total Transactions +``` + +The result is a ratio between **0 and 1** (e.g., 0.8 = 80% of transactions from top 5 accounts). + +**Usage**: Set `exclusion_threshold < 1.0` to filter out collections where concentration exceeds the threshold (e.g., 0.8 = exclude if top 5 accounts contribute >80% of transactions). + +## Data Sources + +| Source | Usage | +|--------|-------| +| `public.token` | HTS token metadata (type = 'NON_FUNGIBLE_UNIQUE') | +| `transaction` | NFT transfer events (nft_transfer JSONB field) | +| `crypto_transfer` | HBAR payment amounts linked to transfers | + +## Function Signature + +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_hts( + window_hours INTEGER DEFAULT 72, + result_limit INTEGER DEFAULT 50, + exclusion_threshold NUMERIC DEFAULT 1.0 +); +``` + +### Return Type + +| Field | Type | Description | +|-------|------|-------------| +| `rank` | INTEGER | Position in ranking (1 = highest score) | +| `token_id` | BIGINT | Hedera HTS token ID (0.0.X format) | +| `collection_name` | TEXT | Name of the NFT collection | +| `sales_volume_hbar` | NUMERIC | Total HBAR trading volume in period | +| `transaction_count` | BIGINT | Number of transactions in period | +| `unique_accounts` | BIGINT | Count of distinct accounts trading | +| `normalized_volume` | NUMERIC | Volume metric normalized to [0,1] | +| `normalized_transactions` | NUMERIC | Transaction count normalized to [0,1] | +| `composite_score` | NUMERIC | Final weighted score (0-1) | +| `volume_contribution` | NUMERIC | Volume component (normalized_volume × 0.6) | +| `tx_contribution` | NUMERIC | Transaction component (normalized_tx × 0.4) | +| `concentration_ratio` | NUMERIC | % of transactions from top 5 accounts | + +## GraphQL API Examples + +Test out these queries using our [developer playground](https://dashboard.hgraph.com). + +### Fetch top 10 HTS NFT collections (last 72 hours) + +```graphql +query TopHTSNFTCollections { + top_nft_collections_hts: ecosystem_top_non_fungible_tokens_hts( + args: {window_hours: 72, result_limit: 10, exclusion_threshold: 1.0} + ) { + rank + collection_name + sales_volume_hbar + transaction_count + composite_score + } +} +``` + +### Fetch top collections with concentration filter (organic communities) + +```graphql +query OrganicHTSCollections { + top_nft_collections_hts: ecosystem_top_non_fungible_tokens_hts( + args: {window_hours: 72, result_limit: 50, exclusion_threshold: 0.8} + ) { + rank + collection_name + sales_volume_hbar + transaction_count + concentration_ratio + composite_score + } +} +``` + +### Compare 24-hour vs 7-day HTS trends + +```graphql +query CompareHTSTrends { + last_24h: ecosystem_top_non_fungible_tokens_hts( + args: {window_hours: 24, result_limit: 20, exclusion_threshold: 1.0} + ) { + rank + collection_name + sales_volume_hbar + } + last_7days: ecosystem_top_non_fungible_tokens_hts( + args: {window_hours: 168, result_limit: 20, exclusion_threshold: 1.0} + ) { + rank + collection_name + sales_volume_hbar + } +} +``` + +### Analyze normalized score components + +```graphql +query HTSScoreComponentBreakdown { + hts_collections: ecosystem_top_non_fungible_tokens_hts( + args: {window_hours: 72, result_limit: 25, exclusion_threshold: 1.0} + ) { + rank + collection_name + normalized_volume + normalized_transactions + volume_contribution + tx_contribution + composite_score + } +} +``` + +## Sample Output (Mainnet - 72-hour window) + +``` + rank | token_id | collection_name | sales_volume_hbar | transaction_count | composite_score +------+------------+------------------------------+-------------------+-------------------+----------------- + 1 | 728613 | Dead Pixels Ghost Club | 24727.40 | 1273 | 1.0000 + 2 | 731861 | Degen Street Bets | 8953.79 | 623 | 0.5274 + 3 | 540588 | Shillers Avatars By Whales | 7291.18 | 421 | 0.4187 + 4 | 902600 | Lazy Apepes | 5612.34 | 389 | 0.3522 + 5 | 567821 | Earthlings. | 4823.91 | 356 | 0.3089 +``` + +## Usage Examples + +### Recommended Default (Top 50, 72-hour window) +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_hts(72, 50, 1.0); +``` + +### Alternative Time Windows + +**Last 24 Hours (Real-time Trends)** +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_hts(24, 50, 1.0); +``` + +**Last 7 Days (Weekly Trends)** +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_hts(168, 50, 1.0); +``` + +**Last 30 Days (Monthly Performance)** +```sql +SELECT * FROM ecosystem.top_non_fungible_tokens_hts(720, 50, 1.0); +``` + +### Enable Concentration Filter (Organic Communities Only) + +Exclude collections where the top 5 accounts contribute >80% of transactions: + +```sql +SELECT + rank, + collection_name, + sales_volume_hbar, + concentration_ratio +FROM ecosystem.top_non_fungible_tokens_hts(72, 50, 0.8) +WHERE concentration_ratio <= 0.8 +ORDER BY rank; +``` + +## Comparison with ERC-721 NFTs + +| Aspect | HTS Native | ERC-721 | +|--------|-----------|---------| +| **Standard** | Hedera Token Service | Smart contract interface | +| **Created Via** | HTS tokens (native) | Solidity contracts | +| **Data Schema** | `public.token` table | `erc` schema | +| **Token ID Format** | 0.0.X (Hedera format) | EVM address (0x...) | +| **Flexibility** | Standard HTS features | High (custom logic) | +| **Use Cases** | Native Hedera NFTs | Complex NFTs, DeFi integration | + +## Important Notes + +- Multi-NFT transactions are handled by proportionally dividing HBAR amounts by NFT count +- Zero volume collections are included in rankings (scored by transaction count alone) +- Treasury account transactions are excluded from volume calculations +- Ranking is deterministic: secondary sorting by transaction count, then sales volume +- Normalization is recalculated independently for each query (not cached) +- All timestamps use nanosecond precision (Hedera timestamp9 format) + +## SQL Implementation + +The SQL function `ecosystem.top_non_fungible_tokens_hts()` is implemented with: +- Min-max normalization for fair value comparison +- CTE-based query composition for readability and maintainability +- PLPGSQL for parameterized execution +- Concentration filter via window functions +- JSONB array parsing of `nft_transfer` field via `jsonb_array_elements()` +- Multi-NFT transaction HBAR splitting (`hbar_tinybar / nft_count`) + +**[View GitHub Repository →](https://github.com/hgraph-io/hedera-stats)** + +## Related Metrics + +- [Top ERC-721 NFT Collections](/hedera-stats/non-fungible-tokens/top-erc-nfts) - Smart contract NFTs +- [NFT Collection Sales Volume](/hedera-stats/non-fungible-tokens/nft-collection-sales-volume) - Period sales volume +- [NFT Collection Sales Volume (Total)](/hedera-stats/non-fungible-tokens/nft-collection-sales-volume-total) - Cumulative sales + +## Dependencies +* Hedera mirror node +* `public.token` table (HTS tokens with type = 'NON_FUNGIBLE_UNIQUE') +* `transaction` table with nft_transfer JSONB field +* `crypto_transfer` table for HBAR values From 81a2a45ff64664eea4db96d61d09d056685e8e32 Mon Sep 17 00:00:00 2001 From: omar-hgraph Date: Sat, 21 Feb 2026 05:12:08 +0200 Subject: [PATCH 2/3] docs(hedera-stats): add ERC-1155 multi-token adoption tracking - Add Total ERC-1155 Accounts metric documentation (PR #71) --- .../evm/total-erc1155-accounts.md | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 docs/hedera-stats/evm/total-erc1155-accounts.md diff --git a/docs/hedera-stats/evm/total-erc1155-accounts.md b/docs/hedera-stats/evm/total-erc1155-accounts.md new file mode 100644 index 0000000..9adf4ec --- /dev/null +++ b/docs/hedera-stats/evm/total-erc1155-accounts.md @@ -0,0 +1,156 @@ +--- +sidebar_position: 4 +title: Total ERC-1155 Accounts +--- + +# Total ERC-1155 Accounts: Multi-Token Standard Holders + +## Overview +The Total ERC-1155 Accounts statistic tracks the cumulative number of unique accounts holding ERC-1155 (multi-token standard) tokens on the Hedera network. This metric provides insights into the adoption of multi-token contracts by monitoring rolling totals of unique token holders over time. + +:::note Hedera Data Access +To access this Hedera network statistic ([and others](/category/hedera-stats/)) via Hgraph's GraphQL & REST APIs, [get started here](https://www.hgraph.com/hedera). +::: + +Hedera Stat Name: **`total_erc1155_accounts`** + +## Methodology + +- **Data Source:** Hedera mirror node contract logs +- **Event Tracking:** + - Monitors `TransferSingle` events (topic: `0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62`) + - Monitors `TransferBatch` events (topic: `0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb`) +- **Holder Identification:** Extracts the recipient address from event topic3 (bytea encoding with variable length support) +- **Aggregation:** + - Identifies first receipt timestamp for each unique holder address + - Computes rolling totals per period (hour, day, week, month, quarter, year) + - Baseline includes all holders from before the time window +- **Exclusions:** + - Zero address (`0x0000000000000000000000000000000000000000`) excluded (mints/burns) + - Addresses that later transfer away all tokens are still included in the cumulative count + +## Data Representation + +Each period represents the cumulative total of unique accounts that have ever received ERC-1155 tokens as of the period end. This metric demonstrates growing adoption of multi-token standards on Hedera. + +``` +Period Start | Period End | Total Accounts +---|---|--- +2025-11-01 | 2025-11-08 | 469 +2025-11-08 | 2025-11-15 | 470 +2025-11-15 | 2025-11-22 | 472 +2025-11-22 | 2025-11-29 | 473 +2025-11-29 | 2025-12-06 | 474 +``` + +## Additional Notes + +- ERC-1155 is the multi-token standard that allows contracts to issue both fungible (ERC-20 like) and non-fungible (ERC-721 like) tokens from a single contract +- This metric provides a cumulative view of unique holders +- The account count represents unique addresses that have received tokens; the count is preserved even if accounts later transfer away all holdings +- Data is continuously updated via automated pg_cron jobs at various granularities (hour, day, week, month, quarter, year) +- This metric integrates seamlessly with Hedera's existing token analytics infrastructure + +## GraphQL API Examples + +Test out these queries using our [developer playground](https://dashboard.hgraph.com). + +### Fetch weekly total ERC-1155 accounts (last 12 weeks) + +```graphql +query ERC1155WeeklyTotals { + metric: ecosystem_metric( + where: {name: {_eq: "total_erc1155_accounts"}, period: {_eq: "week"}} + order_by: {end_date: desc_nulls_last} + limit: 12 + ) { + total + start_date + end_date + } +} +``` + +### Fetch daily total ERC-1155 accounts (last 30 days) + +```graphql +query ERC1155DailyTotals { + metric: ecosystem_metric( + where: {name: {_eq: "total_erc1155_accounts"}, period: {_eq: "day"}} + order_by: {end_date: desc_nulls_last} + limit: 30 + ) { + total + start_date + end_date + } +} +``` + +### Fetch monthly total ERC-1155 accounts (full history) + +```graphql +query ERC1155MonthlyTotals { + metric: ecosystem_metric( + where: {name: {_eq: "total_erc1155_accounts"}, period: {_eq: "month"}} + order_by: {start_date: asc} + ) { + total + start_date + end_date + } +} +``` + +### Calculate ERC-1155 adoption growth (month-over-month) + +```graphql +query ERC1155GrowthMetrics { + current_month: ecosystem_metric( + where: {name: {_eq: "total_erc1155_accounts"}, period: {_eq: "month"}} + order_by: {start_date: desc} + limit: 1 + ) { + total + start_date + } + previous_month: ecosystem_metric( + where: {name: {_eq: "total_erc1155_accounts"}, period: {_eq: "month"}} + order_by: {start_date: desc} + limit: 1 + offset: 1 + ) { + total + start_date + } +} +``` + +## Available Time Periods + +The `period` field supports the following values: + +- `hour` - Hourly aggregated data +- `day` - Daily aggregated data +- `week` - Weekly aggregated data +- `month` - Monthly aggregated data +- `quarter` - Quarterly aggregated data +- `year` - Yearly aggregated data + +## SQL Implementation + +Below is a link to the **Hedera Stats** GitHub repository. The repo contains the SQL function that calculates the **Total ERC-1155 Accounts** statistic outlined in this methodology. + +SQL Function: `ecosystem.total_erc1155_accounts` + +**[View GitHub Repository →](https://github.com/hgraph-io/hedera-stats)** + +## Related Metrics + +- [Total Smart Contracts](/hedera-stats/evm/total-smart-contracts) - All deployed smart contracts +- [Active Smart Contracts](/hedera-stats/evm/active-smart-contracts) - Smart contracts invoked during a period +- [New Smart Contracts](/hedera-stats/evm/new-smart-contracts) - Contracts deployed during a period + +## Dependencies +* Hedera mirror node with contract_log table +* ERC-1155 event signatures (TransferSingle, TransferBatch) From 62fe04099f0a508c660fb61062d97047e8de2dbe Mon Sep 17 00:00:00 2001 From: omar-hgraph Date: Sat, 21 Feb 2026 05:13:51 +0200 Subject: [PATCH 3/3] docs(hedera-stats): update main navigation with new metrics Add links to newly documented Hedera Stats metrics in introduction.md: EVM: - Total ERC-1155 Accounts (multi-token standard adoption) NFTs: - Top ERC-721 Smart Contract Collections (PR #69) - Top HTS Native NFT Collections (PR #70) --- docs/hedera-stats/introduction.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/hedera-stats/introduction.md b/docs/hedera-stats/introduction.md index d2f0d36..8adf865 100644 --- a/docs/hedera-stats/introduction.md +++ b/docs/hedera-stats/introduction.md @@ -104,11 +104,15 @@ A breakdown of all available Hedera Stats on mainnet. Each link will take you to - [Active Smart Contracts](/hedera-stats/evm/active-smart-contracts): `active_smart_contracts` - [New Smart Contracts](/hedera-stats/evm/new-smart-contracts): `new_smart_contracts` - [Total Smart Contracts](/hedera-stats/evm/total-smart-contracts): `total_smart_contracts` +- [Total ERC-1155 Accounts](/hedera-stats/evm/total-erc1155-accounts): `total_erc1155_accounts` ### NFTs - [NFT Collection Sales Volume](/hedera-stats/non-fungible-tokens/nft-collection-sales-volume): `nft_collection_sales_volume` - [NFT Collection Sales Volume (Total)](/hedera-stats/non-fungible-tokens/nft-collection-sales-volume-total): `nft_collection_sales_volume_total` +- Top Ranked Collections: + - [Top ERC-721 Smart Contract Collections](/hedera-stats/non-fungible-tokens/top-erc-nfts): `top_non_fungible_tokens_erc` + - [Top HTS Native NFT Collections](/hedera-stats/non-fungible-tokens/top-hts-nfts): `top_non_fungible_tokens_hts` > *See these statistics in action on the [Hgraph Hedera Stats demo Grafana dashboard](https://hgraph.com/hedera/stats).*