Description
Description
In the Defi protocol, it is very common to use "uniswapV3SwapCallback" like interface function to receive the callbak from LP, However some implementation of uniswapV3SwapCallback has no premission controll. Just as the uniswap official give the caution:
You can also check the background in my article here:
refer:https://medium.com/@zhanchihu/watch-your-back-while-you-want-to-do-aribitrage-with-uniswap-flashloan-f456e4f3e99d
Tests
todo
Implementation details
I want to implement a module to hook the CALL instruction, and give the constraint like
- the selector of message transaction call is "uniswapV3SwapCallback"
- ERC20 token could transfer to other address without any premission controlls
Now, my problem is how can I get the selector in the current CALL instruction. I have checked the "state.environment.calldata", and will to extract the selector, but in debug mode it look like this
Is there any convient way for me to get selector?