Skip to content

Commit

Permalink
Fix shiden (#64)
Browse files Browse the repository at this point in the history
* add generate docs scripts

* Keep calm and commit

* update

* update

* update

* ignore support-bridges.ts

* test

* update acala.spec.ts

* update test

* ignore some test
  • Loading branch information
qwer951123 authored Jun 14, 2023
1 parent 94af08f commit b2f4baf
Show file tree
Hide file tree
Showing 43 changed files with 3,028 additions and 769 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ module.exports = {
'.yarn/**',
'**/build/*',
'**/coverage/*',
'**/node_modules/*'
'**/node_modules/*',
'src/support-bridges.ts'
],
plugins: [
...base.plugins,
Expand Down
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run lint
yarn run build:docs
git add .
71 changes: 5 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,69 +6,8 @@ You can integrate the amazing multi-chain bridge into your DApp with this SDK.

And you're welcome to add your parachain-adapter into the SDK.

### Supported parachains

Polkadot:

| from | to | tokens |
| -------- | -------- | ------------------ |
| polkadot | acala | DOT |
| acala | polkadot | DOT |
| acala | moonbeam | GLMR ACA AUSD DOT |
| acala | parallel | PARA ACA AUSD LDOT |
| acala | interlay | INTR IBTC |
| acala | astar | ASTR ACA AUSD LDOT |
| acala | hydraDX | DAI WETH WBTC |
| parallel | acala | PARA ACA AUSD LDOT |
| interlay | acala | INTR IBTC |
| astar | acala | ASTR ACA AUSD LDOT |
| hydraDX | acala | DAI WETH WBTC |

Kusama:

| from | to | tokens |
| ---------- | ---------- | ---------------------- |
| kusama | karura | KSM |
| kusama | statemine | KSM |
| kusama | basilisk | KSM |
| statemine | karura | RMRK ARIS USDT |
| karura | kusama | KSM |
| karura | statemine | RMRK ARIS USDT |
| karura | bifrost | BNC KAR AUSD VSKSM |
| karura | shiden | SDN AUSD |
| karura | altair | AIR AUSD |
| karura | shadow | CSM KAR AUSD |
| karura | crab | CRAB |
| karura | integritee | TEER |
| karura | kintsugi | KINT KBTC |
| karura | khala | PHA KAR AUSD |
| karura | kico | KICO KAR AUSD |
| karura | calamari | KMA KAR AUSD LKSM |
| karura | moonriver | MOVR KAR AUSD |
| karura | heiko | HKO KAR AUSD LKSM |
| karura | pichiu | PCHU KAR AUSD LKSM |
| karura | turing | TUR KAR AUSD LKSM |
| karura | quartz | QTZ |
| karura | basilisk | BSX AUSD DAI USDCet |
| karura | listen | LT KAR AUSD LKSM |
| bifrost | karura | BNC KAR AUSD KSM VSKSM |
| shiden | karura | SDN AUSD |
| altair | karura | AIR AUSD |
| shadow | karura | CSM KAR AUSD |
| crab | karura | CRAB |
| integritee | karura | TEER |
| kintsugi | karura | KINT KBTC |
| khala | karura | PHA KAR AUSD |
| kico | karura | KICO KAR AUSD |
| calamari | karura | KMA KAR AUSD KSM LKSM |
| moonriver | karura | MOVR KAR AUSD |
| heiko | karura | HKO KAR AUSD LKSM |
| pichiu | karura | PCHU KAR AUSD LKSM |
| turing | karura | TUR KAR AUSD LKSM |
| quartz | karura | QTZ |
| basilisk | kusama | KSM |
| basilisk | karura | BSX AUSD KSM DAI |
| listen | karura | LT KAR AUSD LKSM |
## Support Bridges
[all support bridges](docs/support-bridges.md)

## Usage

Expand Down Expand Up @@ -208,7 +147,7 @@ export const bifrostTokensConfig: Record<string, MultiChainToken> = {
VSKSM: { name: "VSKSM", symbol: "VSKSM", decimals: 12, ed: "100000000" },
/// ...other tokens
};
export const bifrostRoutersConfig: Omit<RouteConfigs, "from">[] = [
export const bifrostRouteConfigs: Omit<RouteConfigs, "from">[] = [
/// router for token `BNC` from `bifrost` to `karura`,
/// `xcm.fee` defines the XCM-Fee on karura,
/// `xcm.weightLimit` defines the weightLimit value used creating Extrinsic.
Expand Down Expand Up @@ -328,10 +267,10 @@ class BaseBifrostAdapter extends BaseCrossChainAdapter {

```typescript
/// `chains.bifrost` is the config you added in step 1.
/// `bifrostRoutersConfig` & `bifrostTokensConfig` is the config you defined in step 2.1.
/// `bifrostRouteConfigs` & `bifrostTokensConfig` is the config you defined in step 2.1.
export class BifrostAdapter extends BaseBifrostAdapter {
constructor() {
super(chains.bifrost, bifrostRoutersConfig, bifrostTokensConfig);
super(chains.bifrost, bifrostRouteConfigs, bifrostTokensConfig);
}
}
```
Expand Down
158 changes: 158 additions & 0 deletions docs/support-bridges.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@

# Support Bridges

## Bridges

| From | To | Token |
| --- | --- | --- |
| acala | polkadot | DOT |
| acala | moonbeam | GLMR |
| acala | moonbeam | ACA |
| acala | moonbeam | AUSD |
| acala | moonbeam | DOT |
| acala | parallel | PARA |
| acala | parallel | ACA |
| acala | parallel | AUSD |
| acala | parallel | LDOT |
| acala | astar | ASTR |
| acala | astar | ACA |
| acala | astar | AUSD |
| acala | astar | LDOT |
| acala | interlay | INTR |
| acala | interlay | IBTC |
| acala | hydradx | DAI |
| acala | hydradx | WETH |
| acala | hydradx | WBTC |
| acala | unique | UNQ |
| karura | kusama | KSM |
| karura | statemine | RMRK |
| karura | statemine | ARIS |
| karura | statemine | USDT |
| karura | shiden | SDN |
| karura | shiden | KUSD |
| karura | bifrost | BNC |
| karura | bifrost | KAR |
| karura | bifrost | KUSD |
| karura | bifrost | VSKSM |
| karura | altair | AIR |
| karura | altair | KUSD |
| karura | shadow | CSM |
| karura | shadow | KAR |
| karura | shadow | KUSD |
| karura | crab | CRAB |
| karura | integritee | TEER |
| karura | kintsugi | KINT |
| karura | kintsugi | KBTC |
| karura | kintsugi | LKSM |
| karura | khala | PHA |
| karura | khala | KUSD |
| karura | khala | KAR |
| karura | kico | KICO |
| karura | kico | KAR |
| karura | kico | KUSD |
| karura | calamari | KMA |
| karura | calamari | KUSD |
| karura | calamari | KAR |
| karura | calamari | LKSM |
| karura | moonriver | MOVR |
| karura | moonriver | KAR |
| karura | moonriver | KUSD |
| karura | heiko | HKO |
| karura | heiko | KAR |
| karura | heiko | KUSD |
| karura | heiko | LKSM |
| karura | pichiu | PCHU |
| karura | pichiu | KAR |
| karura | pichiu | KUSD |
| karura | pichiu | LKSM |
| karura | turing | TUR |
| karura | turing | KAR |
| karura | turing | KUSD |
| karura | turing | LKSM |
| karura | basilisk | BSX |
| karura | basilisk | KUSD |
| karura | basilisk | DAI |
| karura | basilisk | USDCet |
| karura | basilisk | WETH |
| karura | basilisk | WBTC |
| karura | listen | LT |
| karura | listen | KAR |
| karura | listen | KUSD |
| karura | listen | LKSM |
| karura | quartz | QTZ |
| astar | acala | ASTR |
| astar | acala | ACA |
| astar | acala | AUSD |
| astar | acala | LDOT |
| astar | hydradx | ASTR |
| shiden | karura | SDN |
| shiden | karura | KUSD |
| bifrost | karura | BNC |
| bifrost | karura | VSKSM |
| bifrost | karura | KSM |
| bifrost | karura | KAR |
| bifrost | karura | KUSD |
| basilisk | kusama | KSM |
| basilisk | karura | BSX |
| basilisk | karura | KUSD |
| basilisk | karura | KSM |
| basilisk | karura | DAI |
| basilisk | karura | USDCet |
| basilisk | karura | WETH |
| basilisk | karura | WBTC |
| hydradx | acala | DAI |
| hydradx | acala | WETH |
| hydradx | acala | WBTC |
| integritee | karura | TEER |
| interlay | acala | INTR |
| interlay | acala | IBTC |
| interlay | hydradx | IBTC |
| kintsugi | karura | KINT |
| kintsugi | karura | KBTC |
| kintsugi | karura | LKSM |
| kico | karura | KICO |
| kico | karura | KAR |
| kico | karura | KUSD |
| pichiu | karura | PCHU |
| pichiu | karura | KAR |
| pichiu | karura | KUSD |
| pichiu | karura | LKSM |
| listen | karura | LT |
| listen | karura | KAR |
| listen | karura | KUSD |
| listen | karura | LKSM |
| calamari | karura | KMA |
| calamari | karura | KUSD |
| calamari | karura | KAR |
| calamari | karura | LKSM |
| calamari | karura | KSM |
| turing | karura | TUR |
| turing | karura | KAR |
| turing | karura | KUSD |
| turing | karura | LKSM |
| parallel | acala | PARA |
| parallel | acala | ACA |
| parallel | acala | AUSD |
| parallel | acala | LDOT |
| heiko | karura | HKO |
| heiko | karura | KAR |
| heiko | karura | KUSD |
| heiko | karura | LKSM |
| khala | karura | PHA |
| khala | karura | KUSD |
| khala | karura | KAR |
| polkadot | acala | DOT |
| polkadot | hydradx | DOT |
| polkadot | statemint | DOT |
| kusama | karura | KSM |
| kusama | basilisk | KSM |
| kusama | statemine | KSM |
| statemint | polkadot | DOT |
| statemint | hydradx | USDT |
| statemine | kusama | KSM |
| statemine | karura | RMRK |
| statemine | karura | ARIS |
| statemine | karura | USDT |
| unique | acala | UNQ |
| quartz | karura | QTZ |
| zeitgeist | hydradx | ZTG |
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkawallet/bridge",
"version": "0.0.8-4",
"version": "0.0.8-5",
"description": "polkawallet bridge sdk",
"main": "index.js",
"types": "index.d.ts",
Expand All @@ -16,10 +16,13 @@
"repository": "https://github.com/polkawallet-io/bridge.git",
"homepage": "https://github.com/polkawallet-io/bridge",
"scripts": {
"clain": "rm -rf build",
"build": "tsc",
"test": "jest",
"lint": "polkadot-dev-run-lint",
"build:release": "polkadot-ci-ghact-build"
"build:docs": "ts-node ./scripts/generate-bridge-document.ts",
"build:release": "polkadot-ci-ghact-build",
"prepare": "husky install"
},
"peerDependencies": {
"@acala-network/api": "^5",
Expand All @@ -30,18 +33,18 @@
"@acala-network/api": "^5.1.1",
"@acala-network/sdk": "^4.1.9-2",
"@acala-network/sdk-core": "^4.1.9-2",
"@polkadot/api": "^10.7.3",
"@polkadot/types": "^10.7.3"
"@polkadot/api": "^10.9.1",
"@polkadot/types": "^10.9.1"
},
"dependencies": {
"@acala-network/api": "^5.1.1",
"@acala-network/api": "^5",
"@acala-network/sdk": "^4.1.9-2",
"@acala-network/sdk-core": "^4.1.9-2",
"@polkadot/api": "^10.7.3",
"@polkadot/apps-config": "^0.131.4",
"@polkadot/types": "^10.7.3",
"@polkadot/api": "^10.9.1",
"@polkadot/types": "^10.9.1",
"axios": "^0.27.2",
"ethers": "~5.7.0",
"ethers": "^5",
"lodash": "^4.17.20"
},
"devDependencies": {
Expand All @@ -50,8 +53,9 @@
"@types/jest": "^28.1.1",
"@types/lodash": "^4.14.161",
"eslint-plugin-unused-imports": "^2.0.0",
"husky": "^8.0.3",
"jest": "^28.1.1",
"typescript": "^4.7.4"
},
"stableVersion": "0.0.8-3"
"stableVersion": "0.0.8-4"
}
Loading

0 comments on commit b2f4baf

Please sign in to comment.