Skip to content

About

Solidity snippets for integrating and using Uniswap v4, a fork of solidity-by-example

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Solidity snippets for all things Uniswap v4

Parcours français

  1. Présentation
  2. Installation
  3. Architecture
  4. Initialiser un pool
  5. Ajouter de la liquidité
  6. Effectuer un swap
  7. Frais, hooks et tests

largely inspired by solidity-by-example


License

MIT License


Contributing Guide

The project is welcoming all contributions. Please try to limit PRs to:

  1. Minimally opinonated examples that showcase v4 features
  2. Syncing existing snippets with the latest v4 changes

Setup

Requires node 18

git clone git@github.com:uniswapfoundation/v4-by-example.git

npm i
npm start

Creating a new page

cp -r src/template src/pages/<path>/<name>

Edit the following files

  • src/pages/<path>/<name>/index.md
  • src/pages/<path>/<name>/Template.sol

Please write foundry tests in forge-test/ for your .sol files!

Register the page on nav.ts

{
  path: "<name>",
  title: "TITLE"
}

Generate react, register routes, and rebuild search index

npm run generate

Update the changelog

About

Solidity snippets for integrating and using Uniswap v4, a fork of solidity-by-example

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages