{"id":23435014,"url":"https://github.com/0xheartcode/stacking-contract-metrics","last_synced_at":"2025-04-09T16:55:59.677Z","repository":{"id":268288686,"uuid":"903841444","full_name":"0xheartcode/Stacking-Contract-Metrics","owner":"0xheartcode","description":"Metrics for the staking contract, more like a small helper","archived":false,"fork":false,"pushed_at":"2025-01-08T15:19:37.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T10:19:29.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xheartcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-12-15T17:34:58.000Z","updated_at":"2024-12-16T15:05:44.000Z","dependencies_parsed_at":"2024-12-15T20:29:08.373Z","dependency_job_id":"4100c64a-c76e-40ac-8a06-3ee492fc2eef","html_url":"https://github.com/0xheartcode/Stacking-Contract-Metrics","commit_stats":null,"previous_names":["0xheartcode/stacking-contract-metrics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xheartcode%2FStacking-Contract-Metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xheartcode%2FStacking-Contract-Metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xheartcode%2FStacking-Contract-Metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xheartcode%2FStacking-Contract-Metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xheartcode","download_url":"https://codeload.github.com/0xheartcode/Stacking-Contract-Metrics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074723,"owners_count":21043486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-23T12:38:03.164Z","updated_at":"2025-04-09T16:55:59.651Z","avatar_url":"https://github.com/0xheartcode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Staking Contract Metrics\n\nA comprehensive analytics tool for Ethereum staking contracts, providing detailed metrics about rewards distribution, emission schedules, and contract status.\n\n## Features\n\n- Real-time staking contract analysis\n- Precise reward rate calculations (per second/block/day)\n- Emission schedule tracking\n- Token details and balances\n- Interactive terminal links to Etherscan\n- Wei-precise calculations for all token amounts\n\n## Prerequisites\n\n- Node.js (\u003e= 16.x)\n- pnpm\n- A valid Ethereum RPC endpoint\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone [your-repo-url]\ncd staking-contract-metrics\n\n# Install dependencies\npnpm install\n```\n\n## Configuration\n\nCreate a `.env` file in the root directory:\n\n```env\nRPC_URL=https://eth.llamarpc.com\nCONTRACT_ADDRESS=0xb07B92c182575b3cBa1a8E7b07d573935A242000\nEXPLORER_URL=https://etherscan.io/\nBLOCK_COUNTDOWN_URL=https://etherscan.io/block/countdown/\n```\n\n## Usage\n\n```bash\n# Run the analysis\npnpm start\n```\n\n## Output Example\n\n```\n📊 Staking Contract Analysis\n━━━━━━━━━━━━━━━━━━━━━━━━━\n\n💠 Token Details\n   Name: MetaZero\n   Symbol: MZERO\n   Token Address: 0x328a268b191ef593B72498a9e8a481C086EB21be\n   Staking Contract: 0xb07B92c182575b3cBa1a8E7b07d573935A242000\n\n💰 Reward Distribution\n   Per Second: 0.096450617283950617 tokens\n   └─ Raw Wei: 96450617283950617000 wei\n   Per Block (~12s): 1.157407407407407 tokens\n   └─ Raw Wei: 1157407407407407000000 wei\n   Per Day: 8333.333333333332 tokens\n   └─ Raw Wei: 8333333333333332000000000 wei\n\n⏳ Emission Schedule\n   Start: 4/11/2024, 12:00:00 AM\n   Start Block: #19617963\n   End: 12/6/2024, 11:00:00 PM\n   End Block: #21345962\n```\n\n## Project Structure\n\n```\nstaking-contract-metrics/\n├── src/\n│   ├── contracts/\n│   │   ├── abis.ts          # Contract ABIs\n│   │   └── StakingContract.ts\n│   ├── lib/\n│   │   └── utils.ts         # Utility functions\n│   ├── config.ts            # Configuration\n│   └── index.ts             # Main entry\n├── .env\n└── package.json\n```\n\n## Technical Details\n\nThe tool provides:\n- Wei-precise calculations for all token amounts\n- Reward rates calculated per second, block (~12s), and day\n- Clickable terminal links for block numbers and addresses\n- Real-time contract status monitoring\n- Accurate emission schedule tracking\n\n## Development\n\n```bash\n# Run in development mode with auto-reload\npnpm dev\n\n# Build the project\npnpm build\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xheartcode%2Fstacking-contract-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xheartcode%2Fstacking-contract-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xheartcode%2Fstacking-contract-metrics/lists"}