Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Keinberger/royalty-swap
https://github.com/Keinberger/royalty-swap
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/Keinberger/royalty-swap
- Owner: Keinberger
- License: mit
- Created: 2024-03-15T21:29:17.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-17T01:52:34.000Z (9 months ago)
- Last Synced: 2024-08-02T16:33:29.740Z (4 months ago)
- Language: TypeScript
- Size: 3.49 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-uniswap-hooks - Royalty Swap - swap-n8y1i)): A hook to provide discounted swap fees for high volume traders (📜 Examples / From Hackathon)
- awesome-uniswap-v4-resources - Royalty Swap - swap-n8y1i)): A hook to provide discounted swap fees for high volume traders (📑 Table of Contents / From Hackathon)
- awesome-uniswap-v4-resources - Royalty Swap - swap-n8y1i)): A hook to provide discounted swap fees for high volume traders (📑 Table of Contents / From Hackathon)
README
# royalty-swap
## Install Dependencies
```bash
npm install
cd nextjs
npm install
cd contracts
forge install
```## Define environment variables
```bash
cp .env.example .env
```## Get Started
1. Build the contracts
```bash
cd contracts
forge build
```2. Start the local network
```bash
cd contracts/
anvil --hardfork cancun
```3. Deploy the local V4 pool (including hook)
```bash
cd contracts/
forge script script/Anvil.s.sol \
--rpc-url http://localhost:8545 \
--private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
--broadcast
```4. Start the frontend
```bash
cd nextjs/
npm run dev
```