apeworx / py-tokenlists Goto Github PK
View Code? Open in Web Editor NEWUniswap Token Lists implementation in Python.
Home Page: https://tokenlists.org/
License: Apache License 2.0
Uniswap Token Lists implementation in Python.
Home Page: https://tokenlists.org/
License: Apache License 2.0
Two test cases currently are failing that were added to Uniswap's repo:
https://github.com/Uniswap/token-lists/blob/main/test/schema/example-crosschain.tokenlist.json
https://github.com/Uniswap/token-lists/blob/main/test/schema/extensions-valid-object.tokenlist.json
I have a repo that makes it easy to build a tokenlist out of on-chain data. The output file is saved to disk.
Installation currently goes through requests.get
If we see it starts with "file://" we can load the file instead of using requests.
I don't think there are any.
python
ape
when getting a ValueError for tokenlist, not found, the repr of the list is really long.
it looks like from this line: https://github.com/ApeWorX/py-tokenlists/blob/main/tokenlists/manager.py#L129-L131
For some reason, it seems like tokenlist.name
is a massive data object repr for some reason, but I am not sure, will have to investigate.
more info:
ApeWorX/ape-tokens#18
Fill this in if you have ideas on how the bug could be fixed.
Would be nice if there was a way to upgrade a tokenlist
Probably need to add the original download URI to Tokenlist
, so that it can be referenced for later (or in a separate section)
Then add tokenlists upgrade
that will go through all the lists and update them to the latest
n/a
Latest.
As per this PR: Uniswap/token-lists@74d8910,
object schemas are now supported in the schema for extensions.
However, when trying to use them, the package fails with a pydantic validation error: Incorrect extension field value: {...}
You will notice the tests fail for this reason too.
Probably the best way is to build another model for the new extension schema and include the model in the Union of supported types.
Some people might want to use this as a command line application, so let them!
It'd be really nice to be able to have an index of installable lists from the index provided at https://tokenlists.org/.
This would also support installing via alias from that index, as well as the normal URI method
$ tokenlists list --all
Installed lists:
...
Available lists:
...
n/a
I installed a list with invalid syntax. It installed without error, but the next time the process started, creating the manager erred with pydantic.error_wrappers.ValidationError: 63 validation errors for TokenList
and a long list of the errors. It does not say what file it was processing.
If a file fails to load, instead of raising a ValidationError, a warning should be emitted with the name of the file.
The default choice could be stored in the data folder, making it possible for there to be an automatically detected default when loading the library
Python environment
$ pip freeze
# ...copy and paste result of above command here...
Please include information like:
Tried to load this token lists: https://github.com/Uniswap/token-lists/blob/main/test/schema/example-crosschain.tokenlist.json
but it fails with ValidationError about extensions since it is dict and not one of the expected types
Handle multi-chain bridge like extensions data structure (dictionary of sorts)
See ApeWorX/ape#117
Add support for the cross-chain extension described here:
https://github.com/Uniswap/token-list-bridge-utils
ERROR: tokenlists 0.1.1 has requirement pyyaml<6,>=5.4.1, but you'll have pyyaml 6.0 which is incompatible
Fill this in if you have ideas on how the bug could be fixed.
Thanks for your work, but sry, I want to know how to use it?
I was trying to load "dai" but I had to instead load "DAI". Should these checks be case-sensitive? It might make duplicates more common, but I doubt it.
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.