Skip to content

Commit

Permalink
folder movements
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhagarwal03 committed Aug 11, 2024
1 parent c8eab2e commit e89681f
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/balanceof_imbalances.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from web3.types import TxReceipt, HexStr
from eth_typing import ChecksumAddress
from typing import Dict, Optional, Set
from src.config import NODE_URL
from src.helpers.config import NODE_URL
from src.constants import SETTLEMENT_CONTRACT_ADDRESS, NATIVE_ETH_TOKEN_ADDRESS
from contracts.erc20_abi import erc20_abi

Expand Down
4 changes: 2 additions & 2 deletions src/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
from sqlalchemy import text
from sqlalchemy.engine import Engine
from src.imbalances_script import RawTokenImbalances
from src.helper_functions import (
from src.helpers.helper_functions import (
get_finalized_block_number,
get_tx_hashes_blocks,
get_auction_id,
read_sql_file,
)
from src.config import (
from src.helpers.config import (
initialize_connections,
CHAIN_SLEEP_TIME,
check_db_connection,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from web3 import Web3
from src.helper_functions import get_tx_hashes_blocks, get_auction_id
from src.config import logger
from src.helpers.helper_functions import get_tx_hashes_blocks, get_auction_id
from src.helpers.config import logger


class BlockchainData:
Expand Down
2 changes: 1 addition & 1 deletion src/config.py → src/helpers/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sqlalchemy import create_engine, Engine
from dotenv import load_dotenv
from web3 import Web3
from src.helper_functions import get_logger, get_web3_instance
from src.helpers.helper_functions import get_logger, get_web3_instance


load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion src/helper_classes/database.py → src/helpers/database.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sqlalchemy import text
from sqlalchemy.engine import Engine
from src.config import check_db_connection, logger
from src.helpers.config import check_db_connection, logger


class Database:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/imbalances_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from web3.datastructures import AttributeDict
from web3.types import TxReceipt

from src.config import CHAIN_RPC_ENDPOINTS, logger
from src.helpers.config import CHAIN_RPC_ENDPOINTS, logger
from src.constants import (
SETTLEMENT_CONTRACT_ADDRESS,
NATIVE_ETH_TOKEN_ADDRESS,
Expand Down
6 changes: 3 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
from src.config import initialize_connections, logger
from src.helpers.config import initialize_connections, logger
from src.transaction_processor import TransactionProcessor
from src.helper_classes.database import Database
from src.helper_classes.blockchain_data import BlockchainData
from src.helpers.database import Database
from src.helpers.blockchain_data import BlockchainData


def main() -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/price_providers/coingecko_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import requests
import json
from web3 import Web3
from src.config import logger, get_web3_instance
from src.helper_functions import get_finalized_block_number
from src.helpers.config import logger, get_web3_instance
from src.helpers.helper_functions import get_finalized_block_number
from src.constants import (
NATIVE_ETH_TOKEN_ADDRESS,
WETH_TOKEN_ADDRESS,
Expand Down
2 changes: 1 addition & 1 deletion src/price_providers/dune_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dune_client.types import QueryParameter
from dune_client.client import DuneClient
from dune_client.query import QueryBase
from src.config import get_web3_instance, get_logger
from src.helpers.config import get_web3_instance, get_logger
from src.constants import FETCH_PRICE_QUERY_ID, QUERY_BUFFER_TIME

dotenv.load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion src/price_providers/moralis_pricing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Optional
from moralis import evm_api
from src.config import get_logger
from src.helpers.config import get_logger
import os, dotenv

dotenv.load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion src/price_providers/price_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from src.price_providers.coingecko_pricing import CoingeckoPriceProvider
from src.price_providers.dune_pricing import DunePriceProvider
from src.price_providers.moralis_pricing import MoralisPriceProvider
from src.config import logger
from src.helpers.config import logger


class PriceFeed:
Expand Down
8 changes: 4 additions & 4 deletions src/transaction_processor.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from typing import List, Tuple
from src.helper_classes.blockchain_data import BlockchainData
from src.helper_classes.database import Database
from src.helpers.blockchain_data import BlockchainData
from src.helpers.database import Database
from src.imbalances_script import RawTokenImbalances
from src.price_providers.price_feed import PriceFeed
from src.helper_functions import read_sql_file
from src.config import CHAIN_SLEEP_TIME, logger
from src.helpers.helper_functions import read_sql_file
from src.helpers.config import CHAIN_SLEEP_TIME, logger
import time


Expand Down
2 changes: 1 addition & 1 deletion tests/basic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dotenv import load_dotenv
import pytest
from src.imbalances_script import RawTokenImbalances
from src.helper_functions import get_web3_instance
from src.helpers.helper_functions import get_web3_instance

load_dotenv()

Expand Down
2 changes: 1 addition & 1 deletion tests/compare_imbalances.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import time
from web3 import Web3
from src.config import ETHEREUM_NODE_URL
from src.helpers.config import ETHEREUM_NODE_URL
from src.imbalances_script import RawTokenImbalances
from src.balanceof_imbalances import BalanceOfImbalances
from src.daemon import get_web3_instance, create_db_connection, fetch_transaction_hashes
Expand Down

0 comments on commit e89681f

Please sign in to comment.