-
Notifications
You must be signed in to change notification settings - Fork 173
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
Showing
13 changed files
with
153 additions
and
78 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
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
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
37 changes: 37 additions & 0 deletions
37
packages/extension/src/providers/polkadot/networks/assethub/assethub-dot.ts
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,37 @@ | ||
import { NetworkNames } from "@enkryptcom/types"; | ||
import { toBN } from "web3-utils"; | ||
import { | ||
SubstrateNetwork, | ||
SubstrateNetworkOptions, | ||
} from "@/providers/polkadot/types/substrate-network"; | ||
import { subscanActivity } from "@/providers/polkadot/libs/activity-handlers"; | ||
import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; | ||
import assetHandler from "@/providers/polkadot/libs/asset-handler"; | ||
import assets from "./assets-dot"; | ||
import { toBase } from "@enkryptcom/utils"; | ||
|
||
const assetHubOptions: SubstrateNetworkOptions = { | ||
name: NetworkNames.AssetHubDOT, | ||
name_long: "Asset Hub | Polkadot", | ||
homePage: "https://polkadot.network", | ||
blockExplorerTX: "https://assethub-polkadot.subscan.io/extrinsic/[[txHash]]", | ||
blockExplorerAddr: "https://assethub-polkadot.subscan.io/account/[[address]]", | ||
isTestNetwork: false, | ||
currencyName: "DOT", | ||
currencyNameLong: "Polkadot", | ||
icon: require("../icons/assethub.png"), | ||
decimals: 10, | ||
prefix: 0, | ||
node: "wss://statemint-rpc.dwellir.com/", | ||
coingeckoID: "polkadot", | ||
genesisHash: | ||
"0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f", | ||
activityHandler: wrapActivityHandler(subscanActivity), | ||
existentialDeposit: toBN(toBase("0.01", 10)), | ||
assetHandler, | ||
knownTokens: assets, | ||
}; | ||
|
||
const assetHub = new SubstrateNetwork(assetHubOptions); | ||
|
||
export default assetHub; |
37 changes: 37 additions & 0 deletions
37
packages/extension/src/providers/polkadot/networks/assethub/assethub-ksm.ts
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,37 @@ | ||
import { NetworkNames } from "@enkryptcom/types"; | ||
import { toBN } from "web3-utils"; | ||
import { | ||
SubstrateNetwork, | ||
SubstrateNetworkOptions, | ||
} from "@/providers/polkadot/types/substrate-network"; | ||
import { subscanActivity } from "@/providers/polkadot/libs/activity-handlers"; | ||
import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; | ||
import assetHandler from "@/providers/polkadot/libs/asset-handler"; | ||
import assets from "./assets-ksm"; | ||
import { toBase } from "@enkryptcom/utils"; | ||
|
||
const assetHubOptions: SubstrateNetworkOptions = { | ||
name: NetworkNames.AssetHubKSM, | ||
name_long: "Asset Hub | Kusama", | ||
homePage: "https://kusama.network/", | ||
blockExplorerTX: "https://assethub-kusama.subscan.io/extrinsic/[[txHash]]", | ||
blockExplorerAddr: "https://assethub-kusama.subscan.io/account/[[address]]", | ||
isTestNetwork: false, | ||
currencyName: "KSM", | ||
currencyNameLong: "Kusama", | ||
icon: require("../icons/assethub.png"), | ||
decimals: 12, | ||
prefix: 2, | ||
node: "wss://kusama-asset-hub-rpc.polkadot.io/", | ||
coingeckoID: "kusama", | ||
genesisHash: | ||
"0x48239ef607d7928874027a43a67689209727dfb3d3dc5e5b03a39bdc2eda771a", | ||
activityHandler: wrapActivityHandler(subscanActivity), | ||
existentialDeposit: toBN(toBase("0.000003333333", 12)), | ||
assetHandler, | ||
knownTokens: assets, | ||
}; | ||
|
||
const assetHub = new SubstrateNetwork(assetHubOptions); | ||
|
||
export default assetHub; |
26 changes: 26 additions & 0 deletions
26
packages/extension/src/providers/polkadot/networks/assethub/assets-dot.ts
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,26 @@ | ||
import { KnownTokenDisplay } from "@/providers/polkadot/types"; | ||
|
||
const assets: KnownTokenDisplay[] = [ | ||
{ | ||
name: "USD Coin", | ||
symbol: "USDC", | ||
coingeckoID: "usd-coin", | ||
icon: require("./icons/usdc.png"), | ||
id: "1337", | ||
}, | ||
{ | ||
name: "Tether USD", | ||
symbol: "USDt", | ||
coingeckoID: "tether", | ||
icon: require("./icons/usdt.png"), | ||
id: "1984", | ||
}, | ||
{ | ||
name: "DOT is Dead", | ||
symbol: "DED", | ||
icon: require("./icons/ded.png"), | ||
id: "30", | ||
}, | ||
]; | ||
|
||
export default assets; |
20 changes: 20 additions & 0 deletions
20
packages/extension/src/providers/polkadot/networks/assethub/assets-ksm.ts
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,20 @@ | ||
import { KnownTokenDisplay } from "@/providers/polkadot/types"; | ||
|
||
const assets: KnownTokenDisplay[] = [ | ||
{ | ||
name: "RMRK.app", | ||
symbol: "RMRK", | ||
coingeckoID: "rmrk", | ||
icon: require("./icons/rmrk.png"), | ||
id: "8", | ||
}, | ||
{ | ||
name: "Tether USD", | ||
symbol: "USDt", | ||
coingeckoID: "tether", | ||
icon: require("./icons/usdt.png"), | ||
id: "1984", | ||
}, | ||
]; | ||
|
||
export default assets; |
29 changes: 0 additions & 29 deletions
29
packages/extension/src/providers/polkadot/networks/assethub/assets.ts
This file was deleted.
Oops, something went wrong.
Binary file added
BIN
+9.88 KB
packages/extension/src/providers/polkadot/networks/assethub/icons/rmrk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 3 additions & 34 deletions
37
packages/extension/src/providers/polkadot/networks/assethub/index.ts
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 |
---|---|---|
@@ -1,35 +1,4 @@ | ||
import { NetworkNames } from "@enkryptcom/types"; | ||
import { toBN } from "web3-utils"; | ||
import { | ||
SubstrateNetwork, | ||
SubstrateNetworkOptions, | ||
} from "@/providers/polkadot/types/substrate-network"; | ||
import { subscanActivity } from "@/providers/polkadot/libs/activity-handlers"; | ||
import wrapActivityHandler from "@/libs/activity-state/wrap-activity-handler"; | ||
import assetHandler from "@/providers/polkadot/libs/asset-handler"; | ||
import assethubDOT from "./assethub-dot"; | ||
import assethubKSM from "./assethub-ksm"; | ||
|
||
const assetHubOptions: SubstrateNetworkOptions = { | ||
name: NetworkNames.AssetHub, | ||
name_long: "Asset Hub", | ||
homePage: "https://polkadot.network", | ||
blockExplorerTX: "https://assethub-polkadot.subscan.io/extrinsic/[[txHash]]", | ||
blockExplorerAddr: "https://assethub-polkadot.subscan.io/account/[[address]]", | ||
isTestNetwork: false, | ||
currencyName: "DOT", | ||
currencyNameLong: "Polkadot", | ||
icon: require("../icons/assethub.png"), | ||
decimals: 10, | ||
prefix: 0, | ||
node: "wss://statemint-rpc.dwellir.com/", | ||
coingeckoID: "polkadot", | ||
genesisHash: | ||
"0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f", | ||
activityHandler: wrapActivityHandler(subscanActivity), | ||
existentialDeposit: toBN("10000000000"), | ||
assetHandler, | ||
knownTokens: [], | ||
}; | ||
|
||
const assetHub = new SubstrateNetwork(assetHubOptions); | ||
|
||
export default assetHub; | ||
export { assethubDOT, assethubKSM }; |
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
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
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
c2bc3e2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Virus total analysis
chrome:
https://www.virustotal.com/gui/file/ed0c5b1617dd43a18709409e4d5a44835ad7da26d89beff37d69d00d64da48cc
firefox:
https://www.virustotal.com/gui/file/9807debc86d55bb31c07b2f1e6d96c748eff335a52ce5e140dac292457252727