{"id":13709762,"url":"https://github.com/pinax-network/substreams-antelope","last_synced_at":"2025-06-27T13:39:44.467Z","repository":{"id":65169061,"uuid":"585295546","full_name":"pinax-network/substreams-antelope","owner":"pinax-network","description":"Substreams for Antelope","archived":false,"fork":false,"pushed_at":"2024-10-16T22:36:30.000Z","size":715,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-03-23T20:05:25.399Z","etag":null,"topics":["antelope","substreams","thegraph"],"latest_commit_sha":null,"homepage":"https://docs.rs/substreams-antelope","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","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-APACHE","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-01-04T20:12:30.000Z","updated_at":"2025-02-26T20:01:41.000Z","dependencies_parsed_at":"2024-10-18T19:33:58.233Z","dependency_job_id":"8d28ef08-d317-40e2-9358-cd8fb6c21626","html_url":"https://github.com/pinax-network/substreams-antelope","commit_stats":{"total_commits":93,"total_committers":3,"mean_commits":31.0,"dds":"0.20430107526881724","last_synced_commit":"2bb0266427689dd384fd86204c24c5d2ef7e7b26"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-antelope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-antelope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-antelope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinax-network%2Fsubstreams-antelope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinax-network","download_url":"https://codeload.github.com/pinax-network/substreams-antelope/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248084742,"owners_count":21045132,"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":["antelope","substreams","thegraph"],"created_at":"2024-08-02T23:00:45.627Z","updated_at":"2025-04-09T18:08:47.461Z","avatar_url":"https://github.com/pinax-network.png","language":"Rust","funding_links":[],"categories":["Blockchains"],"sub_categories":["Substreams"],"readme":"# [`Substreams`](https://substreams.streamingfast.io/) for [**Antelope**](http://antelope.io/)\n\n[\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/Github-substreams.antelope-8da0cb?style=for-the-badge\u0026logo=github\" height=\"20\"\u003e](https://github.com/pinax-network/substreams-antelope)\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/substreams-antelope.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust\" height=\"20\"\u003e](https://crates.io/crates/substreams-antelope)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-substreams.antelope-66c2a5?style=for-the-badge\u0026labelColor=555555\u0026logo=docs.rs\" height=\"20\"\u003e](https://docs.rs/substreams-antelope)\n[\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/pinax-network/substreams-antelope/ci.yml?branch=develop\u0026style=for-the-badge\" height=\"20\"\u003e](https://github.com/pinax-network/substreams-antelope/actions?query=branch%3Adevelop)\n\n\u003e This library contains the generated Rust protobuf bindings for [Antelope blocks](https://github.com/pinax-network/firehose-antelope/blob/develop/proto/sf/antelope/type/v1/type.proto) as well as helper methods to extract and parse block data.\n\n## 📖 Documentation\n\n### https://docs.rs/substreams-antelope\n\n### Further resources\n\n- [Substreams documentation](https://substreams.streamingfast.io)\n\n\n## Install\n\n```\n$ cargo add substreams-antelope\n```\n\n## Usage\n\nRefer to [Docs.rs](https://docs.rs/substreams-antelope/latest/substreams_antelope/struct.Block.html#implementations) for helper methods on `Block` that extract action and transaction iterators from the Antelope block.\n\n**Cargo.toml**\n\n```toml\n[dependencies]\nsubstreams = \"0.6\"\nsubstreams-antelope = \"0.6\"\n```\n\n**src/lib.rs**\n\n```rust\nuse substreams::prelude::*;\nuse substreams::errors::Error;\nuse substreams_antelope::{Block, ActionTraces};\n\n#[substreams::handlers::map]\nfn map_action_traces(block: Block) -\u003e Result\u003cActionTraces, Error\u003e {\n    let mut action_traces = vec![];\n\n    for trx in block.transaction_traces() {\n        for trace in trx.action_traces {\n            action_traces.push(trace);\n        }\n    }\n    Ok(ActionTraces { action_traces })\n}\n```\n\nOr, using `actions()` helper method to filter all actions of `Statelog` type from `myaccount` account. As a parameter you can specify a list of contract account names to include actions from, that can be empty if you want actions with this signature from any contract account.\n\n**src/lib.rs**\n\n```rust\n#[substreams::handlers::map]\nfn map_actions(param_account: String, block: substreams_antelope::Block) -\u003e Result\u003cActions, substreams::errors::Error\u003e {\n    Ok(Actions {\n        transfers: block.actions::\u003cabi::contract::actions::Transfer\u003e(\u0026[\"eosio.token\"])\n            .map(|(action, trace)| Transfer {\n                // action.to, action.from, action.memo, action.quantity are available here.\n            })\n            .collect(),\n    })\n}\n```\n\n\n## Using Abigen\nTo generate ABI bindings for your smart contract you can add `abi/contract.abi.json` file containing the smart contract ABI, as well as the following `build.rs` file to the root of your project. This will ensure that `src/abi/contract.rs` module containing Rust bindings for your smart contract is always generated in your project:\n\n**build.rs**\n\n```rust\nfn main() {\n    substreams_antelope::Abigen::new(\"Contract\", \"abi/eosio.token.json\")\n        .expect(\"failed to load abi\")\n        .generate()\n        .expect(\"failed to generate contract\")\n        .write_to_file(\"src/abi/eosio.token.rs\")\n        .expect(\"failed to write contract\");\n}\n```\n\n## Release\n- Run `gen.sh` if there were changes in protobufs\n- Bump up version in workspace `Cargo.toml`\n- Commit changes\n- Tag a release: https://github.com/pinax-network/substreams-antelope/releases\n- Publish packages in this order: `substreams-antelope-core`, `substreams-antelope-abigen`, `substreams-antelope`.\n\nTODO: automate releases with github actions","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Fsubstreams-antelope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinax-network%2Fsubstreams-antelope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinax-network%2Fsubstreams-antelope/lists"}