Code Monkey home page Code Monkey logo

solidity-lib's Introduction

uniswap-lib

Tests Static Analysis Lint Fuzz Testing npm

Solidity libraries that are shared across Uniswap contracts. This package focuses on safety and execution gas efficiency.

Install

Run yarn to install dependencies.

Test

Run yarn test to execute the test suite.

Usage

Install this in another project via yarn add @uniswap/lib

Then import the contracts via:

import '@uniswap/lib/contracts/libraries/Babylonian.sol';

solidity-lib's People

Contributors

lint-action avatar moodysalem avatar noahzinsmeister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solidity-lib's Issues

improve precision of `divuq`

Ideally, we would like to minimize the lossiness of divuq to the lowest-precision bit. There are 3 broad strategies:

  1. Full-precision multiplication + division with native ops when inputs are acceptably bounded inside uint256
  • Implemented
  1. Full-precision 336x256 division when inputs exceed uint256
  1. Long division

PairNamer.sol requires solidity version <0.7.0

After version 0.7.0,while regular string literals can only contain ASCII, Unicode literals โ€“ prefixed with the keyword unicode โ€“ can contain any valid UTF-8 sequence.

string memory a = unicode"Hello ๐Ÿ˜ƒ";

So the pragma in PairName.sol should be solidity >=0.5.0 <0.7.0;

fullDiv in FullMath Library does not work correctly

This function does not work correctly. If you call: fullDiv(
uint256 l,
uint256 h,
uint256 d
)

with l=238, d = 234, the return value is: 72246346276274207401031469278924933959732554534972317734020543868185115074491

if you call with l=2m d=234, the output is:
94019217756795201412301227143806420906501269600306440886739063938049122357213

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.