Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a token is in a list multiple times, it fails to load the token info #19

Open
fubuloubu opened this issue Jun 3, 2022 · 0 comments

Comments

@fubuloubu
Copy link
Member

Environment information

  • ape and plugin versions:
$ ape --version
0.2.7

$ ape plugins list
Installed Plugins:
  hardhat      0.2.2
  solidity     0.2.3
  tokens       0.2.0
  infura       0.2.0
  etherscan    0.2.1
  alchemy      0.2.0
  foundry      0.2.0
  vyper        0.2.0
  ens          0.2.0
  • Python Version: 3.9.9
  • OS: linux

What went wrong?

Not quite sure what happens here, and may be related to the error shown in #18, but it appears that if a token is in a list multiple times, it will not properly handle that result and fail to find a matching token.

$ ape tokens list-tokens --search APE
...
0x4d224452801aced8b2f0aebe155379bb5d594381 (APE)
0x40e0a6ef9dbadfc83c5e0d15262feb4638588d77 (APE)
...
0x26ea1f595f6567b7050fbba24f6a66e19db4d560 (APE)

How can it be fixed?

May have to expose alternative flags to filter down on, like what decimals it has, address, etc.
Or, offer a way to ignore specific entries in a list in this scenario.

Might need to be moved to py-tokenlists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant