in V3?
I'm curious why you think it should.
so you can easily check whether the address you're given is a uniswap pool / a uniswap pair (V2)
There is probably a way to determine that without Uniswap having to add the overhead of implementing ERC-165.
You could analyze address.codehash
Why would they add that?
contract.factory() == univ3factory?
So maybe put this in a try/catch or something i'm thinking
oh, i forgot to mention: i don't need this in a contract. i need it off-chain
i'm building a webapp. i want to show what "type" an address is to the user. i.e. EOA, ERC-20, ERC-721, uniswap, etc. The list of actions available to the user depends on the "address type"
ok, that definitely adds context to things
So I think Grim's solution is as good as it gets, here is a more verbose explanation: https://ethereum.stackexchange.com/questions/102597/detect-if-destination-is-a-uniswap-v3-pool
If its off chain, you can make a query on uni v3 info website
yeah, i'll use that solution. it's actually better than my ERC-20 contract detection because using this, there is a double-check with the factory. thank you!
Обсуждают сегодня