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: DAI Fast Withdrawals #190

Draft
wants to merge 212 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
e26cd43
chore: init project
dan-ziv Nov 30, 2021
ec2f16f
feat(wallet): load L1 tokens and balances [skip ci] (#1)
dan-ziv Dec 5, 2021
dadae59
chore: remove unnecessary return statements [skip ci]
dan-ziv Dec 5, 2021
d2403f1
feat(wallet): load L2 tokens and balances [skip ci]
dan-ziv Dec 6, 2021
75f1ea7
fix(SelectToken): disable pointer events when loading balance [skip-ci]
dan-ziv Dec 8, 2021
067f02e
feat: combine providers [skip ci] (#2)
dan-ziv Dec 8, 2021
b528f5f
feat: blockchain hooks (#3)
dan-ziv Dec 9, 2021
c5250d9
chore(release): 0.0.2-0
Dec 9, 2021
73743ff
refactor(header): chain name label [skip ci]
dan-ziv Dec 13, 2021
4fd1d92
fix: bug fixes [skip ci]
dan-ziv Dec 14, 2021
8dae7be
feat: support transfer ETH to starknet [skip ci]
dan-ziv Dec 14, 2021
c69e926
fix: transfer eth to starknet [skip ci]
dan-ziv Dec 14, 2021
9ea5759
fix: bug fixes [skip ci]
dan-ziv Dec 14, 2021
7828d53
fix: run input checking effect only on amount change [skip ci]
dan-ziv Dec 14, 2021
8efa0ba
feat: tokens provider [skip ci]
dan-ziv Dec 15, 2021
e2b5016
refactor: netowrks [skip ci]
dan-ziv Dec 16, 2021
31a3cc5
feat: transfer from starknet (wip) [skip ci]
dan-ziv Dec 17, 2021
f9df5d3
refactor: hooks [skip ci]
dan-ziv Dec 17, 2021
7a55482
refactor: starknet/ethereum naming [skip ci]
dan-ziv Dec 17, 2021
36687e5
refactor: useContract hook [skip ci]
dan-ziv Dec 18, 2021
ca88428
refactor: move logic to transfer component [skip ci]
dan-ziv Dec 18, 2021
0161cff
refactor: move components to UI folder [skip ci]
dan-ziv Dec 19, 2021
22ce3e1
feat: transactions provider [skip ci]
dan-ziv Dec 19, 2021
4033811
feat: store and hash object in local storage [skip ci]
dan-ziv Dec 19, 2021
584e829
refactor: tokens provider [skip ci]
dan-ziv Dec 20, 2021
25af12c
chore: add logs to providers [skip ci]
dan-ziv Dec 20, 2021
7ae4c19
chore: remove hooks plugin from eslint [skip ci]
dan-ziv Dec 20, 2021
17787ed
fix: transfer from starknet [skip ci]
dan-ziv Dec 21, 2021
4545357
fix: add transaction [skip ci]
dan-ziv Dec 22, 2021
b60214a
fix: footer txt key name [skip ci]
dan-ziv Dec 22, 2021
a060afe
feat: transactions toasts [skip ci] (#4)
dan-ziv Dec 23, 2021
db42bf7
fix: BigInt conversion issue [skip ci] (#18)
dan-ziv Dec 23, 2021
c986e1a
fix: change transactions to transfers (#40)
dan-ziv Dec 27, 2021
16bb16e
fix: change Ethereum token name (#39)
dan-ziv Dec 27, 2021
31b404a
fix: max amount in withdrawal causes an error (#38)
dan-ziv Dec 27, 2021
1b5bd03
chore(release): 0.0.1-1
Dec 27, 2021
cffce8f
fix: endless spinner when wallet isn't installed (#42)
dan-ziv Dec 27, 2021
df4187c
chore(release): 0.0.1-2
Dec 27, 2021
3614743
fix: show txs links before ACCEPTED_ON_L1 (#44)
dan-ziv Dec 27, 2021
4e0475a
chore(release): 0.0.1-3
Dec 27, 2021
5a4ac44
fix: handle rejected txs (#45)
dan-ziv Dec 28, 2021
c307ed2
chore(release): 0.0.1-4
Dec 28, 2021
2ee32ab
fix: strings (#43)
dan-ziv Dec 28, 2021
ad96bba
chore(release): 0.0.1-5
Dec 28, 2021
8ce82c8
fix: logo is not clickable (#46)
dan-ziv Dec 28, 2021
61a4b4f
chore(release): 0.0.1-6
Dec 28, 2021
b130ca2
fix: transfer from starknet modal progress (#49)
dan-ziv Dec 29, 2021
193d885
chore(release): 0.0.1-7
Dec 29, 2021
b3cc930
refactor: useTransfer hooks (#51)
dan-ziv Dec 30, 2021
3a6686c
chore(release): 0.0.1-8
Dec 30, 2021
48c3b3c
chore: fix lints (#53)
dan-ziv Dec 30, 2021
0267a1c
feat: env vars (#54)
dan-ziv Dec 30, 2021
42101d7
chore(release): 0.0.1-9
Dec 30, 2021
c653409
chore: update package name (#55)
dan-ziv Jan 6, 2022
325322f
feat: tx status friendly message (#48)
dan-ziv Jan 6, 2022
4ca2b33
chore(release): 0.0.1-10
Jan 6, 2022
be40a7e
feat: update tokens and support decimals (#56)
dan-ziv Jan 6, 2022
23f1da2
chore(release): 0.0.1-11
Jan 6, 2022
7cdbfdf
chore: delete proxy.js
dan-ziv Jan 6, 2022
336d1ef
chore: add [skip ci] to release commit (#57)
dan-ziv Jan 11, 2022
6cde616
chore: starkgate logo (#60)
dan-ziv Jan 11, 2022
d8f6227
chore(release): 0.0.1-12 [skip ci]
Jan 11, 2022
5ecdd6c
chore: change naming to L1/L2 (#61)
dan-ziv Jan 12, 2022
c4d672e
chore(release): 0.0.1-13 [skip ci]
Jan 12, 2022
ef6b8c1
chore: testing env build (#63)
dan-ziv Jan 17, 2022
dd99a80
chore(release): 0.0.1-14 [skip ci]
Jan 17, 2022
aeefa55
feat(transfer to L2): max amount (#62)
dan-ziv Jan 18, 2022
8b00c6b
chore(release): 0.0.1-15 [skip ci]
Jan 18, 2022
059bfce
feat: cache contracts (#65)
dan-ziv Jan 18, 2022
77af29c
chore(release): 0.0.1-16 [skip ci]
Jan 18, 2022
7f1441a
feat: add nonce to txHash calculation (#66)
dan-ziv Jan 19, 2022
6c09824
chore(release): 0.0.1-17 [skip ci]
Jan 19, 2022
326e0fa
feat: alpha disclaimer (#68)
dan-ziv Jan 19, 2022
80aad91
chore(release): 0.0.1-18 [skip ci]
Jan 19, 2022
91f1706
feat(local storage): hash transfers (#67)
dan-ziv Jan 19, 2022
10b36a3
chore(release): 0.0.1-19 [skip ci]
Jan 19, 2022
d7b6109
chore: update USDC addresses (#70)
dan-ziv Jan 20, 2022
a649954
chore(release): 0.0.1-20 [skip ci]
Jan 20, 2022
a64d772
fix: token balances are 0 (#71)
dan-ziv Jan 26, 2022
4e90bfa
chore(release): 0.0.1-21 [skip ci]
Jan 26, 2022
93a95c0
fix: max balance error (#72)
dan-ziv Jan 26, 2022
3fa3a9d
chore(release): 0.0.1-22 [skip ci]
Jan 26, 2022
b5dfe47
chore: renaming withdraw/deposit to transferToL1/transferToL2 (#73)
dan-ziv Jan 26, 2022
5cdea52
chore(release): 0.0.1-23 [skip ci]
Jan 26, 2022
6d59980
chore: change commit message for prereleases (#75)
dan-ziv Feb 1, 2022
b1b1b39
feat: DAI (#74)
maciejka Feb 1, 2022
025b022
chore(prerelease): 0.0.1-24
Feb 1, 2022
38356b3
fix: remove MIM and FRAX tokens (#77)
dan-ziv Feb 1, 2022
7283a48
chore(prerelease): 0.0.1-25
Feb 1, 2022
15e97d2
chore(release): 0.0.1
Feb 7, 2022
b743b85
feat(toasts): add link to transfer log (#79)
dan-ziv Feb 8, 2022
8943412
chore(prerelease): 0.0.2-0
Feb 8, 2022
9a84b05
feat: use blockNumber=pending for balanceOf calls (#58)
dan-ziv Feb 14, 2022
c48da5c
chore(prerelease): 0.0.2-1
Feb 14, 2022
a2be9b7
chore: add utils tests (#80)
dan-ziv Feb 16, 2022
2c5a9df
fix: update ETH token addresses and add SLF token (#84)
dan-ziv Mar 16, 2022
9090de6
chore(prerelease): 0.0.2-2
Mar 16, 2022
c380e83
chore: force node version (#85)
dan-ziv Mar 16, 2022
9dc4972
fix: redux error on switching menu "non-serializable value was detect…
CarmitKl Mar 22, 2022
70bc4d2
chore(prerelease): 0.0.2-3
Mar 22, 2022
c38e56e
refactor: utils (#82)
dan-ziv Mar 22, 2022
faf2857
chore(prerelease): 0.0.2-4
Mar 22, 2022
938ffe0
fix(getTransactionHash): add fee and version to calculation (#90)
dan-ziv Mar 22, 2022
dba9b3e
chore(prerelease): 0.0.2-5
Mar 22, 2022
d364cb4
fix: add missing env poll block number interval
dan-ziv Mar 22, 2022
8e80c25
chore(prerelease): 0.0.2-6
Mar 22, 2022
20f51f3
fix: remove pending transfer toast (#92)
CarmitKl Mar 22, 2022
1cc049d
chore(prerelease): 0.0.2-7
Mar 22, 2022
b6e0ded
in the alphaDisclaimerToast fix a typo, and add an 'id' so it won't c…
CarmitKl Mar 22, 2022
d1c3ad3
chore(prerelease): 0.0.2-8
Mar 22, 2022
26355ec
chore: flatten config directory (#94)
dan-ziv Mar 23, 2022
84e9909
chore(DAI v2): update DAI token addresses (#100)
maciejka Mar 27, 2022
56d920d
feat: handle browser support (#96)
dan-ziv Mar 27, 2022
cbeee28
chore(prerelease): 0.0.2-9
Mar 27, 2022
ed38ae4
feat: remove redux and use providers (#98)
dan-ziv Mar 27, 2022
5b15ca0
feat!: alpha version (#126)
dan-ziv Apr 4, 2022
ffa9337
prerelease: v1.0.0-dev.1
semantic-release-bot Apr 4, 2022
b5e07f7
chore: change faq text link (#128)
CarmitKl Apr 4, 2022
9d13c3b
fix: empty callback in promise .then (#127)
dan-ziv Apr 4, 2022
93e76f6
prerelease: v1.0.0-dev.2
semantic-release-bot Apr 4, 2022
72a6152
chore(ci): fix if statement for running push workflow
dan-ziv Apr 4, 2022
ec98f86
release: v1.0.0
semantic-release-bot Apr 4, 2022
1e95d33
feat: support more tokens on testnet (#133)
dan-ziv Apr 5, 2022
fb4618b
fix: when clicking Max button on L2 network 0 is shown instead of max…
dan-ziv Apr 5, 2022
e8848f8
prerelease: v1.1.0-dev.1
semantic-release-bot Apr 5, 2022
d94b8ea
fix: invalidation of negative amounts and too many decimal points (#135)
dan-ziv Apr 5, 2022
96bce1a
prerelease: v1.1.0-dev.2
semantic-release-bot Apr 5, 2022
ee43011
chore(prettier): ignore CHANGELOG.md
dan-ziv Apr 5, 2022
c45d601
chore: fix reference to bridge address for WBTC
dan-ziv Apr 6, 2022
96d6b24
fix: new event driven implementation for deposit and withdraw (#139)
dan-ziv Apr 6, 2022
bf4231a
prerelease: v1.1.0-dev.3
semantic-release-bot Apr 6, 2022
b071093
release: v1.1.0
semantic-release-bot Apr 6, 2022
8d9fe79
feat: terms of use (#141)
dan-ziv Apr 11, 2022
5cdc483
prerelease: v1.2.0-dev.1
semantic-release-bot Apr 11, 2022
14ae412
chore: add faq (#147)
dan-ziv Apr 11, 2022
51da4aa
fix(Faq): question 8 (#157)
dan-ziv Apr 14, 2022
d885f7f
prerelease: v1.2.0-dev.2
semantic-release-bot Apr 14, 2022
afa5294
fix: unsupported chain id does not showing (#151)
dan-ziv Apr 13, 2022
55e25f7
fix: app crashed when trying to connect while ArgentX wasn't installed
CarmitKl Apr 13, 2022
06e3507
prerelease: v1.2.0-dev.3
semantic-release-bot Apr 14, 2022
1e4afac
fix: accept button stayed disabled when browser zoom is different fro…
dan-ziv Apr 14, 2022
e4220fc
prerelease: v1.2.0-dev.4
semantic-release-bot Apr 14, 2022
8ae5b7a
ci: add nginx configuration file for app routing (#150)
guyvelleman Apr 12, 2022
173d3c8
release: v1.2.0
semantic-release-bot Apr 14, 2022
b77ba11
refactor: move to hooks useConstants, useEnvs, useTranslation (#159)
dan-ziv Apr 18, 2022
81cd99e
prerelease: v1.2.1-dev.1
semantic-release-bot Apr 18, 2022
a8cad80
refactor: useTracking (#160)
dan-ziv Apr 21, 2022
50f2d29
prerelease: v1.2.1-dev.2
semantic-release-bot Apr 21, 2022
6869d02
chore(ci): helm deployment (#129)
guyvelleman Apr 21, 2022
92e0927
refactor: useTranslation hooks (#162)
dan-ziv Apr 21, 2022
477209d
prerelease: v1.2.1-dev.3
semantic-release-bot Apr 21, 2022
36a1c6f
fix: bad overflow in modal for content with very long strings (#161)
CarmitKl Apr 23, 2022
55cdb43
prerelease: v1.2.1-dev.4
semantic-release-bot Apr 23, 2022
56fa74b
fix: add ETH mainnet addresses (#167)
dan-ziv Apr 25, 2022
d43867e
prerelease: v1.2.1-dev.5
semantic-release-bot Apr 25, 2022
e0f996a
feat: integrated with get-starknet-wallet (#163)
avimak Apr 25, 2022
59c746b
prerelease: v1.3.0-dev.1
semantic-release-bot Apr 25, 2022
69324e8
fix: canceled transfers shown in transfer log (#166)
dan-ziv Apr 25, 2022
2bed4ba
prerelease: v1.3.0-dev.2
semantic-release-bot Apr 25, 2022
6c01ae5
fix(deps): bump gsw version
dan-ziv Apr 25, 2022
6949d99
prerelease: v1.3.0-dev.3
semantic-release-bot Apr 25, 2022
2551a7f
feat: validate starknet wallet chain ID (#168)
dan-ziv Apr 26, 2022
a37b709
prerelease: v1.3.0-dev.4
semantic-release-bot Apr 26, 2022
1881192
fix: isInstalled() check for gsw (#165)
CarmitKl Apr 26, 2022
11e072a
prerelease: v1.3.0-dev.5
semantic-release-bot Apr 26, 2022
80d23d2
fix: calc L2 tx hash in the background (#169)
dan-ziv Apr 27, 2022
9b7066f
prerelease: v1.3.0-dev.6
semantic-release-bot Apr 27, 2022
bb0c9ee
chore: update starknet contract address on mainnet
dan-ziv Apr 28, 2022
cde6401
fix(utils): get url params returns undefined
dan-ziv Apr 28, 2022
44c675b
fix: handle display of exponential balances
dan-ziv Apr 28, 2022
7bdf85d
prerelease: v1.3.0-dev.7
semantic-release-bot Apr 28, 2022
1d6b023
fix: use getStarknet() provider on starknet contracts
dan-ziv Apr 28, 2022
44fc41e
prerelease: v1.3.0-dev.8
semantic-release-bot Apr 28, 2022
646feee
fix: use wallet provider for all provider calls (#170)
dan-ziv May 1, 2022
cf489c8
prerelease: v1.3.0-dev.9
semantic-release-bot May 1, 2022
10b8f57
release: v1.3.0
semantic-release-bot May 2, 2022
1d3038d
fix: temporary disable max button (#173)
dan-ziv May 3, 2022
87cc450
prerelease: v1.3.1-dev.1
semantic-release-bot May 3, 2022
2906e3e
fix: cancel toFixed when format balances (#172)
dan-ziv May 3, 2022
47f8867
prerelease: v1.3.1-dev.2
semantic-release-bot May 3, 2022
d8f3da8
fix: update text for the attempt to deposit more than the allowable a…
dan-ziv May 3, 2022
fa6d2ba
prerelease: v1.3.1-dev.3
semantic-release-bot May 3, 2022
73b1f21
fix: connection modal overrides gsw selection modal (#175)
dan-ziv May 3, 2022
b699a03
prerelease: v1.3.1-dev.4
semantic-release-bot May 3, 2022
3161cc9
fix: update app state on accountsChanged event (#176)
dan-ziv May 3, 2022
206f27e
prerelease: v1.3.1-dev.5
semantic-release-bot May 3, 2022
30d8ec3
feat: add asset to SN wallet after a successful deposit (#171)
dan-ziv May 3, 2022
de22d6f
prerelease: v1.4.0-dev.1
semantic-release-bot May 3, 2022
bcd336c
release: v1.4.0
semantic-release-bot May 4, 2022
f81d11e
ci: allow custom image tag (#177)
dan-ziv May 4, 2022
219b860
fix: CompleteTransferToL1 toast remains on display after tx is done (…
dan-ziv May 8, 2022
3f05a71
prerelease: v1.4.1-dev.1
semantic-release-bot May 8, 2022
4169584
fix(Header): testnet title not displayed
dan-ziv May 8, 2022
507e97d
prerelease: v1.4.1-dev.2
semantic-release-bot May 8, 2022
51399ce
release: v1.4.1
semantic-release-bot May 8, 2022
b5585ad
refactor: export convention (#180)
dan-ziv May 10, 2022
87fb2cb
prerelease: v1.4.2-dev.1
semantic-release-bot May 10, 2022
c75a88a
refactor: tokens addresses (#178)
dan-ziv May 10, 2022
622c3b8
prerelease: v1.4.2-dev.2
semantic-release-bot May 10, 2022
bbf19ba
feat: MultiChoiceMenu component (#181)
dan-ziv May 11, 2022
e795f1c
fix: change transfer tabs names (#182)
dan-ziv May 11, 2022
b5f3924
prerelease: v1.5.0-dev.1
semantic-release-bot May 11, 2022
79eeb5b
Fast withdrawal checkbox
maciejka May 11, 2022
f9b22be
Add test goerli dai deployment
nulven May 12, 2022
b6d7457
Fix merge errors
nulven May 12, 2022
64fe929
Fix error
nulven May 12, 2022
92e623d
Fix error
nulven May 12, 2022
279cb53
Fix error
nulven May 12, 2022
e539aa8
Add fast withdrawals
nulven May 12, 2022
307dd6e
Change wormhole to teleport
nulven May 19, 2022
497fb8f
Revert "Change wormhole to teleport"
nulven May 19, 2022
0cd323c
Fix function name
nulven May 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REACT_APP_NAME=$npm_package_name
REACT_APP_VERSION=$npm_package_version
14 changes: 14 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
REACT_APP_URL=https://devnet-goerli.starkgate.starknet.io
REACT_APP_AUTO_CONNECT=false
# 20 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=20000
# goerli testnet
REACT_APP_SUPPORTED_CHAIN_ID=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_LOCAL_STORAGE_ACCEPT_TERMS=STARKGATE_ACCEPT_TERMS
REACT_APP_ONBOARDING_MODAL_TIMEOUT_HRS=24
REACT_APP_SUPPORTED_TOKENS=ETH,WBTC,USDC,USDT,DAI,SLF
14 changes: 14 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
REACT_APP_URL=https://starkgate.starknet.io
REACT_APP_AUTO_CONNECT=false
# 30 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=30000
# mainnet
REACT_APP_SUPPORTED_CHAIN_ID=1
REACT_APP_STARKNET_CONTRACT_ADDRESS=0xc662c410C0ECf747543f5bA90660f6ABeBD9C8c4
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_LOCAL_STORAGE_ACCEPT_TERMS=STARKGATE_ACCEPT_TERMS
REACT_APP_ONBOARDING_MODAL_TIMEOUT_HRS=24
REACT_APP_SUPPORTED_TOKENS=ETH
12 changes: 12 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
REACT_APP_URL=https://goerli.starkgate.starknet.io
REACT_APP_AUTO_CONNECT=false
# 20 seconds
REACT_APP_POLL_BLOCK_NUMBER_INTERVAL=20000
# goerli testnet
REACT_APP_SUPPORTED_CHAIN_ID=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_ACCEPT_TERMS=STARKGATE_ACCEPT_TERMS
REACT_APP_SUPPORTED_TOKENS=ETH,WBTC,USDC,USDT,DAI,SLF
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
node_modules
*.css
*.svg
80 changes: 80 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
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',
'no-unused-vars': 'error',
'object-shorthand': 'error',
'prefer-const': 'warn',
'prefer-template': 'warn',
'import/no-anonymous-default-export': 'off',
'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'
}
};
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: dan-ziv
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: dan-ziv
---

**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.
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Description of the Changes

Please add a detailed description of the change, whether it's an enhancement or a bugfix.
If the PR is related to an open issue please link to it.

### Checklist

- [ ] Changes have been done against master branch, and PR does not conflict
- [ ] New unit / functional tests have been added (whenever applicable)
- [ ] Test are passing in local environment
- [ ] Docs have been updated
- [ ] 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:
build:
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: [email protected]
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
65 changes: 65 additions & 0 deletions .github/workflows/helm_upgrade_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Push docker image to GCR reusable workflow

on:
workflow_call:
inputs:
app_name:
required: true
type: string
namespace_name:
required: true
type: string
values_file:
required: true
type: string
env_file:
required: true
type: string
image_tag:
required: false
type: string
secrets:
gcp_token:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
deploy:
name: Upgrade helm chart
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup GKE cluster
uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e
with:
cluster_name: web-devs
location: us-central1
credentials: ${{ secrets.gcp_token }}
- name: Helm tool installer
uses: Azure/[email protected]
- name: Download starkware-third-party repo from S3.
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-2
run: |
helm plugin install https://starkware-third-party.s3.us-east-2.amazonaws.com/k8s/helm-s3/helm-s3-v0.9.2.tar.gz
helm repo add starkware s3://starkware-third-party/helm-repo/charts
helm repo update
- name: Set image tag
id: get_image_tag
run: echo "::set-output name=tag::${{ inputs.image_tag || github.ref_name }}"
- name: Upgrade using helm upgrade command.
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-2
run: |
helm upgrade ${{ inputs.app_name }} starkware/webapp-general-helm \
--namespace=${{ inputs.namespace_name }} \
--values ${{ inputs.values_file}} \
--set-file configMap.frontend.envs=${{ inputs.env_file }} \
--set frontend.image.tag=${{ steps.get_image_tag.outputs.tag }}
37 changes: 37 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Pull request workflow

on: pull_request

jobs:
lint:
name: Find linting problems in your JavaScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 16

- name: Install node_modules
run: yarn

- name: Run ESLint check
run: yarn run lint

test:
name: Running unit tests
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 16

- name: Install node_modules
run: yarn

- name: Run tests
run: yarn run test --passWithNoTests
31 changes: 31 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Push workflow

on:
push:
branches:
- dev
- master

jobs:
release-version:
name: Releasing a version
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, 'release') || (github.ref_name == 'master' && !startsWith(github.event.head_commit.message, 'release')) }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.USER_TOKEN }}

- uses: actions/setup-node@v2
with:
node-version: 16

- name: Install node_modules
run: yarn

- name: Run release script
run: yarn run release
env:
GITHUB_TOKEN: ${{ secrets.USER_TOKEN }}
GH_TOKEN: ${{ secrets.USER_TOKEN }}
Loading