cowprotocol / data-misc Goto Github PK
View Code? Open in Web Editor NEWA collection of data related scripts.
A collection of data related scripts.
I've just stumbled upon that self.symbol = token_contract.caller.symbol()
is failing for the address 0x8e0E57DCb1ce8d9091dF38ec1BfC3b224529754A
.
Full error traceback:
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/gent/Projects/data-misc/src/missing_tokens.py", line 144, in <module>
run_missing_tokens(chain=blockchain)
File "/home/gent/Projects/data-misc/src/missing_tokens.py", line 122, in run_missing_tokens
token_details[token] = TokenDetails(address=token, w3=w3)
File "/home/gent/Projects/data-misc/src/missing_tokens.py", line 31, in __init__
self.symbol = token_contract.caller.symbol()
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/web3/contract.py", line 1477, in call_function
return fn(*args, **kwargs).call(transaction, block_identifier)
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/web3/contract.py", line 970, in call
return call_contract_function(
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/web3/contract.py", line 1537, in call_contract_function
output_data = web3.codec.decode(output_types, return_data)
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/eth_abi/codec.py", line 210, in decode
return decoder(stream)
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/eth_abi/decoding.py", line 127, in __call__
return self.decode(stream)
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/eth_utils/functional.py", line 45, in inner
return callback(fn(*args, **kwargs))
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/eth_abi/decoding.py", line 173, in decode
yield decoder(stream)
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/eth_abi/decoding.py", line 127, in __call__
return self.decode(stream)
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/eth_abi/decoding.py", line 144, in decode
stream.push_frame(start_pos)
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/eth_abi/decoding.py", line 95, in push_frame
self.seek_in_frame(0)
File "/home/gent/Projects/data-misc/venv/lib/python3.10/site-packages/eth_abi/decoding.py", line 84, in seek_in_frame
self.seek(self._total_offset + pos, *args, **kwargs)
OverflowError: Python int too large to convert to C ssize_t
Based on the discussion here we would want to make the fetching of queries asynchronous once duneanalytics/dune-client#28 (comment) is implemented
Might wanna look into https://marshmallow.readthedocs.io/en/stable/ for easier object serialization/deserialization . What's your take on that?
Originally posted by @gentrexha in #15 (comment)
In my opinion, separating these three different use cases into separate methods for each case makes them easier to understand and maintain. What's your take on that?
Originally posted by @gentrexha in #33 (comment)
This is analogous to what we have done here in the token allocation project (batching together our RPC requests)
With the most relevant block of code being:
for index, eth_address in enumerate(addresses):
request_data.append({
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [eth_address, "latest"],
"id": index
})
response = requests.post(self.node_url, json=request_data)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.