Substreams for Antelope
This library contains the generated Rust protobuf bindings for Antelope blocks as well as helper methods to extract and parse block data.
📖 Documentation
https://docs.rs/substreams-antelope
Further resources
Install
$ cargo add substreams-antelope
Usage
Refer to Docs.rs for helper methods on Block that extract action and transaction iterators from the Antelope block.
Cargo.toml
[]
= "0.6"
= "0.6"
src/lib.rs
use *;
use Error;
use ;
Or, 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.
src/lib.rs
Using Abigen
To 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:
build.rs
Release
- Run
gen.shif there were changes in protobufs - Bump up version in workspace
Cargo.toml - Commit changes
- Tag a release: https://github.com/pinax-network/substreams-antelope/releases
- Publish packages in this order:
substreams-antelope-core,substreams-antelope-abigen,substreams-antelope.
TODO: automate releases with github actions