Hello
How I can search for contracts by name. I could not find the contract UniswapV2Callee. Does someone know the contract address?
Hello
How I can search for contracts by name. I could not find the contract UniswapV2Callee. Does someone know the contract address?
Not a specific contract. It's a contract that implements IUniswapV2Callee. It's commonly used for flashswaps (every trade on uniswap is also flashswap), but can also be used to trade and call back to a contract (the contract needs to transfer the tokens to be paid in the callback)
Ok, what will happen if I change the function uniswapV2Callee() to xyV2Callee() will it still works ? My understanding is that the function need to be implemented somewhere but it is not in the repo. Therefore, if the function is called what is doing exactly if there is not implementation of it?
if you look at the code for the uniswap pair, you can see it only gets called called if the length of the data
argument is >0
. The router passes the data
with 0 length, so no needed implementation in the uniswap code. It's mean to be used for flashloans/flashswaps.
Your contract that borrows from the pair needs to implement it, the exchange doesn't