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

DORA token migration #1

Merged
merged 27 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d60173b
remove some ui
VegeBun-csj Jul 24, 2024
772059b
Change to dora
VegeBun-csj Jul 27, 2024
75119b1
Create Dockerfile
tinydjp Jul 27, 2024
e50300b
Update Dockerfile
tinydjp Jul 27, 2024
9ad9e26
Create cicd.yml
tinydjp Jul 27, 2024
fe5cf73
Update Dockerfile
tinydjp Jul 27, 2024
dd251b6
Update cicd.yml
tinydjp Jul 27, 2024
6d0bb87
build(devDeps): add `@types/bech32`
realfish Jul 27, 2024
3fd576a
Merge pull request #2 from realfish/hotfix/fix-build-error
VegeBun-csj Jul 28, 2024
6e29391
Fix the issue with displaying updated text
VegeBun-csj Jul 28, 2024
bf512e6
Update dora explorer
VegeBun-csj Jul 29, 2024
24432f1
Update
VegeBun-csj Jul 29, 2024
b65582c
Update DoraAddress
VegeBun-csj Jul 29, 2024
cf8c5a6
Add Some Rules
VegeBun-csj Jul 29, 2024
9e008e9
Fix txHash
VegeBun-csj Jul 30, 2024
0e00be4
update dora-bridge contract
VegeBun-csj Aug 2, 2024
4c73e72
update DORA Amount logo
VegeBun-csj Aug 2, 2024
8629496
update DORA explorer
VegeBun-csj Aug 2, 2024
c7e7aaa
Fix sepolia testnet issue
VegeBun-csj Aug 7, 2024
9ce79a1
Fix infura api
VegeBun-csj Aug 8, 2024
5c7d4c2
Fix get all unprocessed records
VegeBun-csj Aug 11, 2024
c9310d1
Fix some typo
VegeBun-csj Aug 11, 2024
951f710
Add terms and privacy, Update some typo
VegeBun-csj Aug 12, 2024
2a8b108
Update some typo style
VegeBun-csj Aug 12, 2024
9eab158
bridge amount must greater than 0.1DORA
VegeBun-csj Aug 14, 2024
3b9369f
Add Privacy policy link
VegeBun-csj Aug 14, 2024
43201bb
Update Acknowledge Terms
VegeBun-csj Aug 15, 2024
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
33 changes: 7 additions & 26 deletions .env
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
VITE_BASE_URL=
VITE_TRADE_URL=
VITE_DOCS_URL=
VITE_MINTSCAN_URL=
VITE_ETHERSCAN_URL=

VITE_ALCHEMY_API_KEY=
VITE_WALLETCONNECT2_PROJECT_ID=
VITE_PK_ENCRYPTION_KEY=

VITE_STAKING_LEARN_MORE_LINK=
VITE_LAUNCH_BLOG_POST_LINK=

VITE_NETWORK_ENVIRONMENT=
VITE_NETWORK_INDEXER_REST_ENDPOINT=
VITE_NETWORK_INDEXER_WS_ENDPOINT=
VITE_NEWORK_VALIDATOR_REST_ENDPOINT=
VITE_NETWORK_CHAIN_ID=
VITE_NETWORK_USDC_DENOM=
VITE_NETWORK_USDC_DECIMALS=

VITE_ETH_CHAIN_ID=
VITE_ETH_DYDX_ADDRESSS=
VITE_BRIDGE_CONTRACT_ADDRESS=
VITE_DYDX_DENOM=
VITE_DYDX_DECIMALS=
VITE_DOCS_URL=https://docs.dorafactory.org/docs
VITE_ETHERSCAN_URL=https://sepolia.etherscan.io
VITE_DORA_EXPLORER_URL=https://vota-testnet-explorer.dorafactory.org/doravotatestnet
VITE_INFURA_API_KEY=bee5140d9d2243d580ef49ade75c2356
VITE_ETH_CHAIN_ID=11155111
VITE_ETH_DORA_ADDRESSS=0xe0A1A9e1a0704CE7B6c73988dbb4E2a54B846791
VITE_BRIDGE_CONTRACT_ADDRESS=0x775cB1bB3101A3881D093A2e1e1D0A7135809EDA
42 changes: 42 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Vota bridge CICD

on:
push:
branches: [dora-migrate-vota]

jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Git clone the repository
uses: actions/checkout@v4
- name: Build image
env:
BUILD_ARG: ${{ github.ref_name }}
run: |
docker build -t vota-bridge-ui:local -f Dockerfile .
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@master
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ap-southeast-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: 'true'
- name: Tag, push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: vota-bridge-ui
IMAGE_TAG: ${{ github.ref_name }}
run: |
docker tag vota-bridge-ui:local $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
- name: Redeploy on aws
run: |
aws eks update-kubeconfig --region ap-southeast-1 --name ${{ secrets.EKS_CLUSTER }}
kubectl rollout restart deploy vota-bridge-ui-dev
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:18-alpine AS build

WORKDIR /app

COPY . .
RUN npm i -g pnpm
RUN pnpm install
RUN pnpm run build

FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html

# optional nginx.conf
# COPY nginx.conf /etc/nginx/nginx.conf

EXPOSE 80

# 启动 Nginx
CMD ["nginx", "-g", "daemon off;"]
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="dark light" />
<title>dYdX · Migrate</title>
<title>DORA Token Migration</title>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@dYdX" />
<meta name="twitter:creator" content="@dYdX" />
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
"@react-stately/table": "^3.9.1",
"@reduxjs/toolkit": "^1.9.5",
"autoprefixer": "10.4.15",
"bech32": "^1.1.4",
"bignumber.js": "^9.1.1",
"buffer": "^6.0.3",
"crypto-js": "^4.1.1",
"eslint": "8.47.0",
"eslint-config-next": "13.4.19",
"ethers": "^6.13.1",
"lodash": "^4.17.21",
"luxon": "^3.4.3",
"postcss": "8.4.28",
Expand All @@ -54,6 +56,8 @@
"react-router-dom": "^6.16.0",
"react-stately": "^3.23.0",
"reselect": "^4.1.8",
"stream": "^0.0.3",
"stream-browserify": "^3.0.0",
"styled-components": "^5.3.11",
"typescript": "5.1.6",
"vite-plugin-svgr": "^3.2.0",
Expand All @@ -62,6 +66,7 @@
"devDependencies": {
"@react-types/shared": "^3.20.0",
"@react-types/table": "^3.8.1",
"@types/bech32": "^1.1.4",
"@types/crypto-js": "^4.1.2",
"@types/lodash": "^4.14.197",
"@types/luxon": "^3.3.2",
Expand Down
58 changes: 47 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/currencies/dora.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 16 additions & 22 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,13 @@ const Content = () => {
items={[
{
value: MigrateTabs.Migrate,
label: stringGetter({ key: STRING_KEYS.MIGRATE }),
label: "Migrate",
forceMount: true,
content: <MigratePage />,
},
{
value: MigrateTabs.PendingMigrations,
label: stringGetter({
key: STRING_KEYS.PENDING_MIGRATIONS,
}),
label: 'Pending Migrations',
forceMount: true,
content: <PendingMigrationsPage />,
},
Expand Down
1 change: 1 addition & 0 deletions src/components/AssetIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type AssetSymbol = keyof typeof assetIcons;
const assetIcons = {
DYDX: '/currencies/dydx.png',
ETH: '/currencies/eth.png',
DORA: '/currencies/dora.png'
} as const;

const isAssetSymbol = (symbol?: string): symbol is AssetSymbol =>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const CopyButton = ({
onClick={onCopy}
>
<Icon iconName={IconName.Copy} />
{children ?? stringGetter({ key: copied ? STRING_KEYS.COPIED : STRING_KEYS.COPY })}
{children ?? (copied ? 'Copied' : 'Copy')}
</Button>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export enum IconName {
Close = 'Close',
Copy = 'Copy',
Discord = 'Discord',
Explorer = 'Dora vota Explorer',
ExportKeys = 'ExportKeys',
File = 'File',
HelpCircle = 'HelpCircle',
Expand Down
Loading
Loading