Uniswap / universal-router

Uniswap's Universal Router for NFT and ERC20 swapping
GNU General Public License v3.0
393 stars 196 forks source link

Sweep list of command contains an unknown command #321

Open r-oman-G opened 11 months ago

r-oman-G commented 11 months ago

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?