kopia lustrzana https://github.com/bugout-dev/moonstream
Add changes.
rodzic
67de697270
commit
fc168a619e
|
@ -133,6 +133,7 @@ def recive_S3_data_from_query(
|
||||||
headers = {
|
headers = {
|
||||||
"Authorization": f"Bearer {token}",
|
"Authorization": f"Bearer {token}",
|
||||||
}
|
}
|
||||||
|
print(headers)
|
||||||
json = custom_body
|
json = custom_body
|
||||||
|
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
|
@ -141,6 +142,7 @@ def recive_S3_data_from_query(
|
||||||
json=json,
|
json=json,
|
||||||
timeout=5,
|
timeout=5,
|
||||||
)
|
)
|
||||||
|
print(response.text)
|
||||||
data_url = MoonstreamQueryResultUrl(url=response.json()["url"])
|
data_url = MoonstreamQueryResultUrl(url=response.json()["url"])
|
||||||
print(data_url)
|
print(data_url)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -30,6 +30,8 @@ from .db import clean_labels, commit_session, view_call_to_label
|
||||||
from .Multicall2_interface import Contract as Multicall2
|
from .Multicall2_interface import Contract as Multicall2
|
||||||
from .web3_util import FunctionSignature, connect
|
from .web3_util import FunctionSignature, connect
|
||||||
|
|
||||||
|
import traceback
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -112,6 +114,8 @@ def make_multicall(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
traceback.print_exc()
|
||||||
|
breakpoint()
|
||||||
logger.error(
|
logger.error(
|
||||||
f'Error encoding data for method {call["method"].name} call: {call}'
|
f'Error encoding data for method {call["method"].name} call: {call}'
|
||||||
)
|
)
|
||||||
|
@ -123,6 +127,7 @@ def make_multicall(
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
# Handle the case with not successful calls
|
# Handle the case with not successful calls
|
||||||
|
print("multicall_result")
|
||||||
for index, encoded_data in enumerate(multicall_result):
|
for index, encoded_data in enumerate(multicall_result):
|
||||||
try:
|
try:
|
||||||
if encoded_data[0]:
|
if encoded_data[0]:
|
||||||
|
@ -156,6 +161,8 @@ def make_multicall(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
traceback.print_exc()
|
||||||
|
breakpoint()
|
||||||
results.append(
|
results.append(
|
||||||
{
|
{
|
||||||
"result": str(encoded_data[1]),
|
"result": str(encoded_data[1]),
|
||||||
|
@ -212,7 +219,7 @@ def crawl_calls_level(
|
||||||
if input["value"] not in responces:
|
if input["value"] not in responces:
|
||||||
parameters.append([input["value"]])
|
parameters.append([input["value"]])
|
||||||
else:
|
else:
|
||||||
if (
|
if input["value"] in contracts_ABIs[call["address"]] and (
|
||||||
contracts_ABIs[call["address"]][input["value"]]["name"]
|
contracts_ABIs[call["address"]][input["value"]]["name"]
|
||||||
== "totalSupply"
|
== "totalSupply"
|
||||||
): # hack for totalSupply TODO(Andrey): need add propper support for response parsing
|
): # hack for totalSupply TODO(Andrey): need add propper support for response parsing
|
||||||
|
|
Ładowanie…
Reference in New Issue