Coder Social home page Coder Social logo

loris-epfl / uniswap-v4-tests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamesbachini/uniswap-v4-tests

0.0 0.0 0.0 3.46 MB

A test suite for working with Uniswap v4 Hooks

License: MIT License

Shell 0.16% JavaScript 19.89% Ruby 4.46% Python 0.03% Julia 0.84% TypeScript 2.36% TeX 0.41% Nix 0.01% Makefile 0.06% Solidity 71.79% Just 0.01%

uniswap-v4-tests's Introduction

Uniswap v4 Tests

A Uniswap v4 hook which creates an afterSwap hook to check if price is above or below 1:1 for a stable pair. After a swap takes place if price is below 1:1 it will rebalance the pool either by adding liquidity or making a swap.

Test in foundry (recommend using WSL or a unix based OS)

curl -L https://foundry.paradigm.xyz | bash
source /home/james/.bashrc
foundryup
forge install https://github.com/Uniswap/v4-core --no-commit
forge install openzeppelin/openzeppelin-contracts --no-commit
forge install marktoda/forge-gas-snapshot --no-commit
forge test

More info on Uniswap v4 hooks at https://jamesbachini.com/uniswap-v4-hooks/

uniswap-v4-tests's People

Contributors

jamesbachini avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.