Skip to content

Commit

Permalink
Add fee substream
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh9200 committed Apr 18, 2024
1 parent 1c14875 commit a06e019
Show file tree
Hide file tree
Showing 19 changed files with 1,433 additions and 9 deletions.
50 changes: 42 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ members = [
"eth-supply",
"synthetix",
"aave-v2",
"curve-finance",
]
exclude = ["messari-cli"]

[workspace.dependencies]
substreams = "0.5.0"
substreams-ethereum = "0.8.0"
substreams-ethereum = "0.9"
substreams-solana = "0.1.0"

[build]
Expand Down
28 changes: 28 additions & 0 deletions curve-finance/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "curve_finance_substream"
version = "0.0.1"
edition = "2021"
repository = "https://github.com/messari/substreams/"

[lib]
crate-type = ["cdylib"]

[dependencies]
ethabi = "17"
hex = "0.4.3"
hex-literal = "0.3.4"
num-bigint = "0.4"
num-traits = "0.2.15"
prost = "0.11"
prost-types = "0.11"
substreams = "0.5"
substreams-ethereum = "0.9"
substreams-database-change = "1"
substreams-entity-change = "1"
substreams-helper = { path = "../substreams-helper" }

[build-dependencies]
anyhow = "1"
regex = "1.8"
substreams-ethereum = "0.9"
substreams-common = { path = "../common" }
21 changes: 21 additions & 0 deletions curve-finance/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONY: build_all
build_all:
$(MAKE) -C ../erc20-price build
$(MAKE) -C ../erc20-price pack
cargo build --target wasm32-unknown-unknown --release

.PHONY: build
build:
cargo build --target wasm32-unknown-unknown --release

.PHONY: run
run:
substreams run -e polygon.streamingfast.io:443 substreams.yaml map_pool_fees --debug-modules-initial-snapshot store_pools -s 13991900 -t +10

.PHONY: build_csv
build_csv:
substreams-sink-csv -e polygon.substreams.pinax.network:9000 --manifest ./curve-finance-substream-v0.1.0.spkg --module-name map_pool_fees --start-block 13991900

.PHONY: pack
pack:
substreams pack ./substreams.yaml
Loading

0 comments on commit a06e019

Please sign in to comment.