mirror of
https://github.com/lux-amm/v4-periphery.git
synced 2026-10-30 20:54:39 +00:00
30 lines
736 B
Solidity
30 lines
736 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
import {MockERC20} from "solmate/src/test/utils/mocks/MockERC20.sol";
|
|
import {IPositionManager} from "../../src/interfaces/IPositionManager.sol";
|
|
|
|
contract ReentrantToken is MockERC20 {
|
|
IPositionManager immutable posm;
|
|
|
|
constructor(IPositionManager _posm) MockERC20("Reentrant Token", "RT", 18) {
|
|
posm = _posm;
|
|
}
|
|
|
|
function transferFrom(
|
|
address,
|
|
/*from*/
|
|
address,
|
|
/*to*/
|
|
uint256 /*amount*/
|
|
)
|
|
public
|
|
override
|
|
returns (bool)
|
|
{
|
|
// we dont need data because itll revert before it does anything
|
|
posm.modifyLiquidities("", type(uint256).max);
|
|
return true;
|
|
}
|
|
}
|