mergd / ref-fee-hook

Referral fees for liquidity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v4 Referral hook

Hook for taking referral fees if provided a referral codešŸ¦„

Built for the ethOnline Hackathon


Local Development (Anvil)

requires foundry

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.

# 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 contains advanced hook implementations that serve as a great reference

v4-core

About

Referral fees for liquidity

License:MIT License


Languages

Language:Solidity 100.0%