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

Sweep list of command contains an unknown command #321

Open
r-oman-G opened this issue Oct 6, 2023 · 0 comments
Open

Sweep list of command contains an unknown command #321

r-oman-G opened this issue Oct 6, 2023 · 0 comments

Comments

@r-oman-G
Copy link

r-oman-G commented Oct 6, 2023

I'm trying to decode Sweep calldata from the Uniswap

I have a connection from my crypto wallet to Uniswap via WalletConnect.
Then I'm trying to sweep 2 NFTs:

the collection: https://app.uniswap.org/nfts/collection/0x629a673a8242c2ac4b7b8c5d8735fbeac21a6205

  1. the first nft:
    link: https://app.uniswap.org/nfts/asset/0x629a673a8242c2ac4b7b8c5d8735fbeac21a6205
    id: 9733296659478493915880969684600626909805707300578635623530244469208768225938
  2. the second nft:
    link: https://app.uniswap.org/nfts/asset/0x629a673a8242c2ac4b7b8c5d8735fbeac21a6205
    id: 9842127485099629953284668412991815044198954568604258895311206734417524215009

Then I receive eth_sendTransaction with that JSON data:

0 = {map entry} "gas" -> "0xc0a0e"
1 = {map entry} "value" -> "0x132f4579c98000"
2 = {map entry} "from" -> "0x3d0e21e1a11e497f0a618bc8d811acc8a6c976bc"
3 = {map entry} "to" -> "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
4 = {map entry} "data" -> "i will attach the data in the txt file below"

The to field is 0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad so it's Uniswap Universal Router

uniswap_sweep_calldata.txt

Then, I try to decode the data and receive that list of commands:
0x989804
https://tools.deth.net/calldata-decoder you can try to paste the calldata from the file to that service and see
CleanShot 2023-10-06 at 12 32 34

There it states that the commands go up to 0x3f, but from 0x25 to 0x3f are placeholders:
https://github.com/Uniswap/universal-router/blob/main/contracts/libraries/Commands.sol

Command 0x98 is not described in Uniswap library. So, how i can decode the command and the command input?

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