Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mergd/ref-fee-hook
Referral fees for liquidity
https://github.com/mergd/ref-fee-hook
Last synced: about 1 month ago
JSON representation
Referral fees for liquidity
- Host: GitHub
- URL: https://github.com/mergd/ref-fee-hook
- Owner: mergd
- License: mit
- Created: 2023-10-08T07:13:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-08T08:43:49.000Z (about 1 year ago)
- Last Synced: 2024-08-02T16:32:22.498Z (4 months ago)
- Language: Solidity
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-uniswap-hooks - Ref Fee Hook
- awesome-uniswap-v4-resources - Ref Fee Hook
- awesome-uniswap-v4-resources - Ref Fee Hook
README
# v4 Referral hook
### **Hook for taking referral fees if provided a referral codeπ¦**
Built for the ethOnline Hackathon
---
### Local Development (Anvil)
_requires [foundry](https://book.getfoundry.sh)_
```
forge install
forge test
```Because v4 exceeds the bytecode limit of Ethereum and it's _business licensed_, we can only deploy & test hooks on [anvil](https://book.getfoundry.sh/anvil/).
```bash
# start anvil, with a larger code limit
anvil --code-size-limit 30000# in a new terminal
forge script script/Counter.s.sol \
--rpc-url http://localhost:8545 \
--private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
--code-size-limit 30000 \
--broadcast
```---
Additional resources:
[v4-periphery](https://github.com/uniswap/v4-periphery) contains advanced hook implementations that serve as a great reference
[v4-core](https://github.com/uniswap/v4-core)