Skip to content
forked from Uniswap/v4-core

🦄 🦄 🦄 🦄 Core smart contracts of Uniswap v4

License

Notifications You must be signed in to change notification settings

Mahgol78/v4-core

Repository files navigation

Uniswap Protocol

Lint Tests Mythx npm version

This repository contains the smart contracts for the Uniswap Protocol.

Local deployment

In order to deploy this code to a local testnet, you should install the npm package @uniswap/core-next and import the factory bytecode located at @uniswap/core-next/artifacts/contracts/PoolManager.sol/PoolManager.json. For example:

import {
  abi as FACTORY_ABI,
  bytecode as FACTORY_BYTECODE,
} from '@uniswap/core-next/artifacts/contracts/PoolManager.sol/PoolManager.json'

// deploy the bytecode

This will ensure that you are testing against the same bytecode that is deployed to mainnet and public testnets, and all Uniswap code will correctly interoperate with your local deployment.

Using solidity interfaces

The Uniswap v3 interfaces are available for import into solidity smart contracts via the npm artifact @uniswap/core-next, e.g.:

import '@uniswap/core-next/contracts/interfaces/IPoolManager.sol';

contract MyContract {
  IPoolManager pool;

  function doSomethingWithPool() {
    // pool.swap(...);
  }
}

About

🦄 🦄 🦄 🦄 Core smart contracts of Uniswap v4

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 67.7%
  • TypeScript 24.4%
  • TeX 7.8%
  • Just 0.1%