Skip to content

Commit b4d0d02

Browse files
committed
ampleforth substreams
1 parent ab67928 commit b4d0d02

24 files changed

+10334
-1
lines changed

substreams/Cargo.lock

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

substreams/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ members = [
1010
"ethereum-sfrax",
1111
"ethereum-sfraxeth",
1212
"ethereum-uniswap-v3-logs-only",
13-
"ethereum-uniswap-v4"
13+
"ethereum-uniswap-v4",
14+
"ethereum-ampleforth"
1415
]
1516
resolver = "2"
1617

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[package]
2+
name = "ethereum-ampleforth"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[lib]
7+
name = "ethereum_ampleforth"
8+
crate-type = ["cdylib"]
9+
10+
[dependencies]
11+
substreams = "0.5.22"
12+
substreams-ethereum = "0.9.9"
13+
prost = "0.11"
14+
prost-types = "0.11"
15+
ethabi = "17"
16+
hex-literal = "0.4.1"
17+
num-bigint = "0.4"
18+
num-traits = "0.2.15"
19+
hex = "0.4.3"
20+
itertools = "0.12.0"
21+
anyhow = "1.0.75"
22+
serde = { version = "1.0", features = ["derive"] }
23+
tycho-substreams = { git = "https://github.com/propeller-heads/tycho-protocol-sdk.git", rev = "b8aeaa3" }
24+
25+
[build-dependencies]
26+
anyhow = "1"
27+
substreams-ethereum = "0.9"
28+
regex = "1.10.4"
29+
# Required so that ethabi > ethereum-types build correctly under wasm32-unknown-unknown
30+
[target.wasm32-unknown-unknown.dependencies]
31+
getrandom = { version = "0.2", features = ["custom"] }
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
### Setup
2+
3+
```
4+
# 1) Install Rust
5+
curl https://sh.rustup.rs -sSf | sh
6+
7+
# 2) Add cargo to bash env
8+
9+
# 3) Install substreams and protocol buf
10+
brew install streamingfast/tap/substreams
11+
brew install buf
12+
13+
# 4) Build
14+
rustup target add wasm32-unknown-unknown
15+
# NOTE: This will run build.rs and generate abi bindings
16+
cargo build --target wasm32-unknown-unknown --release
17+
18+
# 5) Generate protobuf code
19+
substreams protogen substreams.yaml --exclude-paths="sf/substreams,google"
20+
```
21+
22+
23+
### Running
24+
25+
```
26+
substreams auth
27+
export SUBSTREAMS_API_TOKEN=INSERT_TOKEN
28+
29+
substreams gui
30+
substreams run -e mainnet.eth.streamingfast.io:443 substreams.yaml
31+
```

0 commit comments

Comments
 (0)