feat(template): Add template for singleton protocols.

Separate templates and add one for protocols with only a single contract.
This commit is contained in:
kayibal
2025-01-30 15:54:25 -03:00
committed by Alan Höng
parent d0e73a20ea
commit 08d2c7a82e
26 changed files with 2141 additions and 43 deletions

56
substreams/Cargo.lock generated
View File

@@ -301,7 +301,7 @@ dependencies = [
]
[[package]]
name = "ethereum-template"
name = "ethereum-template-factory"
version = "0.1.0"
dependencies = [
"anyhow",
@@ -314,7 +314,25 @@ dependencies = [
"serde-sibor",
"substreams",
"substreams-ethereum",
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=b8aeaa3)",
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=3c08359)",
]
[[package]]
name = "ethereum-template-singleton"
version = "0.1.0"
dependencies = [
"anyhow",
"ethabi 18.0.0",
"hex",
"itertools 0.10.5",
"num-bigint",
"prost 0.11.9",
"serde",
"serde-sibor",
"serde_qs",
"substreams",
"substreams-ethereum",
"tycho-substreams 0.2.0 (git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=3c08359)",
]
[[package]]
@@ -461,7 +479,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.90",
"syn 2.0.96",
]
[[package]]
@@ -534,6 +552,9 @@ name = "hex"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
dependencies = [
"serde",
]
[[package]]
name = "hex-literal"
@@ -600,7 +621,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.90",
"syn 2.0.96",
]
[[package]]
@@ -1098,7 +1119,7 @@ dependencies = [
"regex",
"relative-path",
"rustc_version",
"syn 2.0.90",
"syn 2.0.96",
"unicode-ident",
]
@@ -1158,7 +1179,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "859877cf5123a0b2c03e92b01c0b7adefb5ea0b6e6a390f2f7107b85783eee14"
dependencies = [
"serde",
"thiserror",
"thiserror 1.0.69",
]
[[package]]
@@ -1489,7 +1510,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote", "syn 2.0.96",
"quote",
"syn 2.0.96",
]
[[package]]
@@ -1500,7 +1522,7 @@ checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.90",
"syn 2.0.96",
]
[[package]]
@@ -1544,6 +1566,22 @@ dependencies = [
"substreams-ethereum",
]
[[package]]
name = "tycho-substreams"
version = "0.2.0"
source = "git+https://github.com/propeller-heads/tycho-protocol-sdk.git?rev=3c08359#3c08359cf112e15c137dd5256b8dc8e9cd6c1626"
dependencies = [
"ethabi 18.0.0",
"hex",
"itertools 0.12.1",
"num-bigint",
"prost 0.11.9",
"serde",
"serde_json",
"substreams",
"substreams-ethereum",
]
[[package]]
name = "tycho-substreams"
version = "0.2.0"
@@ -1745,5 +1783,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.90",
"syn 2.0.96",
]