Skip to content

Commit a018085

Browse files
author
alagunoff
committed
Updates
0 parents  commit a018085

File tree

120 files changed

+1694
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1694
-0
lines changed

.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
REACT_APP_INFURA_KEY="4bf032f2d38a4ed6bb975b80d6340847"
2+
REACT_APP_WALLETCONNECT_BRIDGE_URL="https://uniswap.bridge.walletconnect.org"
3+
# Because we use storybook which has its own babel-loader dependency @ 8.2.2, where react-scripts uses 8.1.0
4+
SKIP_PREFLIGHT_CHECK=true

.env.production

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
REACT_APP_INFURA_KEY="099fc58e0de9451d80b18d7c74caa7c1"
2+
REACT_APP_PORTIS_ID="c0e2bf01-4b08-4fd5-ac7b-8e26b58cd236"
3+
REACT_APP_FORTMATIC_KEY="pk_live_F937DF033A1666BF"
4+
REACT_APP_GOOGLE_ANALYTICS_ID="UA-128182339-4"

.eslintrc.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"ecmaVersion": 2020,
5+
"sourceType": "module",
6+
"ecmaFeatures": {
7+
// Allows for the parsing of JSX
8+
"jsx": true
9+
}
10+
},
11+
"ignorePatterns": ["node_modules/**/*", "uniswap-packages-forks/**/*"],
12+
"settings": {
13+
"react": {
14+
"version": "detect"
15+
}
16+
},
17+
"extends": [
18+
"plugin:react/recommended",
19+
"plugin:@typescript-eslint/recommended",
20+
"plugin:react-hooks/recommended",
21+
"prettier/@typescript-eslint",
22+
"plugin:prettier/recommended"
23+
],
24+
"rules": {
25+
"@typescript-eslint/explicit-function-return-type": "off",
26+
"prettier/prettier": [
27+
"error",
28+
{
29+
"endOfLine": "auto"
30+
}
31+
],
32+
"@typescript-eslint/no-explicit-any": "off",
33+
"@typescript-eslint/ban-ts-comment": "off",
34+
"@typescript-eslint/ban-ts-ignore": "off",
35+
"@typescript-eslint/explicit-module-boundary-types": "off"
36+
}
37+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Bug Report
3+
about: Describe an issue in the Uniswap Interface
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Bug Description**
10+
A clear and concise description of the bug.
11+
12+
**Steps to Reproduce**
13+
14+
1. Go to ...
15+
2. Click on ...
16+
...
17+
18+
**Expected Behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Additional Context**
22+
Add any other context about the problem here (screenshots, whether the bug only occurs only in certain mobile/desktop/browser environments, etc.)

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Support
4+
url: https://discord.gg/FCfyBSbCU5
5+
about: Please ask and answer questions here
6+
- name: List a token
7+
url: https://github.com/Uniswap/default-token-list#adding-a-token
8+
about: Any requests to add a token to Uniswap should go here
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for improving the UX of the Uniswap Interface
4+
title: ''
5+
labels: 'improvement'
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Check PR Title"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
check-pr-title:
12+
name: Check PR Title
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: amannn/[email protected]
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Integration Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
integration-tests:
13+
name: Cypress
14+
runs-on: ubuntu-16.04
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Set up node
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: 14
23+
registry-url: https://registry.npmjs.org
24+
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
27+
28+
- run: yarn cypress install
29+
- run: yarn build
30+
env:
31+
CI: false
32+
REACT_APP_NETWORK_URL: "https://mainnet.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847"
33+
34+
- run: yarn integration-test
35+
env:
36+
CYPRESS_INTEGRATION_TEST_PRIVATE_KEY: ${{ secrets.CYPRESS_INTEGRATION_TEST_PRIVATE_KEY }}
37+
38+

.github/workflows/lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request_target:
8+
branches:
9+
- main
10+
11+
jobs:
12+
run-linters:
13+
name: Run linters
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Set up node
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: 14
24+
registry-url: https://registry.npmjs.org
25+
26+
- name: Install dependencies
27+
run: yarn install --frozen-lockfile
28+
29+
- name: Run linters
30+
uses: wearerequired/lint-action@b98b0918aa71490373d2eca9e8e39a9bc1cc2517
31+
with:
32+
github_token: ${{ secrets.github_token }}
33+
eslint: true
34+
eslint_extensions: js,jsx,ts,tsx,json
35+
auto_fix: true

.github/workflows/release.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Release
2+
on:
3+
schedule:
4+
- cron: '0 12 * * 1-4' # every day 12:00 UTC Monday-Thursday
5+
6+
# manual trigger
7+
workflow_dispatch:
8+
9+
jobs:
10+
bump_version:
11+
name: Bump Version
12+
runs-on: ubuntu-latest
13+
outputs:
14+
new_tag: ${{ steps.github_tag_action.outputs.new_tag }}
15+
changelog: ${{ steps.github_tag_action.outputs.changelog }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Bump version and push tag
21+
id: github_tag_action
22+
uses: mathieudutour/github-tag-action@331898d5052eedac9b15fec867b5ba66ebf9b692
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
release_branches: .*
26+
27+
create_release:
28+
name: Create Release
29+
runs-on: ubuntu-latest
30+
needs: bump_version
31+
if: ${{ needs.bump_version.outputs.new_tag != null }}
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v2
35+
36+
- name: Set up node
37+
uses: actions/setup-node@v2
38+
with:
39+
node-version: 14
40+
registry-url: https://registry.npmjs.org
41+
42+
- name: Install dependencies
43+
run: yarn install --frozen-lockfile
44+
45+
- name: Build the IPFS bundle
46+
run: yarn build
47+
48+
- name: Pin to IPFS
49+
id: upload
50+
uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d
51+
with:
52+
pin-name: Uniswap ${{ needs.bump_version.outputs.new_tag }}
53+
path: './build'
54+
pinata-api-key: ${{ secrets.PINATA_API_KEY }}
55+
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }}
56+
57+
- name: Pin to Crust
58+
uses: crustio/[email protected]
59+
continue-on-error: true
60+
timeout-minutes: 2
61+
with:
62+
cid: ${{ steps.upload.outputs.hash }}
63+
seeds: ${{ secrets.CRUST_SEEDS }}
64+
65+
- name: Convert CIDv0 to CIDv1
66+
id: convert_cidv0
67+
uses: uniswap/[email protected]
68+
with:
69+
cidv0: ${{ steps.upload.outputs.hash }}
70+
71+
- name: Update DNS with new IPFS hash
72+
env:
73+
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
74+
RECORD_DOMAIN: 'uniswap.org'
75+
RECORD_NAME: '_dnslink.app'
76+
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
77+
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848
78+
with:
79+
cid: ${{ steps.upload.outputs.hash }}
80+
81+
- name: Create GitHub Release
82+
id: create_release
83+
uses: actions/[email protected]
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
with:
87+
tag_name: ${{ needs.bump_version.outputs.new_tag }}
88+
release_name: Release ${{ needs.bump_version.outputs.new_tag }}
89+
body: |
90+
IPFS hash of the deployment:
91+
- CIDv0: `${{ steps.upload.outputs.hash }}`
92+
- CIDv1: `${{ steps.convert_cidv0.outputs.cidv1 }}`
93+
94+
The latest release is always accessible via our alias to the Cloudflare IPFS gateway at [app.uniswap.org](https://app.uniswap.org).
95+
96+
You can also access the Uniswap Interface directly from an IPFS gateway.
97+
**BEWARE**: The Uniswap interface uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to remember your settings, such as which tokens you have imported.
98+
**You should always use an IPFS gateway that enforces origin separation**, or our alias to the latest release at [app.uniswap.org](https://app.uniswap.org).
99+
Your Uniswap settings are never remembered across different URLs.
100+
101+
IPFS gateways:
102+
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/
103+
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/
104+
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.upload.outputs.hash }}/)
105+
106+
${{ needs.bump_version.outputs.changelog }}

0 commit comments

Comments
 (0)