forked from Uniswap/v3-info
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
312 changed files
with
34,555 additions
and
19,295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
REACT_APP_CHAIN_ID="1" | ||
REACT_APP_NETWORK_URL="https://mainnet.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
// Allows for the parsing of JSX | ||
"jsx": true | ||
} | ||
}, | ||
"ignorePatterns": ["node_modules/**/*"], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
"prettier/@typescript-eslint", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"prettier/prettier": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/ban-ts-ignore": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: Bug Report | ||
about: Describe an issue in the Uniswap Interface | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
--- | ||
|
||
**Bug Description** | ||
A clear and concise description of the bug. | ||
|
||
**Steps to Reproduce** | ||
|
||
1. Go to ... | ||
2. Click on ... | ||
... | ||
|
||
**Expected Behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Additional Context** | ||
Add any other context about the problem here (screenshots, whether the bug only occurs only in certain mobile/desktop/browser environments, etc.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Support | ||
url: https://discord.gg/FCfyBSbCU5 | ||
about: Please ask and answer questions here | ||
- name: List a token | ||
url: https://github.com/Uniswap/default-token-list#adding-a-token | ||
about: Any requests to add a token to Uniswap should go here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Feature Request | ||
about: Suggest an idea for improving the UX of the Uniswap Interface | ||
title: '' | ||
labels: 'improvement' | ||
assignees: '' | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request_target: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run-linters: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
always-auth: true | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Set output of cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Node dependency cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Run linters | ||
uses: wearerequired/lint-action@77d70b9a07ecb93bc98dc46dc27d96c4f004d035 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
eslint: true | ||
eslint_extensions: js,jsx,ts,tsx,json | ||
auto_fix: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: Release | ||
on: | ||
# schedule: | ||
# - cron: '0 12 * * 1-4' # every day 12:00 UTC Monday-Thursday | ||
|
||
# manual trigger | ||
workflow_dispatch: | ||
|
||
jobs: | ||
bump_version: | ||
name: Bump Version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
new_tag: ${{ steps.github_tag_action.outputs.new_tag }} | ||
changelog: ${{ steps.github_tag_action.outputs.changelog }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Bump version and push tag | ||
id: github_tag_action | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
release_branches: .* | ||
|
||
create_release: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
needs: bump_version | ||
if: ${{ needs.bump_version.outputs.new_tag != null }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
always-auth: true | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build the IPFS bundle | ||
run: yarn build | ||
|
||
- name: Pin to IPFS | ||
id: upload | ||
uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d | ||
with: | ||
pin-name: Uniswap ${{ needs.bump_version.outputs.new_tag }} | ||
path: './build' | ||
pinata-api-key: ${{ secrets.PINATA_API_KEY }} | ||
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }} | ||
|
||
- name: Convert CIDv0 to CIDv1 | ||
id: convert_cidv0 | ||
uses: uniswap/[email protected] | ||
with: | ||
cidv0: ${{ steps.upload.outputs.hash }} | ||
|
||
- name: Update DNS with new IPFS hash | ||
env: | ||
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | ||
RECORD_DOMAIN: 'uniswap.org' | ||
RECORD_NAME: '_dnslink.app' | ||
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} | ||
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848 | ||
with: | ||
cid: ${{ steps.upload.outputs.hash }} | ||
|
||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ needs.bump_version.outputs.new_tag }} | ||
release_name: Release ${{ needs.bump_version.outputs.new_tag }} | ||
body: | | ||
IPFS hash of the deployment: | ||
- CIDv0: `${{ steps.upload.outputs.hash }}` | ||
- CIDv1: `${{ steps.convert_cidv0.outputs.cidv1 }}` | ||
The latest release is always accessible via our alias to the Cloudflare IPFS gateway at [app.uniswap.org](https://app.uniswap.org). | ||
You can also access the Uniswap Interface directly from an IPFS gateway. | ||
The Uniswap interface uses [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to store your settings. | ||
**Beware** that other sites you access via the _same_ IPFS gateway can read and modify your settings on the Uniswap interface without your permission. | ||
You can avoid this issue by using a subdomain IPFS gateway, or our alias to the latest release at [app.uniswap.org](https://app.uniswap.org). | ||
The preferred URLs below are safe to use to access this specific release. | ||
Preferred URLs: | ||
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/ | ||
- https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/ | ||
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.upload.outputs.hash }}/) | ||
Other IPFS gateways: | ||
- https://cloudflare-ipfs.com/ipfs/${{ steps.upload.outputs.hash }}/ | ||
- https://ipfs.infura.io/ipfs/${{ steps.upload.outputs.hash }}/ | ||
- https://ipfs.io/ipfs/${{ steps.upload.outputs.hash }}/ | ||
${{ needs.bump_version.outputs.changelog }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
integration-tests: | ||
name: Integration tests | ||
runs-on: ubuntu-16.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
always-auth: true | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/cache@v1 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn cypress install | ||
- run: yarn build | ||
env: | ||
CI: false | ||
REACT_APP_NETWORK_URL: 'https://mainnet.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847' | ||
- run: yarn integration-test | ||
|
||
unit-tests: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
always-auth: true | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/cache@v1 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- run: yarn install --frozen-lockfile | ||
- run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const { dirname, join, parse, resolve } = require('path') | ||
const { existsSync } = require('fs') | ||
|
||
module.exports = { | ||
stories: ['../src/**/*.stories.@(ts|tsx)'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/preset-create-react-app'], | ||
typescript: { | ||
check: true, | ||
checkOptions: {}, | ||
reactDocgen: 'react-docgen-typescript', | ||
reactDocgenTypescriptOptions: { | ||
shouldExtractLiteralValuesFromEnum: true, | ||
propFilter: prop => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { addons } from '@storybook/addons' | ||
import { light } from './theme' | ||
|
||
addons.setConfig({ theme: light }) |
Oops, something went wrong.