UniswapEasy is a React widget for providing liquidity to Uniswap V4. This package is designed for easy integration of Uniswap liquidity management into React applications.
npm install uniswapeasy
# or
yarn add uniswapeasy
Before building, ensure you have all peer dependencies installed. Your project should have react
, react-dom
, react-redux
, redux
, redux-persist
, styled-components
, and ethers
as they are listed as peer dependencies.
To build the package from source:
- Clone the repository:
git clone https://github.com/GamCap/uniswapeasy.git
- Navigate to the project directory:
cd uniswapeasy
- Install dependencies:
yarn install
- Run the prebuild script which includes ABI type generation:
yarn prebuild
- Build the package:
The build artifacts will be outputted to the
yarn build
dist
directory.
Import UniswapEasy
from the package and use it in your React application. Note that the package is currently hard-coded to work on the Goerli testnet, which means contract addresses are pre-set for that network.
To customize the pool via the poolKeys input, pass an array of pool configurations to the UniswapEasy component. Only the first pool is displayed as pool selection has not been implemented yet.
<UniswapEasy
// ...other props
poolKeys={[{
currency0: new Token(/* ... */),
currency1: new Token(/* ... */),
fee: /* ... */,
tickSpacing: /* ... */,
hooks: /* ... */,
}]}
/>
Below are links to the smart contracts on the Goerli testnet and other resources that are used by this widget:
- PoolModifyPositionTest Contract: View on Etherscan
- PoolManager Contract: View on Etherscan
- Example Pool ID:
0x81c2aeb9580f893f1bd130ea78633f476604312c9122e3d3988a8dd72e3494dd
- UNI Token Contract: View on Etherscan
- USDC Token Contract: View on Etherscan
- Aave Faucet: Access the Faucet
These resources are essential for developers looking to understand the underlying contracts and for testing purposes using the Goerli testnet.
This project is licensed under the MIT License - see the LICENSE
file for details.