Open hujw77 opened 2 years ago
Thanks for digging into this and providing such a detailed report!
It would be best to support ERC20 with symbol() view returns (bytes32)
but I can't think of an elegant way to do this given the current code (without adding retries).
We generally do not add tokens to the Uniswap default list and prefer users to use community owned lists, so that option is unlikely.
For now, I went with a third option which adds the token to the smart-order-router's hardcoded list of known tokens. We use this list, and the uniswap default token list, to seed our cache of token metadata. https://github.com/Uniswap/smart-order-router/commit/5e60d46c7996eb1a6ee632c65e177cd874dad8db
We will release this to the API in the next few days so RING should be swappable soon
Thanks for the commit 5e60d46.
It would be best to support ERC20 with symbol() view returns (bytes32) but I can't think of an elegant way to do this given the current code (without adding retries).
I agree with this approach. Because of there is a lot of token still have this issue.
RING/ETH
pair atapp.uniswap.org
. An HTTP 500 error occur.{"errorCode":"INTERNAL_ERROR","detail":"Unexpected error","id":"1e381"}
A
call revert error
occurred, I think the reason is RING's symbol type isbytes32
not thestring
. This is a historical reason. https://github.com/dapphub/ds-token/pull/28 And there is a lot of token like MKR have the same issue, but theMKR
token is in the@uniswap/default-token-list
, so it has no effect onMRK
. But other tokens likeRING
got hit. And I file an issue at https://github.com/Uniswap/default-token-list/issues/1031. To verify my idea, I addedRING
to@uniswap/default-token-list
locally. It works 🚀RING
token to@uniswap/default-token-list
https://github.com/Uniswap/default-token-list/issues/1031 or support ERC20 which isfunction symbol() view returns (bytes32)