Description:
Decentralized Finance (DeFi) protocol contract providing Liquidity functionality.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapV2Router {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
}
interface IERC20 {
function approve(address spender, uint amount) external returns (bool);
}
contract RemovePUSHLP {
address public router = 0x7a250D5630b4Cf539739Df2c5DacAB9E14d2d923; // ✅ Correct checksum
address public token = 0x61024aE02Db86C3e2e4da0697BD28467240DD1bd; // PUSH token
address public lpHolder = 0xb3890AE15411397B77Fa4B5E8b77EcF41420FB1a; // Your wallet
function removeAllLP(uint liquidity) external {
// Approve router to spend LP tokens
IERC20(lpHolder).approve(router, liquidity);
// Remove liquidity
IUniswapV2Router(router).removeLiquidityETHSupportingFeeOnTransferTokens(
token,
liquidity,
0, // Accept any amount of PUSH
0, // Accept any amount of ETH
lpHolder,
block.timestamp + 600 // Deadline: 10 minutes from now
);
}
}
Submitted on: 2025-10-09 15:23:08
Comments
Log in to comment.
No comments yet.