Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
moodysalem committed Nov 10, 2021
1 parent 5601f6c commit fe8ff5c
Show file tree
Hide file tree
Showing 49 changed files with 782 additions and 824 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mythx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
--mode deep \
--async \
--create-group \
--group-name "@uniswap/v3-core@${{ github.sha }}" \
--group-name "@uniswap/core-experiments@${{ github.sha }}" \
--solc-version 0.8.9 \
--check-properties \
contracts/test/TickBitmapEchidnaTest.sol --include TickBitmapEchidnaTest \
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Uniswap V3

[![Lint](https://github.com/Uniswap/uniswap-v3-core/actions/workflows/lint.yml/badge.svg)](https://github.com/Uniswap/uniswap-v3-core/actions/workflows/lint.yml)
[![Tests](https://github.com/Uniswap/uniswap-v3-core/actions/workflows/tests.yml/badge.svg)](https://github.com/Uniswap/uniswap-v3-core/actions/workflows/tests.yml)
[![Fuzz Testing](https://github.com/Uniswap/uniswap-v3-core/actions/workflows/fuzz-testing.yml/badge.svg)](https://github.com/Uniswap/uniswap-v3-core/actions/workflows/fuzz-testing.yml)
[![Mythx](https://github.com/Uniswap/uniswap-v3-core/actions/workflows/mythx.yml/badge.svg)](https://github.com/Uniswap/uniswap-v3-core/actions/workflows/mythx.yml)
[![npm version](https://img.shields.io/npm/v/@uniswap/v3-core/latest.svg)](https://www.npmjs.com/package/@uniswap/v3-core/v/latest)
[![Lint](https://github.com/Uniswap/v3-core/actions/workflows/lint.yml/badge.svg)](https://github.com/Uniswap/v3-core/actions/workflows/lint.yml)
[![Tests](https://github.com/Uniswap/v3-core/actions/workflows/tests.yml/badge.svg)](https://github.com/Uniswap/v3-core/actions/workflows/tests.yml)
[![Fuzz Testing](https://github.com/Uniswap/v3-core/actions/workflows/fuzz-testing.yml/badge.svg)](https://github.com/Uniswap/v3-core/actions/workflows/fuzz-testing.yml)
[![Mythx](https://github.com/Uniswap/v3-core/actions/workflows/mythx.yml/badge.svg)](https://github.com/Uniswap/v3-core/actions/workflows/mythx.yml)
[![npm version](https://img.shields.io/npm/v/@uniswap/core-experiments/latest.svg)](https://www.npmjs.com/package/@uniswap/core-experiments/v/latest)

This repository contains the core smart contracts for the Uniswap V3 Protocol.
For higher level contracts, see the [uniswap-v3-periphery](https://github.com/Uniswap/uniswap-v3-periphery)
Expand All @@ -17,16 +17,16 @@ This repository is subject to the Uniswap V3 bug bounty program, per the terms d
## Local deployment

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

```typescript
import {
abi as FACTORY_ABI,
bytecode as FACTORY_BYTECODE,
} from '@uniswap/v3-core/artifacts/contracts/UniswapV3Factory.sol/UniswapV3Factory.json'
} from '@uniswap/core-experiments/artifacts/contracts/PoolFactory.sol/PoolFactory.json'

// deploy the bytecode
```
Expand All @@ -38,13 +38,13 @@ your local deployment.
## Using solidity interfaces

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

```solidity
import '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';
import '@uniswap/core-experiments/contracts/interfaces/Pool.sol';
contract MyContract {
IUniswapV3Pool pool;
IPool pool;
function doSomethingWithPool() {
// pool.swap(...);
Expand Down
4 changes: 2 additions & 2 deletions audits/tob/contracts/crytic/echidna/E2E_mint_burn.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma abicoder v2;
import './Setup.sol';
import '../../../../../contracts/test/TestERC20.sol';
import '../../../../../contracts/libraries/TickMath.sol';
import '../../../../../contracts/UniswapV3Pool.sol';
import '../../../../../contracts/Pool.sol';
import '../../../../../contracts/libraries/Position.sol';

// import 'hardhat/console.sol';
Expand All @@ -13,7 +13,7 @@ contract E2E_mint_burn {
SetupTokens tokens;
SetupUniswap uniswap;

UniswapV3Pool pool;
Pool pool;

TestERC20 token0;
TestERC20 token1;
Expand Down
4 changes: 2 additions & 2 deletions audits/tob/contracts/crytic/echidna/E2E_swap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ pragma abicoder v2;
import './Setup.sol';
import '../../../../../contracts/test/TestERC20.sol';
import '../../../../../contracts/libraries/TickMath.sol';
import '../../../../../contracts/UniswapV3Pool.sol';
import '../../../../../contracts/Pool.sol';

// import 'hardhat/console.sol';

contract E2E_swap {
SetupTokens tokens;
SetupUniswap uniswap;

UniswapV3Pool pool;
Pool pool;

TestERC20 token0;
TestERC20 token1;
Expand Down
24 changes: 12 additions & 12 deletions audits/tob/contracts/crytic/echidna/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ pragma solidity =0.7.6;
pragma abicoder v2;

import '../../../../../contracts/test/TestERC20.sol';
import '../../../../../contracts/UniswapV3Pool.sol';
import '../../../../../contracts/UniswapV3Factory.sol';
import '../../../../../contracts/Pool.sol';
import '../../../../../contracts/PoolFactory.sol';

contract SetupToken {
TestERC20 public token;
Expand Down Expand Up @@ -54,30 +54,30 @@ contract SetupTokens {
}

contract SetupUniswap {
UniswapV3Pool public pool;
Pool public pool;
TestERC20 token0;
TestERC20 token1;

// will create the following enabled fees and corresponding tickSpacing
// fee 500 + tickSpacing 10
// fee 3000 + tickSpacing 60
// fee 10000 + tickSpacing 200
UniswapV3Factory factory;
PoolFactory factory;

constructor(TestERC20 _token0, TestERC20 _token1) public {
factory = new UniswapV3Factory();
factory = new PoolFactory();
token0 = _token0;
token1 = _token1;
}

function createPool(uint24 _fee, uint160 _startPrice) public {
pool = UniswapV3Pool(factory.createPool(address(token0), address(token1), _fee));
pool = Pool(factory.createPool(address(token0), address(token1), _fee));
pool.initialize(_startPrice);
}
}

contract UniswapMinter {
UniswapV3Pool pool;
Pool pool;
TestERC20 token0;
TestERC20 token1;

Expand All @@ -94,11 +94,11 @@ contract UniswapMinter {
token1 = _token1;
}

function setPool(UniswapV3Pool _pool) public {
function setPool(Pool _pool) public {
pool = _pool;
}

function uniswapV3MintCallback(
function mintCallback(
uint256 amount0Owed,
uint256 amount1Owed,
bytes calldata data
Expand Down Expand Up @@ -149,7 +149,7 @@ contract UniswapMinter {
}

contract UniswapSwapper {
UniswapV3Pool pool;
Pool pool;
TestERC20 token0;
TestERC20 token1;

Expand All @@ -167,11 +167,11 @@ contract UniswapSwapper {
token1 = _token1;
}

function setPool(UniswapV3Pool _pool) public {
function setPool(Pool _pool) public {
pool = _pool;
}

function uniswapV3SwapCallback(
function swapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
Expand Down
2 changes: 1 addition & 1 deletion bug-bounty.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

Starting on March 23rd, 2021, the [uniswap-v3-core](https://github.com/Uniswap/uniswap-v3-core) repository is subject to the Uniswap V3 Bug Bounty (the “Program”) to incentivize responsible bug disclosure.
Starting on March 23rd, 2021, the [v3-core](https://github.com/Uniswap/v3-core) repository is subject to the Uniswap V3 Bug Bounty (the “Program”) to incentivize responsible bug disclosure.

We are limiting the scope of the Program to critical and high severity bugs, and are offering a reward of up to $500,000. Happy hunting!

Expand Down
Loading

0 comments on commit fe8ff5c

Please sign in to comment.