Skip to content

Commit

Permalink
feat: support lova (#144)
Browse files Browse the repository at this point in the history
* relase 0.1.7-13

* feat: update asset_hub configs to support LOVA and DAMN

* feat: add lova support
  • Loading branch information
qwer951123 authored Jan 23, 2025
1 parent 01f1550 commit 601180a
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@polkawallet/bridge",
"version": "0.1.7-14",
"version": "0.1.7-15",
"description": "polkawallet bridge sdk",
"main": "index.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -58,5 +58,5 @@
"ts-node": "^10.9.2",
"typescript": "^4.7.4"
},
"stableVersion": "0.1.7-13"
"stableVersion": "0.1.7-14"
}
26 changes: 26 additions & 0 deletions src/adapters/acala/acala-configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,20 @@ export const acalaRouteConfigs = createRouteConfigs("acala", [
fee: { token: "DOT", amount: "160000000" },
},
},
{
to: "assetHubPolkadot",
token: "LOVA",
xcm: {
fee: { token: "DOT", amount: "160000000" },
},
},
{
to: "assetHubPolkadot",
token: "DAMN",
xcm: {
fee: { token: "DOT", amount: "160000000" },
},
},
]);

export const acalaTokensConfig: Record<string, ExtendedToken | BasicToken> = {
Expand Down Expand Up @@ -250,4 +264,16 @@ export const acalaTokensConfig: Record<string, ExtendedToken | BasicToken> = {
decimals: 10,
ed: "1000000000",
},
LOVA: {
name: "LOVA",
symbol: "LOVA",
decimals: 12,
ed: "1",
},
DAMN: {
name: "DAMN",
symbol: "DAMN",
decimals: 12,
ed: "1",
},
};
36 changes: 34 additions & 2 deletions src/adapters/assethub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,24 @@ export const assetHubPolkadotRouteConfigs = createRouteConfigs(
weightLimit: "Unlimited",
},
},
{
to: "acala",
token: "LOVA",
xcm: {
deliveryFee: { token: "DOT", amount: "311100000" },
fee: { token: "LOVA", amount: "803" },
weightLimit: "Unlimited",
},
},
{
to: "acala",
token: "DAMN",
xcm: {
deliveryFee: { token: "DOT", amount: "311100000" },
fee: { token: "DAMN", amount: "803" },
weightLimit: "Unlimited",
},
},
{
to: "acala",
token: "PINK",
Expand Down Expand Up @@ -137,7 +155,7 @@ export const assetHubKusamaRouteConfigs = createRouteConfigs("assetHubKusama", [
to: "karura",
token: "USDT",
xcm: {
fee: { token: "USDT", amount: "808" },
fee: { token: "USDT", amount: "0" },
deliveryFee: { token: "KSM", amount: "1036333296" },
weightLimit: "Unlimited",
},
Expand All @@ -146,7 +164,7 @@ export const assetHubKusamaRouteConfigs = createRouteConfigs("assetHubKusama", [
to: "kintsugi",
token: "USDT",
xcm: {
fee: { token: "USDT", amount: "20000" },
fee: { token: "USDT", amount: "0" },
deliveryFee: { token: "KSM", amount: "1036333296" },
weightLimit: "Unlimited",
},
Expand Down Expand Up @@ -182,6 +200,20 @@ export const assetHubPolkadotTokensConfig: Record<string, ExtendedToken> = {
ed: "1",
toRaw: () => new BN(23),
},
LOVA: {
name: "LOVA",
symbol: "LOVA",
decimals: 12,
ed: "1",
toRaw: () => new BN(50000028),
},
DAMN: {
name: "DAMN",
symbol: "DAMN",
decimals: 12,
ed: "1",
toRaw: () => new BN(22222012),
},
};

export const assetHubKusamaTokensConfig: Record<string, ExtendedToken> = {
Expand Down

0 comments on commit 601180a

Please sign in to comment.