kopia lustrzana https://github.com/bugout-dev/moonworm
fix lint issues
rodzic
49794cf092
commit
ccc0abf70b
|
|
@ -121,10 +121,10 @@ def handle_watch(args: argparse.Namespace) -> None:
|
||||||
state_provider.clear_db_session()
|
state_provider.clear_db_session()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
state_provider = Web3StateProvider(web3)
|
|
||||||
watch_contract(
|
watch_contract(
|
||||||
web3=web3,
|
web3=web3,
|
||||||
state_provider=state_provider,
|
state_provider=Web3StateProvider(web3),
|
||||||
contract_address=web3.toChecksumAddress(args.contract),
|
contract_address=web3.toChecksumAddress(args.contract),
|
||||||
contract_abi=contract_abi,
|
contract_abi=contract_abi,
|
||||||
num_confirmations=args.confirmations,
|
num_confirmations=args.confirmations,
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ from moonworm.crawler.moonstream_ethereum_state_provider import (
|
||||||
from moonworm.crawler.networks import Network
|
from moonworm.crawler.networks import Network
|
||||||
|
|
||||||
from .contracts import CU, ERC721
|
from .contracts import CU, ERC721
|
||||||
|
from .crawler.ethereum_state_provider import EthereumStateProvider
|
||||||
from .crawler.function_call_crawler import (
|
from .crawler.function_call_crawler import (
|
||||||
ContractFunctionCall,
|
ContractFunctionCall,
|
||||||
FunctionCallCrawler,
|
FunctionCallCrawler,
|
||||||
|
|
@ -222,12 +223,14 @@ def watch_cu_contract(
|
||||||
|
|
||||||
with yield_db_session_ctx() as session:
|
with yield_db_session_ctx() as session:
|
||||||
function_call_state = MockState()
|
function_call_state = MockState()
|
||||||
web3_state = Web3StateProvider(web3)
|
|
||||||
eth_state_provider = web3_state
|
eth_state_provider: Optional[EthereumStateProvider] = None
|
||||||
if use_moonstream_web3_provider:
|
if use_moonstream_web3_provider:
|
||||||
eth_state_provider = MoonstreamEthereumStateProvider(
|
eth_state_provider = MoonstreamEthereumStateProvider(
|
||||||
web3, network=Network.polygon, session=session
|
web3, network=Network.polygon, db_session=session
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
eth_state_provider = Web3StateProvider(web3)
|
||||||
|
|
||||||
crawler = FunctionCallCrawler(
|
crawler = FunctionCallCrawler(
|
||||||
function_call_state,
|
function_call_state,
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue