kopia lustrzana https://github.com/bugout-dev/moonworm
isort
rodzic
6e08a54b19
commit
a7023e551b
|
@ -124,10 +124,10 @@ def handle_watch(args: argparse.Namespace) -> None:
|
|||
raise ValueError("Please specify --network")
|
||||
network = Network.__members__[args.network]
|
||||
|
||||
from .crawler.networks import yield_db_session_ctx
|
||||
from .crawler.moonstream_ethereum_state_provider import (
|
||||
MoonstreamEthereumStateProvider,
|
||||
)
|
||||
from .crawler.networks import yield_db_session_ctx
|
||||
|
||||
state_provider = MoonstreamEthereumStateProvider(web3, network)
|
||||
|
||||
|
|
|
@ -3,23 +3,20 @@ from typing import Any, Dict, List, Optional, Union
|
|||
|
||||
from eth_typing.evm import ChecksumAddress
|
||||
from hexbytes.main import HexBytes
|
||||
|
||||
from .networks import yield_db_session_ctx
|
||||
from .networks import (
|
||||
EthereumLabel,
|
||||
EthereumTransaction,
|
||||
PolygonLabel,
|
||||
PolygonTransaction,
|
||||
XDaiTransaction,
|
||||
)
|
||||
|
||||
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.sql.base import NO_ARG
|
||||
from web3 import Web3
|
||||
|
||||
from .ethereum_state_provider import EthereumStateProvider
|
||||
from .networks import MODELS
|
||||
from .networks import (
|
||||
MODELS,
|
||||
EthereumLabel,
|
||||
EthereumTransaction,
|
||||
PolygonLabel,
|
||||
PolygonTransaction,
|
||||
XDaiTransaction,
|
||||
yield_db_session_ctx,
|
||||
)
|
||||
from .utils import Network
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from typing import Dict
|
||||
|
||||
try:
|
||||
from moonstreamdb.db import yield_db_session_ctx
|
||||
from moonstreamdb.models import (
|
||||
Base,
|
||||
EthereumBlock,
|
||||
|
@ -13,7 +14,6 @@ try:
|
|||
XDaiLabel,
|
||||
XDaiTransaction,
|
||||
)
|
||||
from moonstreamdb.db import yield_db_session_ctx
|
||||
except ImportError:
|
||||
print("this feature requires moonstreamdb which is not installed")
|
||||
print("to enable, run: `pip install moonworm[moonstream]`")
|
||||
|
|
Ładowanie…
Reference in New Issue