Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: alpha version #126

Merged
merged 34 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7fb7a57
fix: event driven deposit workflow (#91)
dan-ziv Mar 27, 2022
6d8f4b1
fix: event driven withdrawal workflow (#102)
dan-ziv Mar 27, 2022
73f2a30
feat: responsiveness (#97)
dan-ziv Mar 27, 2022
9ef1eda
feat: add 'discord' tab (#104)
CarmitKl Mar 28, 2022
a581252
feat: move constants to envs (#105)
dan-ziv Mar 28, 2022
12295d0
feat: validate maxTotalBalance (#101)
CarmitKl Mar 28, 2022
bdb823e
feat: FAQ tab (#106)
CarmitKl Mar 28, 2022
d8f93ce
chore(semantic-release): continuous integration (#99)
dan-ziv Mar 28, 2022
b17e67b
chore: continuous deployment (#103)
dan-ziv Mar 28, 2022
4d855e2
fix: tabs styles (#107)
dan-ziv Mar 29, 2022
6d4edbd
chore: configure js and css linters (#108)
dan-ziv Mar 29, 2022
76faa39
feat: onboarding modal (#109)
CarmitKl Mar 29, 2022
71dc9f5
ci(push workflow): remove pre-release step and fix release step
dan-ziv Mar 29, 2022
d3a9a24
ci(push workflow): remove redundent steps
dan-ziv Mar 29, 2022
774ea54
docs: update deployment README (#110)
dan-ziv Mar 29, 2022
660f4a3
chore: update packages (#81)
dan-ziv Mar 29, 2022
c157f86
docs: deployment README fixes
dan-ziv Mar 30, 2022
a39c52b
feat: env supported tokens
CarmitKl Mar 30, 2022
2f439af
feat: analytics (#111)
dan-ziv Mar 30, 2022
b70d1b3
fix: rerun useTokenConstant on selected token change
dan-ziv Mar 30, 2022
8682a69
fix(useTokenConstant): wrong return statement
dan-ziv Mar 30, 2022
5813f7f
fix: toasts rendered multiple times (#114)
dan-ziv Mar 31, 2022
5dda33c
feat: retry mechanism to fetch balance (#115)
dan-ziv Mar 31, 2022
3fb953f
fix: tab UX (#118)
dan-ziv Mar 31, 2022
63be18c
fix: update specific token balance (#119)
dan-ziv Apr 1, 2022
e2dd5f0
feat: refresh balance (#116)
CarmitKl Apr 1, 2022
fb8728c
fix: add .then to analytics events
dan-ziv Apr 3, 2022
99cc823
fix: handle chain changed (#122)
CarmitKl Apr 3, 2022
ddfe43c
feat: update texts and add stepper to transfer modal (#121)
dan-ziv Apr 3, 2022
94746c3
fix: modal crash on login (#124)
dan-ziv Apr 4, 2022
9fcbfa8
chore: update FAQ text (#125)
CarmitKl Apr 4, 2022
e9b55b7
fix: typos
dan-ziv Apr 4, 2022
6264047
fix: typos
dan-ziv Apr 4, 2022
464362a
Merge branch 'alpha' of github.com:starkware-libs/starknet-bridge int…
dan-ziv Apr 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
REACT_APP_AUTO_CONNECT=true
# 10 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=10000
REACT_APP_AUTO_CONNECT=false
# 20 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=20000
# goerli testnet
REACT_APP_SUPPORTED_CHAIN_IDS=5
REACT_APP_STARKNET_CONTRACT_ADDRESS=0xde29d060D45901Fb19ED6C6e959EB22d8626708e
REACT_APP_ETHERSCAN_URL=https://goerli.etherscan.io
REACT_APP_VOYAGER_URL=https://goerli.voyager.online
REACT_APP_LOCAL_STORAGE_TRANSFERS_LOG_KEY=STARKGATE_TRANSFERS
REACT_APP_LOCAL_STORAGE_ONBOARDING_TIMESTAMP_KEY=STARKGATE_ONBOARDING_TIMESTAMP
REACT_APP_ONBOARDING_MODAL_TIMEOUT_HRS=24
REACT_APP_SUPPORTED_TOKENS=ETH,WBTC,USDC,USDT,DAI,SLF
17 changes: 12 additions & 5 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
REACT_APP_AUTO_CONNECT=true
# 30 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=30000
# mainnet
REACT_APP_SUPPORTED_CHAIN_IDS=1
REACT_APP_AUTO_CONNECT=false
# 30 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=30000
# mainnet
REACT_APP_SUPPORTED_CHAIN_IDS=1
REACT_APP_STARKNET_CONTRACT_ADDRESS=
REACT_APP_ETHERSCAN_URL=https://etherscan.io
REACT_APP_VOYAGER_URL=https://voyager.online
REACT_APP_LOCAL_STORAGE_TRANSFERS_LOG_KEY=STARKGATE_TRANSFERS
REACT_APP_LOCAL_STORAGE_ONBOARDING_TIMESTAMP_KEY=STARKGATE_ONBOARDING_TIMESTAMP
REACT_APP_ONBOARDING_MODAL_TIMEOUT_HRS=24
REACT_APP_SUPPORTED_TOKENS=ETH
15 changes: 10 additions & 5 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
REACT_APP_AUTO_CONNECT=true
# 20 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=20000
# goerli testnet
REACT_APP_SUPPORTED_CHAIN_IDS=5
REACT_APP_AUTO_CONNECT=false
# 20 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=20000
# goerli testnet
REACT_APP_SUPPORTED_CHAIN_IDS=5
REACT_APP_STARKNET_CONTRACT_ADDRESS=0xde29d060D45901Fb19ED6C6e959EB22d8626708e
REACT_APP_ETHERSCAN_URL=https://goerli.etherscan.io
REACT_APP_VOYAGER_URL=https://goerli.voyager.online
REACT_APP_LOCAL_STORAGE_TRANSFERS_LOG_KEY=STARKGATE_TRANSFERS
REACT_APP_SUPPORTED_TOKENS=ETH
78 changes: 78 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
amd: true,
es6: true,
es2020: true,
jquery: false
},
extends: [
'eslint:recommended',
'react-app',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended'
],
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
presets: ['@babel/preset-react']
},
requireConfigFile: false,
sourceType: 'module'
},
plugins: ['@babel', 'import', 'react', 'react-hooks', 'jest', 'jsx-a11y', 'prettier'],
settings: {
'import/core-modules': [],
'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'],
react: {
pragma: 'React', // Pragma to use, default to "React"
version: 'detect' // React version. "detect" automatically picks the version you have installed.
},
jest: {
// version: require('jest/package.json').version,
}
},
rules: {
'no-confusing-arrow': ['error', {allowParens: true}],
'no-console': 'warn',
'no-var': 'warn',
'object-shorthand': 'error',
'prefer-const': 'warn',
'prefer-template': 'warn',
'prettier/prettier': 'error',
'react/react-in-jsx-scope': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'off',
quotes: ['error', 'single', {avoidEscape: true}],
'comma-dangle': [
'off',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'ignore'
}
],
'react/jsx-sort-props': [
2,
{
callbacksLast: true,
shorthandFirst: true,
reservedFirst: true
}
],
'prefer-destructuring': [
'warn',
{
object: true,
array: false
}
],
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off'
}
};
41 changes: 0 additions & 41 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ If the PR is related to an open issue please link to it.
- [ ] New unit / functional tests have been added (whenever applicable)
- [ ] Test are passing in local environment
- [ ] Docs have been updated
- [ ] PR title is follow the [standard-version](https://www.conventionalcommits.org/) convention: `<type>(optional subject): <description>`, e.g: `fix: minor typos in code`
- [ ] PR title is follow the [Conventional Commits](https://www.conventionalcommits.org/) convention: `<type>[optional scope]: <description>`, e.g: `fix: prevent racing of requests`
60 changes: 60 additions & 0 deletions .github/workflows/gcr_push_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Push docker image to GCR reusable workflow

on:
workflow_call:
inputs:
image_name:
required: true
type: string
branch_name:
required: true
type: string
dockerfile:
required: true
type: string
secrets:
gcp_token:
required: true

jobs:
deploy:
name: Build tag and push docker images to GCR.
runs-on: ubuntu-latest
steps:
- name: Login to Gcloud using starkgate service account.
uses: google-github-actions/setup-gcloud@v0
with:
project_id: starkware-dev
service_account_email: starkgate@starkware-dev.iam.gserviceaccount.com
service_account_key: ${{ secrets.gcp_token }}

- name: Configure Docker
run: gcloud auth configure-docker --quiet

- name: Checkout repository
uses: actions/checkout@v2

- name: Build and push images to GCR, with tag latest and git tag.
if: ${{ inputs.branch_name == 'refs/heads/dev' }}
run: |
docker build . -t ${{ inputs.image_name }} -f ${{ inputs.dockerfile }} --build-arg BUILD_ENV=testing
docker tag ${{ inputs.image_name }} ${{ inputs.image_name }}:${{ github.ref_name }}
docker push ${{ inputs.image_name }}:${{ github.ref_name }}
docker push ${{ inputs.image_name }}

- name: Build with production env and push with mainnet and stable tags.
if: ${{ inputs.branch_name == 'refs/heads/master' }}
run: |
docker build . -t ${{ inputs.image_name }}:stable -f ${{ inputs.dockerfile }} --build-arg BUILD_ENV=production
docker tag ${{ inputs.image_name }}:stable ${{ inputs.image_name }}:${{ github.ref_name }}-mainnet

docker push ${{ inputs.image_name }}:${{ github.ref_name }}-mainnet
docker push ${{ inputs.image_name }}:stable

- name: Build with testing env and push with goerli tag.
if: ${{ inputs.branch_name == 'refs/heads/master' }}
run: |
docker build . -t ${{ inputs.image_name }} -f ${{ inputs.dockerfile }} --build-arg BUILD_ENV=testing
docker tag ${{ inputs.image_name }} ${{ inputs.image_name }}:${{ github.ref_name }}-goerli

docker push ${{ inputs.image_name }}:${{ github.ref_name }}-goerli
3 changes: 1 addition & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Pull request workflow

on:
pull_request
on: pull_request

jobs:
lint:
Expand Down
23 changes: 4 additions & 19 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
release-version:
name: Releasing a version
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'chore') || (github.ref_name == 'master' && !contains(github.event.head_commit.message, 'chore(release)')) }}
if: ${{ !contains(github.event.head_commit.message, 'release') || (github.ref_name == 'master' && !contains(github.event.head_commit.message, 'release')) }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -24,23 +24,8 @@ jobs:
- name: Install node_modules
run: yarn

- name: Authenticate with GitHub
run: |
git config --global user.name "${{ secrets.USER_NAME }}"
git config --global user.email "${{ secrets.USER_EMAIL }}"

- name: Run pre-release script
if: ${{ github.ref_name == 'dev' }}
run: yarn run pre-release

- name: Run release script
if: ${{ github.ref_name == 'master' }}
run: yarn run release

- name: Push to remote branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.USER_TOKEN }}
branch: ${{ github.ref }}
tags: true
force: true
env:
GITHUB_TOKEN: ${{ secrets.USER_TOKEN }}
GH_TOKEN: ${{ secrets.USER_TOKEN }}
16 changes: 16 additions & 0 deletions .github/workflows/push_backend_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Docker build tag and push backend images to GCR workflow.

on:
push:
tags:
- backend*

jobs:
push-backend-image:
uses: ./.github/workflows/gcr_push_workflow.yml
with:
image_name: us.gcr.io/starkware-dev/starknet/starkgate/backend
branch_name: ${{ github.event.base_ref }}
dockerfile: Dockerfile.backend
secrets:
gcp_token: ${{ secrets.STARKGATE_SA }}
16 changes: 16 additions & 0 deletions .github/workflows/push_frontend_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Docker build tag and push frontend images to GCR workflow.

on:
push:
tags:
- v*.*.*

jobs:
push-frontend-image:
uses: ./.github/workflows/gcr_push_workflow.yml
with:
image_name: us.gcr.io/starkware-dev/starknet/starkgate/frontend
branch_name: ${{ github.event.base_ref }}
dockerfile: Dockerfile.frontend
secrets:
gcp_token: ${{ secrets.STARKGATE_SA }}
46 changes: 0 additions & 46 deletions .github/workflows/tag.yml

This file was deleted.

1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading