{"id":20138303,"url":"https://github.com/pinax-network/substreams-erc20-supply","last_synced_at":"2026-04-15T21:32:08.910Z","repository":{"id":230922669,"uuid":"693832813","full_name":"pinax-network/substreams-erc20-supply","owner":"pinax-network","description":"ERC-20 Token Supply Substreams","archived":false,"fork":false,"pushed_at":"2024-08-09T15:21:08.000Z","size":587,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-02T23:14:34.709Z","etag":null,"topics":["erc20","ethereum","streamingfast","substreams"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pinax-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-19T20:00:55.000Z","updated_at":"2024-08-09T15:21:11.000Z","dependencies_parsed_at":"2024-04-01T16:23:38.718Z","dependency_job_id":"b1534679-35b2-4927-b471-3669848e39aa","html_url":"https://github.com/pinax-network/substreams-erc20-supply","commit_stats":null,"previous_names":["pinax-network/substreams-erc20-supply"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/pinax-network/substreams-erc20-supply","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-erc20-supply","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-erc20-supply/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-erc20-supply/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-erc20-supply/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinax-network","download_url":"https://codeload.github.com/pinax-network/substreams-erc20-supply/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-erc20-supply/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31861355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erc20","ethereum","streamingfast","substreams"],"created_at":"2024-11-13T21:37:20.369Z","updated_at":"2026-04-15T21:32:08.887Z","avatar_url":"https://github.com/pinax-network.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `ERC-20` Token Supply [Substreams](https://substreams.streamingfast.io)\n\n[![Build Status](https://github.com/pinax-network/substreams-erc20-supply/actions/workflows/test.yml/badge.svg)](https://github.com/pinax-network/substreams-erc20-supply/actions/workflows/test.yml)\n![Version](https://img.shields.io/github/v/release/pinax-network/substreams-erc20-supply)\n![License](https://img.shields.io/github/license/pinax-network/substreams-erc20-supply)\n\n\u003e Extends [ERC-20 Balance Changes](https://github.com/streamingfast/substreams-erc20-balance-changes) with token supply.\n\n### First block containing ERC20 Transfers\n\n| Chain   | Block number |\n| ------- | ------------ |\n| ETH     | 913 198      |\n| Polygon | 2764         |\n| BSC     | 64 253       |\n\n## Quickstart\n\n```\n$ gh repo clone pinax-network/substreams-erc20-supply\n$ cd substreams-erc20-supply\n$ make\n$ make gui\n```\n\n## Releases `.spkg`\n\n- https://github.com/pinax-network/substreams-erc20-supply/releases\n\n## References\n\n- [Ethereum Docs: ERC-20 Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/)\n- [EIPS: ERC-20 Token Standard ](https://eips.ethereum.org/EIPS/eip-20)\n- [OpenZeppelin implementation](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/9b3710465583284b8c4c5d2245749246bb2e0094/contracts/token/ERC20/ERC20.sol)\n- [ConsenSys implementation](https://github.com/ConsenSys/Tokens/blob/fdf687c69d998266a95f15216b1955a4965a0a6d/contracts/eip20/EIP20.sol)\n\n## Map Outputs\n\n### `map_token_supply`\n\n```json\n{\n  \"items\": [\n    {\n      \"address\": \"dac17f958d2ee523a2206206994597c13d831ec7\",\n      \"supply\": \"39025187376288180\"\n    },\n    {\n      \"address\": \"c944e90c64b2c07662a292be6244bdf05cda44a7\",\n      \"supply\": \"10759041473295613153705888512\"\n    },\n    ...\n  ]\n}\n```\n\n### `graph_out`\n\n```json\n{\n  \"entityChanges\": [\n    {\n      \"entity\": \"TotalSupply\",\n      \"id\": \"c944e90c64b2c07662a292be6244bdf05cda44a7\",\n      \"ordinal\": \"0\",\n      \"operation\": \"OPERATION_CREATE\",\n      \"fields\": [\n        {\n          \"name\": \"address\",\n          \"newValue\": { \"string\": \"c944e90c64b2c07662a292be6244bdf05cda44a7\" }\n        },\n        {\n          \"name\": \"block\",\n          \"newValue\": { \"bigint\": \"18242188\" }\n        },\n        {\n          \"name\": \"supply\",\n          \"newValue\": { \"bigint\": \"10759041473295613153705888512\" }\n        },\n        {\n          \"name\": \"timestamp\",\n          \"newValue\": { \"bigint\": \"1696000391\" }\n        }\n      ]\n    },\n    ...\n  ]\n}\n```\n\n```mermaid\ngraph TD;\n  map_token_supply[map: map_token_supply];\n  balance_changes:map_valid_balance_changes --\u003e map_token_supply;\n  store_supply[store: store_supply];\n  map_token_supply --\u003e store_supply;\n  db_out[map: db_out];\n  sf.substreams.v1.Clock[source: sf.substreams.v1.Clock] --\u003e db_out;\n  store_supply -- deltas --\u003e db_out;\n```\n\n### Modules\n\n```yaml\nPackage name: erc20_supply\nVersion: v0.1.8\nDoc: ERC-20 Token Supply\nModules:\n----\nName: map_token_supply\nInitial block: 0\nKind: map\nInput: map: balance_changes:map_valid_balance_changes\nOutput Type: proto:erc20.supply.types.v1.TotalSupplies\nHash: 6d670090dd23e7197e90a091d714f981e6adbe15\nDoc:  Extracts ERC20 token total supply\n\nName: store_supply\nInitial block: 0\nKind: store\nInput: map: map_token_supply\nValue Type: string\nUpdate Policy: set\nHash: 94b9609de07ce414aca6bf261483ccce68a6b592\nDoc:  Stores last supply seen\n\nName: db_out\nInitial block: 0\nKind: map\nInput: source: sf.substreams.v1.Clock\nInput: store: store_supply\nOutput Type: proto:sf.substreams.sink.database.v1.DatabaseChanges\nHash: c9f1a2ca2d47ed888839e6d3d2e9fb12006bdef6\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Fsubstreams-erc20-supply","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinax-network%2Fsubstreams-erc20-supply","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Fsubstreams-erc20-supply/lists"}