|
1 |
| -# Helix Bridge |
| 1 | +# Helix Bridge UI |
2 | 2 |
|
3 |
| -## DEPLOYMENTS |
| 3 | +❤️ Perform cross-chain transfers through Helix Bridge. |
4 | 4 |
|
5 | 5 | ### Production
|
6 | 6 |
|
7 |
| -helix: https://helixbridge.app |
8 |
| -helix test: https://helix-apps-test.vercel.app |
| 7 | +- mainnet: https://helixbridge.app/ |
| 8 | +- testnet: https://testnet.helixbridge.app/ |
9 | 9 |
|
10 | 10 | ### Staging
|
11 | 11 |
|
12 |
| -helix: https://helix-stg.vercel.app |
13 |
| -helix test: https://helix-stg-test.vercel.app/ |
| 12 | +- mainnet: https://helix-stg.vercel.app/ |
| 13 | +- testnet: https://helix-stg-test.vercel.app/ |
14 | 14 |
|
15 |
| -## HOW TO ADD A BRIDGE |
| 15 | +### Development |
16 | 16 |
|
17 |
| -### Step-1: Generate bridge |
18 |
| - |
19 |
| -Go to `package/apps/` and run `yarn init:bridge` |
20 |
| - |
21 |
| -Under the `bridges/[BRIDGE_TYPE]` folder, you will find a new bridge folder which created by the script |
22 |
| - |
23 |
| -Update files below under the apps project: |
24 |
| - |
25 |
| -1. `bridges/[BRIDGE_TYPE]/[YOU_BRIDGE]/model/bridge.ts` Update the generated type if needed |
26 |
| -1. `bridges/[BRIDGE_TYPE]/[YOU_BRIDGE]/config/bridge.ts` Update bridge configuration |
27 |
| -1. `config/bridge.ts` Add bridge to the corresponding bridge array. |
28 |
| -1. `bridges/bridges.ts` Add the bridge class to the constructor array. |
29 |
| - |
30 |
| -### Step-2: Check network |
31 |
| - |
32 |
| -`shared/config/network/` Add network configuration if needed: |
33 |
| - |
34 |
| -1. `shared/model/network.ts` Update network type |
35 |
| -1. `shared/config/network/` Add network configuration |
36 |
| -1. `shared/config/theme.ts` Update theme configuration |
37 |
| -1. `shared/config/network/networks.ts` Add network |
38 |
| - |
39 |
| -Make sure the token exists on the network configuration: |
40 |
| - |
41 |
| -1. add the token config if not exist |
42 |
| -1. update the cross field for the token if exist |
43 |
| - |
44 |
| -### Step-3: Unit test |
45 |
| - |
46 |
| -Run `yarn test:apps:unit` under the project root, fix the failed test suits. |
47 |
| - |
48 |
| -> After the steps above completed, you can find the tokens in the token selection list, and next what you need to do is complete the transfer function. |
49 |
| -
|
50 |
| -### Step-4: Complete bridge development |
51 |
| - |
52 |
| -##### [YOUR BRIDGE]/*.tsx |
53 |
| - |
54 |
| -Adjust the type parameter of <b>CrossToken</b>. <b>ChainConfig</b> is just a base type. You can find all supported chain types at <b>packages/shared/model/network/config.ts</b> |
55 |
| - |
56 |
| -In most cases you do not need to modify this component, if you need to, feel free to do it here. |
57 |
| - |
58 |
| -##### [YOUR BRIDGE]/utils/bridge.ts |
59 |
| - |
60 |
| -Adjust the Bridge's second and third type parameters. <b>ChainConfig</b> is just a base type. You can find all supported chain types at <b>packages/shared/model/network/config.ts</b> |
61 |
| - |
62 |
| -Implement the methods needed for the generated bridge class, this should be your main job. |
63 |
| - |
64 |
| -### Step-5: Complete record detail page |
65 |
| - |
66 |
| -If the bridge that you created is helix type, you will find a new record file created `pages/records/helix/[BRIDGE_NAME]/[id].tsx`, check and update the transfer process. |
67 |
| - |
68 |
| -For other types of bridges, you can skip this step. |
| 17 | +- mainnet: https://helix-dev.vercel.app/ |
| 18 | +- testnet: https://helix-dev-test.vercel.app/ |
0 commit comments