You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 1, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/aggregation-protocol/smart-contract/UnoswapRouter.md
+2-17Lines changed: 2 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -462,22 +462,7 @@ function uniswapV3SwapCallback(
462
462
bytes
463
463
) external
464
464
```
465
-
Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
465
+
See {IUniswapV3SwapCallback-uniswapV3SwapCallback}
466
+
Called by UniswapV3 pool during the swap operation initiated by UnoswapRouter's methods with UniswapV3. This callback function ensures the proper transfer of tokens based on the swap's configuration. It handles the transfer of tokens by either directly transferring the tokens from the payer to the recipient, or by using a secondary permit contract to transfer the tokens if required by the pool. It verifies the correct pool is calling the function and uses inline assembly for efficient execution and to access low-level EVM features.
466
467
467
-
In the implementation you must pay the pool tokens owed for the swap.
468
-
The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
469
-
amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
|`amount0Delta` | int256 | The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.
475
-
|`amount1Delta` | int256 | The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.
476
-
|`` | bytes | Any data passed through by the caller via the IUniswapV3PoolActions#swap call
0 commit comments