-
Notifications
You must be signed in to change notification settings - Fork 13
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
0 parents
commit 9194abe
Showing
625 changed files
with
36,383 additions
and
0 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,47 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# generated | ||
/generated | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# git | ||
.git | ||
**/.github | ||
|
||
#ide | ||
.vscode | ||
|
||
public/runtime/ | ||
Dockerfile |
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,6 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = 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,61 @@ | ||
# https://{NETWORK}.infura.io/v3/{INFURA_API_KEY} | ||
INFURA_API_KEY= | ||
|
||
# https://eth-{NETWORK}.alchemyapi.io/v2/{ALCHEMY_API_KEY} | ||
ALCHEMY_API_KEY= | ||
|
||
# supported networks for connecting wallet | ||
SUPPORTED_CHAINS=1,4,5 | ||
|
||
# this chain uses when a wallet is not connected | ||
DEFAULT_CHAIN=1 | ||
|
||
# api key for ethplorer for token data | ||
ETHPLORER_API_KEY=freekey | ||
|
||
# Variables to read/update staking apr stats on cloudflare vk storage | ||
# Not necessary for development | ||
CLOUDFLARE_API_TOKEN= | ||
CLOUDFLARE_ACCOUNT_ID= | ||
CLOUDFLARE_KV_NAMESPACE_ID= | ||
|
||
# comma-separated trusted hosts for Content Security Policy | ||
# e.g. http://localhost:PORT for local development | ||
CSP_TRUSTED_HOSTS=https://*.lido.fi | ||
|
||
# put "true" enable report only mode for CSP | ||
CSP_REPORT_ONLY=true | ||
|
||
# api endpoint for reporting csp violations | ||
CSP_REPORT_URI=https://stake.lido.fi/api/csp-report | ||
|
||
# Subgraph endpoint | ||
SUBGRAPH_MAINNET=https://api.thegraph.com/subgraphs/name/lidofinance/lido | ||
SUBGRAPH_ROPSTEN= | ||
SUBGRAPH_RINKEBY= | ||
SUBGRAPH_GOERLI= | ||
SUBGRAPH_KOVAN= | ||
SUBGRAPH_KINTSUGI= | ||
|
||
SUBGRAPH_REQUEST_TIMEOUT=5000 | ||
|
||
# allow some state overrides from browser console for QA | ||
ENABLE_QA_HELPERS=false | ||
|
||
REWARDS_BACKEND=http://127.0.0.1:4000 | ||
|
||
# rate limit | ||
RATE_LIMIT=60 | ||
RATE_LIMIT_TIME_FRAME=60 | ||
|
||
# ETH API | ||
ETH_API_BASE_PATH= | ||
|
||
# Withdrawals AI | ||
WQ_API_BASE_PATH= | ||
|
||
# Matomo analytics (in future will be MATOMO_HOST) | ||
MATOMO_URL= | ||
|
||
# WalletConnect project ID | ||
WALLETCONNECT_PROJECT_ID= |
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,15 @@ | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
/public |
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,46 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:jsx-a11y/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint", "react"], | ||
"rules": { | ||
"prettier/prettier": ["error", {}, { "usePrettierrc": true }], | ||
"react/react-in-jsx-scope": "off", | ||
"react/prop-types": "off", | ||
"react/display-name": "off", | ||
"@typescript-eslint/no-empty-interface": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"ignoreRestSiblings": true, | ||
"argsIgnorePattern": "^_" | ||
} | ||
], | ||
"jsx-a11y/no-autofocus": "off", | ||
"jsx-a11y/anchor-is-valid": "off", | ||
"func-style": ["error", "expression"] | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
} | ||
} |
Validating CODEOWNERS rules …
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 @@ | ||
* @lidofinance/lido-eth-ui @lidofinance/lido-qa | ||
.github @lidofinance/review-gh-workflows |
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,7 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,24 @@ | ||
<!--- If any section below doesn't make sense for your pull request, delete it please. --> | ||
|
||
### Description | ||
|
||
<!--- Briefly note most valuable changes in what you did and why we need it, even if the task was described in detail in the task tracker. --> | ||
|
||
### Demo | ||
|
||
<!--- If thee are visual changes, attach a link to a specific section on preview stand / add screenshots / record a [loom](https://www.loom.com/). --> | ||
|
||
### Code review notes | ||
|
||
<!--- Describe all uncertain decisions you made code-wise, e.g. readability vs performance. --> | ||
|
||
### Testing notes | ||
|
||
<!--- List all possible edge cases and how to test them. --> | ||
|
||
### Checklist: | ||
|
||
- [ ] Checked the changes locally. | ||
- [ ] Created / updated analytics events. | ||
- [ ] Created / updated the technical documentation (README.md / [docs](https://docs.lido.fi/) / etc.). | ||
- [ ] Affects / requires changes in other services (Matomo / Sentry / CloudFlare / 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,11 @@ | ||
name: Tests and Checks | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
security: | ||
uses: lidofinance/linters/.github/workflows/security.yml@master | ||
docker: | ||
uses: lidofinance/linters/.github/workflows/docker.yml@master | ||
actions: | ||
uses: lidofinance/linters/.github/workflows/actions.yml@master |
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,39 @@ | ||
name: CI Dev | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- develop | ||
paths-ignore: | ||
- ".github/**" | ||
- "test/**" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
# test: | ||
# ... | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
# needs: test | ||
name: Build and deploy | ||
steps: | ||
- name: Testnet deploy | ||
uses: lidofinance/dispatch-workflow@v1 | ||
env: | ||
APP_ID: ${{ secrets.APP_ID }} | ||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} | ||
TARGET_REPO: "lidofinance/infra-mainnet" | ||
TARGET_WORKFLOW: "deploy_testnet_staking_widget_ts.yaml" | ||
TARGET: "develop" | ||
|
||
tests: | ||
needs: deploy | ||
if: ${{ github.event.pull_request.draft == false }} | ||
uses: ./.github/workflows/tests.yml | ||
secrets: inherit | ||
with: | ||
stand_url: https://stake.testnet.fi |
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,27 @@ | ||
name: CI Preview stand demolish | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
[converted_to_draft, closed] | ||
branches-ignore: | ||
- main | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Build and deploy | ||
steps: | ||
- name: Preview stand deploying | ||
uses: lidofinance/dispatch-workflow@v1 | ||
env: | ||
APP_ID: ${{ secrets.APP_ID }} | ||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} | ||
TARGET_REPO: "lidofinance/infra-mainnet" | ||
TARGET: ${{ github.head_ref }} | ||
TARGET_WORKFLOW: "preview_stand_demolish.yaml" | ||
INPUTS_REPO_NAME: ${{ github.repository }} | ||
INPUTS_PR_ID: ${{ github.event.pull_request.number }} |
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,77 @@ | ||
name: CI Preview stand deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
inventory: | ||
description: inventory to be used for preview stand deploying | ||
default: testnet | ||
required: false | ||
type: choice | ||
options: | ||
- staging-critical | ||
- testnet | ||
|
||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
branches-ignore: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.draft == false }} | ||
name: Build and deploy | ||
outputs: | ||
stand_url: ${{ steps.stand.outputs.url }} | ||
steps: | ||
- uses: lidofinance/gh-find-current-pr@v1 | ||
id: pr | ||
|
||
- name: Set ref | ||
id: ref | ||
run: echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
|
||
- name: Preview stand deploying | ||
uses: lidofinance/dispatch-workflow@v1 | ||
env: | ||
APP_ID: ${{ secrets.APP_ID }} | ||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} | ||
TARGET_REPO: 'lidofinance/infra-mainnet' | ||
TARGET: ${{ github.head_ref || steps.ref.outputs.short_ref }} | ||
TARGET_WORKFLOW: 'preview_stand_deploy.yaml' | ||
INPUTS_REPO_NAME: ${{ github.repository }} | ||
INPUTS_PR_ID: ${{ steps.pr.outputs.number }} | ||
INPUTS_INVENTORY: "${{ inputs.inventory || 'testnet' }}" | ||
|
||
- name: Define repo short name | ||
run: echo "short_name=$(echo ${{ github.repository }} | cut -d "/" -f 2)" >> $GITHUB_OUTPUT | ||
id: repo | ||
|
||
- name: Define branch hash | ||
run: echo "hash=$(echo "$HEAD_REF" | shasum -a 256 | cut -c -10)" >> $GITHUB_OUTPUT | ||
id: branch | ||
env: | ||
HEAD_REF: ${{ github.head_ref || steps.ref.outputs.short_ref }} | ||
|
||
- name: Extract stand url | ||
if: always() | ||
run: echo "url=https://$SHORT_NAME-$BRANCH_HASH.branch-preview.org" >> $GITHUB_OUTPUT | ||
id: stand | ||
env: | ||
SHORT_NAME: ${{ steps.repo.outputs.short_name }} | ||
BRANCH_HASH: ${{ steps.branch.outputs.hash }} | ||
|
||
# tests: | ||
# needs: deploy | ||
# if: ${{ github.event.pull_request.draft == false }} | ||
# uses: ./.github/workflows/tests.yml | ||
# secrets: inherit | ||
# with: | ||
# stand_url: ${{ needs.deploy.outputs.stand_url }} | ||
# stand_type: "${{ inputs.inventory || 'testnet' }}" | ||
# on_preview_stand: true |
Oops, something went wrong.