Skip to content

Commit

Permalink
docs: add OpenZeppelin hooks reference to setup guide (#878)
Browse files Browse the repository at this point in the history
Co-authored-by: saucepoint <[email protected]>
  • Loading branch information
ocandocrypto and saucepoint authored Jan 29, 2025
1 parent b2875ac commit 52c3cab
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/contracts/v4/quickstart/04-hooks/00-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,20 @@ With the environment set up ready to be built on. Jump over to the guides sectio
forge test --rpc-url 127.0.0.1:8545
```

# Appendix: OpenZeppelin Hooks Library

> [OpenZeppelin Hooks Library](https://docs.openzeppelin.com/uniswap-hooks/1.x/), included in [v4-template](https://github.com/uniswapfoundation/v4-template), provides secure and modular reference implementations for Uniswap v4 Hooks!
If you're starting from scratch, you can install the OpenZeppelin Hooks library:

```bash
$ forge install OpenZeppelin/uniswap-hooks
```

The library includes:
- **BaseHook**: Core scaffolding with security checks and permission management
- **BaseCustomAccounting**: For implementing hook-owned liquidity and custom token accounting
- **BaseCustomCurve**: For replacing default concentrated liquidity math with custom swap logic
- **BaseAsyncSwap**: For implementing non-atomic and asynchronous swaps
- **BaseDynamicFee**: For implementing dynamic fee pools
- **BaseOverrideFee**: For implementing dynamic fees on every swap

0 comments on commit 52c3cab

Please sign in to comment.