Macro substreams_ethereum::init
source · [−]macro_rules! init {
() => { ... };
}Expand description
The init macro registers a custom get random function in the system which is required
because ethabi that we rely on for ABI decoding/encoding primitives use it somewhere in
its transitive set of dependencies and causes problem in wasm32-unknown-unknown target.
This macro must be invoked in the root crate so you must have the substreams_ethereum::init!()
call in your lib.rs of your Substreams.
In addition, you need to have getrandom = { version = "0.2", features = ["custom"] } dependency
in your Substreams Cargo.toml file:
[target.wasm32-unknown-unknown.dependencies]
getrandom = { version = "0.2", features = ["custom"] }