This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from web3._utils.events import get_event_data | |
@lru_cache(maxsize=None) | |
def _get_topic2abi(abi): | |
if isinstance(abi, (str)): | |
abi = json.loads(abi) | |
event_abi = [a for a in abi if a['type'] == 'event'] | |
topic2abi = {event_abi_to_log_topic(_): _ for _ in event_abi} | |
return topic2abi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import traceback | |
import sys | |
from functools import lru_cache | |
from web3 import Web3 | |
from web3.auto import w3 | |
from web3.contract import Contract | |
from web3._utils.events import get_event_data | |
from web3._utils.abi import exclude_indexed_event_inputs, get_abi_input_names, get_indexed_event_inputs, normalize_event_input_types | |
from web3.exceptions import MismatchedABI, LogTopicError | |
from web3.types import ABIEvent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "_factory", | |
"type": "address" | |
}, | |
{ | |
"internalType": "address", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark.sql import functions as f | |
from pyspark.sql import types as t | |
from pyspark.sql import Window as w | |
from pyspark.sql.functions import pandas_udf, PandasUDFType | |
import numpy as np | |
import datetime | |
sequence = [1, 2, 4, 7, 11, 16, 22] | |
sequence2 = [3, 5, 6, 8, 10, 18, 20] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder