Skip to content

Commit 81ce7d0

Browse files
author
SmartDev84
committed
tornado swap
0 parents  commit 81ce7d0

File tree

407 files changed

+96431
-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.

407 files changed

+96431
-0
lines changed

.babelrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"env": {
3+
"test": {
4+
"presets": [
5+
[
6+
"@babel/preset-env",
7+
{
8+
"targets": {
9+
"node": "current"
10+
}
11+
}
12+
]
13+
]
14+
}
15+
}
16+
}

.env.example

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
PINATA_API_KEY=
2+
PINATA_SECRET_API_KEY=
3+
4+
INFURA_KEY=
5+
6+
ALCHEMY_MAINNET_KEY=
7+
ALCHEMY_POLYGON_KEY=
8+
ALCHEMY_OPTIMISM_KEY=
9+
ALCHEMY_ARBITRUM_KEY=
10+
ALCHEMY_GOERLI_KEY=
11+
12+
WC_BRIDGE=
13+
14+
STORE_NAME=
15+
APP_ENS_NAME=

.eslintrc.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true,
6+
es2020: true
7+
},
8+
parserOptions: {
9+
parser: 'babel-eslint'
10+
},
11+
extends: ['@nuxtjs', 'plugin:nuxt/recommended', 'plugin:prettier/recommended', 'prettier', 'prettier/vue'],
12+
plugins: ['prettier'],
13+
// add your custom rules here
14+
rules: {
15+
'prettier/prettier': ['error', { printWidth: 110 }],
16+
'no-async-promise-executor': 'off',
17+
'vue/comment-directive': 'off',
18+
'no-console': 'off'
19+
}
20+
}

.github/CONTRIBUTING.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Welcome to TornadoCash!
2+
3+
If you're submitting code to TornadoCash, there are some simple things we'd appreciate you doing to help us stay organized!
4+
5+
### Finding the right project
6+
7+
Before taking the time to code and implement something, feel free to open an issue and discuss it! There may even be an issue already open, and together we may come up with a specific strategy before you take your precious time to write code.
8+
9+
### Submitting a pull request
10+
Please try not to include multiple features in a single PR, and don't make extraneous changes outside the scope of your contribution. All those touched files make things harder to review.
11+
12+
And that's it! Thanks for helping out.

.github/ISSUE_TEMPLATE/bug-report.yml

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Bug Report
2+
description: Using TornadoCash, but it's not working as you expect?
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
11+
## **Before Submitting:**
12+
13+
* Save your note, clear your cache, use a different connection or VPN, and try again.
14+
* If the error persists reach out to [customer support](https://discord.com/invite/TFDrM8K42j).
15+
* Please search to make sure this issue has not been opened already.
16+
- type: textarea
17+
id: what-happened
18+
attributes:
19+
label: Describe the bug
20+
description: What happened? What did you expect to happen? Please include screenshots if applicable!
21+
placeholder: Tell us what you see!
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: reproduce
26+
attributes:
27+
label: Steps to reproduce
28+
description: List all steps needed to reproduce the problem
29+
value: |
30+
1.
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: error
35+
attributes:
36+
label: Error messages or log output
37+
description: Please copy and paste any relevant error messages or log output. This will be automatically formatted, so there is no need for backticks.
38+
render: shell
39+
- type: input
40+
id: source
41+
attributes:
42+
label: Source
43+
description: What gateway are you using?
44+
- type: input
45+
id: wallet
46+
attributes:
47+
label: Wallet
48+
description: What wallet and which version are you running?
49+
validations:
50+
required: true
51+
- type: input
52+
id: version
53+
attributes:
54+
label: TornadoCash version
55+
description: Which version of TornadoCash are you running ?
56+
validations:
57+
required: true
58+
- type: dropdown
59+
id: browsers
60+
attributes:
61+
label: Browser
62+
description: Which browsers have you seen the problem on?
63+
multiple: true
64+
options:
65+
- Chrome
66+
- Firefox
67+
- Microsoft Edge
68+
- Brave
69+
- TOR
70+
- Other (please elaborate in the "Additional Context" section)
71+
validations:
72+
required: true
73+
- type: dropdown
74+
id: os
75+
attributes:
76+
label: Operating system
77+
description: Which operating systems have you seen the problem on?
78+
multiple: true
79+
options:
80+
- Windows
81+
- MacOS
82+
- Linux
83+
- Other (please elaborate in the "Additional Context" section)
84+
validations:
85+
required: true
86+
- type: dropdown
87+
id: hardware-wallet
88+
attributes:
89+
label: Hardware wallet
90+
description: Are you using any of these hardware wallets? Please include the firmware version in the "Additional context" section below for any that you select here.
91+
multiple: true
92+
options:
93+
- Ledger
94+
- Trezor
95+
- Keystone
96+
- GridPlus Lattice1
97+
- AirGap Vault
98+
- Other (please elaborate in the "Additional Context" section)
99+
- type: textarea
100+
id: additional
101+
attributes:
102+
label: Additional context
103+
description: Add any other context about the problem here, e.g. related issues, additional error messages or logs, or any potentially relevant details about the environment or situation the bug occurred in.

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Request a new feature
4+
url: https://torn.community/
5+
about: Request new features and vote on the ones that are important to you.
6+
- name: Get support or ask a question
7+
url: https://discord.com/invite/TFDrM8K42j
8+
about: Join Discord community server to get help and ask questions

.github/PULL_REQUEST_TEMPLATE.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Explanation
2+
3+
<!--
4+
Thanks for the pull request. Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes:
5+
* What is the current state of things and why does it need to change?
6+
* What is the solution your changes offer and how does it work?
7+
Below is a template to give you some ideas. Feel free to use your own words!
8+
Currently, ...
9+
This is a problem because ...
10+
In order to solve this problem, this pull request ...
11+
-->
12+
13+
## More information
14+
15+
<!--
16+
Are there any issues, [community forum](https://torn.community/) discussion, user stories, etc. reviewers should consult to understand this pull request better? For instance:
17+
* Fixes #12345
18+
* See: #67890
19+
-->
20+
21+
## Screenshots/Screencaps
22+
23+
<!-- If you're making a change to the UI, make sure to capture a screenshot or a short video showing off your work! -->
24+
25+
### Before
26+
27+
<!-- How did the UI you changed look before your changes? Drag your file(s) below this line: -->
28+
29+
### After
30+
31+
<!-- How does it look now? Drag your file(s) below this line: -->
32+
33+
## Manual testing steps
34+
35+
<!--
36+
How should reviewers and QA manually test your changes? For instance:
37+
- Go to this screen
38+
- Do this
39+
- Then do this
40+
-->

.github/workflows/nodejs.yml

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [master]
9+
10+
jobs:
11+
cleanup:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- name: Remove old artifacts
16+
uses: c-hive/gha-remove-artifacts@v1
17+
with:
18+
age: 0 days
19+
skip-tags: true
20+
skip-recent: 2
21+
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-node@v1
27+
with:
28+
node-version: 14
29+
- run: yarn install
30+
- name: Linting JS
31+
run: yarn lint
32+
- name: Build
33+
run: yarn generate
34+
env:
35+
INFURA_KEY: ${{ secrets.INFURA_KEY }}
36+
ALCHEMY_MAINNET_KEY: ${{ secrets.ALCHEMY_MAINNET_KEY }}
37+
ALCHEMY_POLYGON_KEY: ${{ secrets.ALCHEMY_POLYGON_KEY }}
38+
ALCHEMY_OPTIMISM_KEY: ${{ secrets.ALCHEMY_OPTIMISM_KEY }}
39+
ALCHEMY_ARBITRUM_KEY: ${{ secrets.ALCHEMY_ARBITRUM_KEY }}
40+
ALCHEMY_GOERLI_KEY: ${{ secrets.ALCHEMY_GOERLI_KEY }}
41+
WC_BRIDGE: ${{ secrets.WC_BRIDGE }}
42+
OLD_STORE_NAME: ${{ secrets.OLD_STORE_NAME }}
43+
STORE_NAME: ${{ secrets.STORE_NAME }}
44+
APP_ENS_NAME: ${{ secrets.APP_ENS_NAME }}
45+
- name: Upload artefact
46+
uses: actions/[email protected]
47+
with:
48+
name: dist
49+
path: dist
50+
51+
deploy-minified:
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Download artifact `dist`
56+
uses: actions/download-artifact@v1
57+
with:
58+
name: dist
59+
- name: Add SSH key
60+
uses: webfactory/[email protected]
61+
env:
62+
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
63+
with:
64+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
65+
- name: Add git remote
66+
run: |
67+
git init
68+
git config --local user.email "[email protected]"
69+
git config --local user.name "GitHub"
70+
echo dist > .gitignore && git add .gitignore && git commit -m push-dir
71+
git remote add ui [email protected]:tornadocash/ui-minified.git
72+
- name: Deploying...
73+
run: npx push-dir --dir=dist --branch=master --cleanup --remote=ui
74+
75+
deploy-docker:
76+
runs-on: ubuntu-latest
77+
needs: build
78+
steps:
79+
- uses: actions/checkout@v2
80+
- name: Download artifact `dist`
81+
uses: actions/download-artifact@v1
82+
with:
83+
name: dist
84+
- name: Build and push Docker image
85+
uses: docker/[email protected]
86+
with:
87+
path: dist
88+
dockerfile: Dockerfile
89+
repository: tornadocash/ui
90+
tags: latest
91+
username: ${{ secrets.DOCKER_USERNAME }}
92+
password: ${{ secrets.DOCKER_TOKEN }}
93+
94+
deploy-ipfs:
95+
runs-on: ubuntu-latest
96+
needs: build
97+
steps:
98+
- uses: actions/checkout@v2
99+
- uses: actions/setup-node@v1
100+
with:
101+
node-version: 14
102+
- run: yarn install
103+
- name: Download artifact `dist`
104+
uses: actions/download-artifact@v1
105+
with:
106+
name: dist
107+
- name: Upload to IPFS
108+
id: upload
109+
run: yarn ipfsUpload dist
110+
env:
111+
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
112+
PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}
113+
114+
notify:
115+
runs-on: ubuntu-latest
116+
if: always()
117+
needs:
118+
- deploy-minified
119+
- deploy-docker
120+
- deploy-ipfs
121+
steps:
122+
# ${{ env.WORKFLOW_CONCLUSION }} # neutral, success, cancelled, timed_out, failure
123+
- uses: technote-space/workflow-conclusion-action@v2
124+
- name: Set short SHA
125+
id: vars
126+
run: echo "::set-output name=sha_short::$(echo ${GITHUB_SHA:0:7})"
127+
- name: Telegram Message Notify
128+
uses: appleboy/[email protected]
129+
if: ${{ env.WORKFLOW_CONCLUSION == 'success' }}
130+
with:
131+
to: ${{ secrets.TELEGRAM_CHAT_ID }}
132+
token: ${{ secrets.TELEGRAM_BOT_TOKEN}}
133+
message: 🚀 Deployed commit [${{ steps.vars.outputs.sha_short }}](https://github.com/tornadocash/tornado-cash-ui/commit/${{ github.sha }}) of tornado.cash UI
134+
format: markdown
135+
- name: Telegram Failure Notification
136+
uses: appleboy/[email protected]
137+
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' || env.WORKFLOW_CONCLUSION == 'timed_out' || env.WORKFLOW_CONCLUSION == 'neutral' }}
138+
with:
139+
message: ❗ Build failed for [${{ github.repository }}](https://github.com/${{ github.repository }}/actions) because of ${{ github.actor }}
140+
format: markdown
141+
to: ${{ secrets.TELEGRAM_CHAT_ID }}
142+
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}

0 commit comments

Comments
 (0)