1 | # Swoop - a fork of Uniswap V2 for Harmony
|
2 |
|
3 | Swoop is a fork of Uniswap V2 for Harmony's #Hack9 hackathon.
|
4 |
|
5 | This repository contains the smart contracts for the project.
|
6 |
|
7 | # Local Development
|
8 |
|
9 | ## Install Dependencies
|
10 |
|
11 | `./scripts/install.sh`
|
12 |
|
13 | ## Build/Compile Contracts
|
14 |
|
15 | `./scripts/build.sh`
|
16 |
|
17 | ## Run Tests
|
18 |
|
19 | `yarn test`
|
20 |
|
21 | ## Deploy contracts
|
22 |
|
23 | ### Using hmy:
|
24 |
|
25 | Usage:
|
26 | `./scripts/deploy.sh --network NETWORK`
|
27 |
|
28 | Example:
|
29 | `./scripts/deploy.sh --network testnet`
|
30 |
|
31 | ### Using truffle:
|
32 |
|
33 | Truffle requires NodeJS v12, otherwise it seems to break.
|
34 | The current deployment using Truffle is also currently not working properly - the hmy deployment method is preferable and is also the default deployment method.
|
35 |
|
36 | Usage:
|
37 | `./scripts/deploy.sh --method truffle --network NETWORK`
|
38 |
|
39 | Example:
|
40 | `./scripts/deploy.sh --method truffle --network testnet`
|
41 |
|
42 | You can also use `--reset` and `--skip-dry-run` to reset any eventual migration from scratch as well as skipping dry runs.
|
43 | Example:
|
44 | `./scripts/deploy.sh --method truffle --network testnet --reset --skip-dry-run`
|
45 |
|
46 | ## Extract ABI
|
47 |
|
48 | `./scripts/abi.sh`
|
49 |
|
50 | ---
|
51 |
|
52 | # Uniswap V2
|
53 |
|
54 | [![Actions Status](https://github.com/swoop-ex/swoop-core/workflows/CI/badge.svg)](https://github.com/swoop-ex/swoop-core/actions)
|
55 | [![Version](https://img.shields.io/npm/v/@swoop-exchange/core)](https://www.npmjs.com/package/@swoop-exchange/core)
|
56 |
|
57 | In-depth documentation on Uniswap V2 is available at [uniswap.org](https://uniswap.org/docs).
|
58 |
|
59 | The built contract artifacts can be browsed via [unpkg.com](https://unpkg.com/browse/@swoop-exchange/core@latest/).
|
60 |
|
61 | # Local Development
|
62 |
|
63 | The following assumes the use of `node@>=10`.
|
64 |
|
65 | ## Install Dependencies
|
66 |
|
67 | `yarn`
|
68 |
|
69 | ## Compile Contracts
|
70 |
|
71 | `yarn compile`
|
72 |
|
73 | ## Run Tests
|
74 |
|
75 | `yarn test`
|