Skip to content

Instantly share code, notes, and snippets.

View Zodomo's full-sized avatar

Zodomo Zodomo

View GitHub Profile
@QuantSoldier
QuantSoldier / UniswapAdd.sol
Created February 7, 2021 06:36
Uniswap V2: Gas Efficient Contract to add Liquidity to any ETH/ERC-20 LP Pair with ETH
pragma solidity ^0.7.0;
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {IUniswapV2Router02} from '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
interface IWETH9 {
function deposit() external payable;
}