refactor(substreams): refactor uniswapv3 to use tycho-substreams
This commit is contained in:
@@ -3,11 +3,12 @@ use substreams_helper::storage_change::StorageChangesFilter;
|
||||
|
||||
use crate::{
|
||||
abi::pool::events::Burn,
|
||||
pb::{tycho::evm::v1::Attribute, uniswap::v3::Pool},
|
||||
pb::uniswap::v3::Pool,
|
||||
storage::{constants::TRACKED_SLOTS, pool_storage::UniswapPoolStorage},
|
||||
};
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
impl EventTrait for Burn {
|
||||
fn get_changed_attributes(
|
||||
|
||||
@@ -2,10 +2,11 @@ use substreams_ethereum::pb::eth::v2::StorageChange;
|
||||
|
||||
use crate::{
|
||||
abi::pool::events::Collect,
|
||||
pb::{tycho::evm::v1::Attribute, uniswap::v3::Pool},
|
||||
pb::uniswap::v3::Pool,
|
||||
storage::{constants::TRACKED_SLOTS, pool_storage::UniswapPoolStorage},
|
||||
};
|
||||
use substreams_helper::storage_change::StorageChangesFilter;
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use substreams_ethereum::pb::eth::v2::StorageChange;
|
||||
use substreams_helper::storage_change::StorageChangesFilter;
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
use crate::{
|
||||
abi::pool::events::CollectProtocol,
|
||||
pb::{tycho::evm::v1::Attribute, uniswap::v3::Pool},
|
||||
pb::uniswap::v3::Pool,
|
||||
storage::{constants::TRACKED_SLOTS, pool_storage::UniswapPoolStorage},
|
||||
};
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
impl EventTrait for CollectProtocol {
|
||||
fn get_changed_attributes(
|
||||
|
||||
@@ -2,10 +2,11 @@ use substreams_ethereum::pb::eth::v2::StorageChange;
|
||||
|
||||
use crate::{
|
||||
abi::pool::events::Flash,
|
||||
pb::{tycho::evm::v1::Attribute, uniswap::v3::Pool},
|
||||
pb::uniswap::v3::Pool,
|
||||
storage::{constants::TRACKED_SLOTS, pool_storage::UniswapPoolStorage},
|
||||
};
|
||||
use substreams_helper::storage_change::StorageChangesFilter;
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@ use substreams_ethereum::pb::eth::v2::StorageChange;
|
||||
|
||||
use crate::{
|
||||
abi::pool::events::Initialize,
|
||||
pb::{tycho::evm::v1::Attribute, uniswap::v3::Pool},
|
||||
pb::uniswap::v3::Pool,
|
||||
storage::{constants::TRACKED_SLOTS, pool_storage::UniswapPoolStorage},
|
||||
};
|
||||
use substreams_helper::storage_change::StorageChangesFilter;
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use substreams_ethereum::pb::eth::v2::StorageChange;
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
use crate::{
|
||||
abi::pool::events::Mint,
|
||||
pb::{tycho::evm::v1::Attribute, uniswap::v3::Pool},
|
||||
pb::uniswap::v3::Pool,
|
||||
storage::{constants::TRACKED_SLOTS, pool_storage::UniswapPoolStorage},
|
||||
};
|
||||
use substreams_helper::storage_change::StorageChangesFilter;
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
impl EventTrait for Mint {
|
||||
fn get_changed_attributes(
|
||||
|
||||
@@ -7,11 +7,9 @@ use crate::{
|
||||
abi::pool::events::{
|
||||
Burn, Collect, CollectProtocol, Flash, Initialize, Mint, SetFeeProtocol, Swap,
|
||||
},
|
||||
pb::{
|
||||
tycho::evm::v1::Attribute,
|
||||
uniswap::v3::{BalanceDelta, Pool},
|
||||
},
|
||||
pb::uniswap::v3::{BalanceDelta, Pool},
|
||||
};
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
pub mod burn;
|
||||
pub mod collect;
|
||||
|
||||
@@ -2,10 +2,11 @@ use substreams_ethereum::pb::eth::v2::StorageChange;
|
||||
|
||||
use crate::{
|
||||
abi::pool::events::SetFeeProtocol,
|
||||
pb::{tycho::evm::v1::Attribute, uniswap::v3::Pool},
|
||||
pb::uniswap::v3::Pool,
|
||||
storage::{constants::TRACKED_SLOTS, pool_storage::UniswapPoolStorage},
|
||||
};
|
||||
use substreams_helper::storage_change::StorageChangesFilter;
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@ use substreams_helper::storage_change::StorageChangesFilter;
|
||||
|
||||
use crate::{
|
||||
abi::pool::events::Swap,
|
||||
pb::{tycho::evm::v1::Attribute, uniswap::v3::Pool},
|
||||
pb::uniswap::v3::Pool,
|
||||
storage::{constants::TRACKED_SLOTS, pool_storage::UniswapPoolStorage},
|
||||
};
|
||||
use tycho_substreams::prelude::Attribute;
|
||||
|
||||
use super::{BalanceDelta, EventTrait};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user