Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Uniswap/v4-periphery
π¦ π¦ π¦ π¦ Peripheral smart contracts for interacting with Uniswap v4
https://github.com/Uniswap/v4-periphery
Last synced: about 1 month ago
JSON representation
π¦ π¦ π¦ π¦ Peripheral smart contracts for interacting with Uniswap v4
- Host: GitHub
- URL: https://github.com/Uniswap/v4-periphery
- Owner: Uniswap
- License: gpl-2.0
- Created: 2022-05-16T10:16:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-25T19:26:09.000Z (about 2 months ago)
- Last Synced: 2024-10-26T16:55:44.772Z (about 2 months ago)
- Language: Solidity
- Homepage: https://blog.uniswap.org/uniswap-v4
- Size: 7.56 MB
- Stars: 707
- Watchers: 20
- Forks: 483
- Open Issues: 55
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Audit: audits/DRAFT_ABDK_audit_periphery_universal_router.pdf
Awesome Lists containing this project
- awesome-uniswap-v4-hooks - Peripheral smart contracts for interacting with Uniswap v4 - periphery` hosts the logic that builds on top of the core pool logic like hook contracts, position managers, and even possibly libraries needed for integrations. It is still under development and is being updated as the v4 ecosystem matures. Includes the `BaseHook` contract that can be used as a base for creating custom hooks. (π Where to Start)
- awesome-uniswap-hooks - Peripheral smart contracts for interacting with Uniswap v4 - periphery` hosts the logic that builds on top of the core pool logic like hook contracts, position managers, and even possibly libraries needed for integrations. It is still under development and is being updated as the v4 ecosystem matures. Includes the `BaseHook` contract that can be used as a base for creating custom hooks. (π€ Introduction)
README
# Uniswap v4 Periphery
Uniswap v4 is a new automated market maker protocol that provides extensibility and customizability to pools. `v4-periphery` hosts the logic that builds on top of the core pool logic like hook contracts, position managers, and even possibly libraries needed for integrations. The `v4-periphery` contracts in this repository are still in development and further periphery contracts have not yet been built.
## Contributing
If youβre interested in contributing please see the [contribution guidelines](https://github.com/Uniswap/v4-periphery/blob/main/CONTRIBUTING.md)!
## Local Deployment and Usage
To utilize the contracts and deploy to a local testnet, you can install the code in your repo with forge:
```solidity
forge install https://github.com/Uniswap/v4-periphery
```If you are building hooks, it may be useful to inherit from the `BaseHook` contract:
```solidity
import {BaseHook} from 'v4-periphery/src/base/hooks/BaseHook.sol';
contract CoolHook is BaseHook {
// Override the hook callbacks you want on your hook
function beforeAddLiquidity(
address,
IPoolManager.PoolKey calldata key,
IPoolManager.ModifyLiquidityParams calldata params
) external override onlyByManager returns (bytes4) {
// hook logic
return BaseHook.beforeAddLiquidity.selector;
}
}```
## License
The license for Uniswap V4 Periphery is the GNU General Public License (GPL 2.0), see [LICENSE](https://github.com/Uniswap/v4-periphery/blob/main/LICENSE).