kopia lustrzana https://github.com/bugout-dev/moonworm
				
				
				
			isort fix
							rodzic
							
								
									6e8ebd3d8e
								
							
						
					
					
						commit
						86612cf0f1
					
				| 
						 | 
					@ -5,6 +5,7 @@ from pathlib import Path
 | 
				
			||||||
from shutil import copyfile
 | 
					from shutil import copyfile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from web3.main import Web3
 | 
					from web3.main import Web3
 | 
				
			||||||
 | 
					from web3.middleware import geth_poa_middleware
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from moonworm.watch import watch_contract
 | 
					from moonworm.watch import watch_contract
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,8 +15,6 @@ from .generator import (
 | 
				
			||||||
    generate_contract_interface_content,
 | 
					    generate_contract_interface_content,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from web3.middleware import geth_poa_middleware
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
def write_file(content: str, path: str):
 | 
					def write_file(content: str, path: str):
 | 
				
			||||||
    with open(path, "w") as ofp:
 | 
					    with open(path, "w") as ofp:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
from abc import ABC, abstractmethod
 | 
					 | 
				
			||||||
from dataclasses import asdict, dataclass
 | 
					 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
import pickle
 | 
					import pickle
 | 
				
			||||||
 | 
					from abc import ABC, abstractmethod
 | 
				
			||||||
 | 
					from dataclasses import asdict, dataclass
 | 
				
			||||||
from typing import Any, Dict, List
 | 
					from typing import Any, Dict, List
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from eth_typing.evm import ChecksumAddress
 | 
					from eth_typing.evm import ChecksumAddress
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
from moonstreamdb.models import EthereumLabel, EthereumBlock
 | 
					from moonstreamdb.models import EthereumBlock, EthereumLabel
 | 
				
			||||||
from web3 import Web3
 | 
					 | 
				
			||||||
from sqlalchemy.orm import Query, Session
 | 
					from sqlalchemy.orm import Query, Session
 | 
				
			||||||
 | 
					from web3 import Web3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from .event_scanner_state import EventScannerState
 | 
					from .event_scanner_state import EventScannerState
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BLOCK_TIMESTAMP_CACHE = {}
 | 
					BLOCK_TIMESTAMP_CACHE = {}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,8 +2,8 @@ import os
 | 
				
			||||||
import pickle
 | 
					import pickle
 | 
				
			||||||
import shutil
 | 
					import shutil
 | 
				
			||||||
import tempfile
 | 
					import tempfile
 | 
				
			||||||
from typing import Any, Dict, List
 | 
					 | 
				
			||||||
import unittest
 | 
					import unittest
 | 
				
			||||||
 | 
					from typing import Any, Dict, List
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import web3
 | 
					import web3
 | 
				
			||||||
from web3.main import Web3
 | 
					from web3.main import Web3
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,16 +3,16 @@ import tempfile
 | 
				
			||||||
import unittest
 | 
					import unittest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from hexbytes.main import HexBytes
 | 
					from hexbytes.main import HexBytes
 | 
				
			||||||
 | 
					from web3 import Web3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from moonworm.contracts import ERC1155
 | 
					from moonworm.contracts import ERC1155
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from ...web3_util import connect
 | 
					 | 
				
			||||||
from ...crawler.function_call_crawler import (
 | 
					from ...crawler.function_call_crawler import (
 | 
				
			||||||
    FunctionCallCrawler,
 | 
					    FunctionCallCrawler,
 | 
				
			||||||
    Web3StateProvider,
 | 
					 | 
				
			||||||
    PickleFileState,
 | 
					    PickleFileState,
 | 
				
			||||||
 | 
					    Web3StateProvider,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
from web3 import Web3
 | 
					from ...web3_util import connect
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_web3_provider():
 | 
					def get_web3_provider():
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,20 +1,20 @@
 | 
				
			||||||
 | 
					import pprint as pp
 | 
				
			||||||
import time
 | 
					import time
 | 
				
			||||||
from typing import Any, Dict, List
 | 
					from typing import Any, Dict, List
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import web3
 | 
				
			||||||
from eth_typing.evm import ChecksumAddress
 | 
					from eth_typing.evm import ChecksumAddress
 | 
				
			||||||
from tqdm import tqdm
 | 
					from tqdm import tqdm
 | 
				
			||||||
from web3 import Web3
 | 
					from web3 import Web3
 | 
				
			||||||
import pprint as pp
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import web3
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
from .contracts import CU, ERC721
 | 
					from .contracts import CU, ERC721
 | 
				
			||||||
from .crawler.log_scanner import _fetch_events_chunk
 | 
					 | 
				
			||||||
from .crawler.function_call_crawler import (
 | 
					from .crawler.function_call_crawler import (
 | 
				
			||||||
    ContractFunctionCall,
 | 
					    ContractFunctionCall,
 | 
				
			||||||
    Web3StateProvider,
 | 
					 | 
				
			||||||
    FunctionCallCrawler,
 | 
					    FunctionCallCrawler,
 | 
				
			||||||
    FunctionCallCrawlerState,
 | 
					    FunctionCallCrawlerState,
 | 
				
			||||||
 | 
					    Web3StateProvider,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					from .crawler.log_scanner import _fetch_events_chunk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class MockState(FunctionCallCrawlerState):
 | 
					class MockState(FunctionCallCrawlerState):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Ładowanie…
	
		Reference in New Issue