feat(substreams): add substreams for Uniswap v2 and v3
This commit is contained in:
16
substreams/ethereum-uniswap-v2/src/store_key.rs
Normal file
16
substreams/ethereum-uniswap-v2/src/store_key.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
#[derive(Clone)]
|
||||
pub enum StoreKey {
|
||||
Pool,
|
||||
}
|
||||
|
||||
impl StoreKey {
|
||||
pub fn get_unique_pool_key(&self, key: &str) -> String {
|
||||
format!("{}:{}", self.unique_id(), key)
|
||||
}
|
||||
|
||||
pub fn unique_id(&self) -> String {
|
||||
match self {
|
||||
StoreKey::Pool => "Pool".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user