generated from streamingfast/substreams-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
30 lines (23 loc) · 880 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use anyhow::{Ok, Result};
use substreams_ethereum::Abigen;
fn main() -> Result<(), anyhow::Error> {
Abigen::new("EntryPoint", "abi/entrypoint.json")?
.generate()?
.write_to_file("src/abi/entrypoint.rs")?;
Abigen::new("SafeV1.0.0", "abi/safe_v1.0.0.json")?
.generate()?
.write_to_file("src/abi/safe_v1_0_0.rs")?;
Abigen::new("SafeV1.1.1", "abi/safe_v1.1.1.json")?
.generate()?
.write_to_file("src/abi/safe_v1_1_1.rs")?;
Abigen::new("SafeV1.2.0", "abi/safe_v1.2.0.json")?
.generate()?
.write_to_file("src/abi/safe_v1_2_0.rs")?;
Abigen::new("SafeV1.3.0", "abi/safe_v1.3.0.json")?
.generate()?
.write_to_file("src/abi/safe_v1_3_0.rs")?;
Abigen::new("SafeV1.4.1", "abi/safe_v1.4.1.json")?
.generate()?
.write_to_file("src/abi/safe_v1_4_1.rs")?;
Ok(())
}