@ledgerhq/cryptoassets 13.14.1-nightly.0 → 13.15.0-nightly.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +12 -0
  3. package/lib/crypto-assets-importer/importers/apt/aptos.test.d.ts +2 -0
  4. package/lib/crypto-assets-importer/importers/apt/aptos.test.d.ts.map +1 -0
  5. package/lib/crypto-assets-importer/importers/apt/aptos.test.js +69 -0
  6. package/lib/crypto-assets-importer/importers/apt/aptos.test.js.map +1 -0
  7. package/lib/crypto-assets-importer/importers/apt/index.d.ts +2 -0
  8. package/lib/crypto-assets-importer/importers/apt/index.d.ts.map +1 -0
  9. package/lib/crypto-assets-importer/importers/apt/index.js +50 -0
  10. package/lib/crypto-assets-importer/importers/apt/index.js.map +1 -0
  11. package/lib/crypto-assets-importer/index.js +3 -0
  12. package/lib/crypto-assets-importer/index.js.map +1 -1
  13. package/lib/currencies.d.ts.map +1 -1
  14. package/lib/currencies.js +38 -180
  15. package/lib/currencies.js.map +1 -1
  16. package/lib/data/apt_coin-hash.json +1 -0
  17. package/lib/data/apt_coin.d.ts +12 -0
  18. package/lib/data/apt_coin.d.ts.map +1 -0
  19. package/lib/data/apt_coin.js +11 -0
  20. package/lib/data/apt_coin.js.map +1 -0
  21. package/lib/data/apt_coin.json +1 -0
  22. package/lib/data/apt_fungible_asset-hash.json +1 -0
  23. package/lib/data/apt_fungible_asset.d.ts +12 -0
  24. package/lib/data/apt_fungible_asset.d.ts.map +1 -0
  25. package/lib/data/apt_fungible_asset.js +11 -0
  26. package/lib/data/apt_fungible_asset.js.map +1 -0
  27. package/lib/data/apt_fungible_asset.json +1 -0
  28. package/lib/tokens.d.ts.map +1 -1
  29. package/lib/tokens.js +33 -1
  30. package/lib/tokens.js.map +1 -1
  31. package/lib-es/crypto-assets-importer/importers/apt/aptos.test.d.ts +2 -0
  32. package/lib-es/crypto-assets-importer/importers/apt/aptos.test.d.ts.map +1 -0
  33. package/lib-es/crypto-assets-importer/importers/apt/aptos.test.js +64 -0
  34. package/lib-es/crypto-assets-importer/importers/apt/aptos.test.js.map +1 -0
  35. package/lib-es/crypto-assets-importer/importers/apt/index.d.ts +2 -0
  36. package/lib-es/crypto-assets-importer/importers/apt/index.d.ts.map +1 -0
  37. package/lib-es/crypto-assets-importer/importers/apt/index.js +43 -0
  38. package/lib-es/crypto-assets-importer/importers/apt/index.js.map +1 -0
  39. package/lib-es/crypto-assets-importer/index.js +3 -0
  40. package/lib-es/crypto-assets-importer/index.js.map +1 -1
  41. package/lib-es/currencies.d.ts.map +1 -1
  42. package/lib-es/currencies.js +39 -181
  43. package/lib-es/currencies.js.map +1 -1
  44. package/lib-es/data/apt_coin-hash.json +1 -0
  45. package/lib-es/data/apt_coin.d.ts +12 -0
  46. package/lib-es/data/apt_coin.d.ts.map +1 -0
  47. package/lib-es/data/apt_coin.js +4 -0
  48. package/lib-es/data/apt_coin.js.map +1 -0
  49. package/lib-es/data/apt_coin.json +1 -0
  50. package/lib-es/data/apt_fungible_asset-hash.json +1 -0
  51. package/lib-es/data/apt_fungible_asset.d.ts +12 -0
  52. package/lib-es/data/apt_fungible_asset.d.ts.map +1 -0
  53. package/lib-es/data/apt_fungible_asset.js +4 -0
  54. package/lib-es/data/apt_fungible_asset.js.map +1 -0
  55. package/lib-es/data/apt_fungible_asset.json +1 -0
  56. package/lib-es/tokens.d.ts.map +1 -1
  57. package/lib-es/tokens.js +33 -1
  58. package/lib-es/tokens.js.map +1 -1
  59. package/package.json +1 -1
  60. package/src/__snapshots__/currencies.test.ts.snap +1 -0
  61. package/src/crypto-assets-importer/importers/apt/aptos.test.ts +80 -0
  62. package/src/crypto-assets-importer/importers/apt/index.ts +61 -0
  63. package/src/crypto-assets-importer/index.ts +3 -0
  64. package/src/currencies.ts +46 -181
  65. package/src/data/apt_coin-hash.json +1 -0
  66. package/src/data/apt_coin.json +1 -0
  67. package/src/data/apt_coin.ts +14 -0
  68. package/src/data/apt_fungible_asset-hash.json +1 -0
  69. package/src/data/apt_fungible_asset.json +1 -0
  70. package/src/data/apt_fungible_asset.ts +14 -0
  71. package/src/tokens.ts +38 -1
@@ -3,6 +3,7 @@
3
3
  exports[`all USDT are countervalue enabled 1`] = `
4
4
  [
5
5
  "algorand/asa/312769",
6
+ "aptos/fungible_asset/tether_usd_0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b",
6
7
  "bsc/bep20/binance-peg_bsc-usd",
7
8
  "bsc/bep20/tether_usd_wormhole_0x524bc91dc82d6b90ef29f76a3ecaabafffd490bc",
8
9
  "ethereum/erc20/usd_tether__erc20_",
@@ -0,0 +1,80 @@
1
+ import axios from "axios";
2
+ import { importAptosTokens } from ".";
3
+ import fs from "fs";
4
+
5
+ const aptosTokens = [
6
+ {
7
+ id: "aptos/coin/aptos_coin_0x1::aptos_coin::aptoscoin",
8
+ ticker: "APT",
9
+ name: "Aptos Coin",
10
+ contract_address: "0x1::aptos_coin::AptosCoin",
11
+ decimals: 8,
12
+ delisted: false,
13
+ },
14
+ ];
15
+
16
+ const mockedAxios = jest.spyOn(axios, "get");
17
+
18
+ describe("import APT tokens", () => {
19
+ beforeEach(() => {
20
+ mockedAxios.mockImplementation(() =>
21
+ Promise.resolve({
22
+ data: aptosTokens,
23
+ headers: { ["etag"]: "commitHash" },
24
+ }),
25
+ );
26
+ });
27
+
28
+ afterEach(() => {
29
+ jest.clearAllMocks();
30
+ });
31
+
32
+ it("should output the file in the correct format", async () => {
33
+ const expectedFile = `export type AptosToken = [
34
+ string, // id
35
+ string, // ticker
36
+ string, // name
37
+ string, // contractAddress
38
+ number, // decimals
39
+ boolean?, // delisted
40
+ ];
41
+
42
+ import tokens from "./apt_coin.json";
43
+
44
+ export { default as hash } from "./apt_coin-hash.json";
45
+
46
+ export default tokens as AptosToken[];
47
+ `;
48
+
49
+ const mockedFs = (fs.writeFileSync = jest.fn());
50
+
51
+ await importAptosTokens(".", "coin");
52
+
53
+ expect(mockedAxios).toHaveBeenCalledWith(
54
+ "https://crypto-assets-service.api.ledger.com/v1/tokens",
55
+ {
56
+ params: {
57
+ blockchain_name: "aptos",
58
+ standard: "coin",
59
+ output: "id,ticker,name,contract_address,decimals,delisted",
60
+ },
61
+ },
62
+ );
63
+ expect(mockedFs).toHaveBeenNthCalledWith(
64
+ 1,
65
+ "apt_coin.json",
66
+ JSON.stringify([
67
+ [
68
+ "aptos/coin/aptos_coin_0x1::aptos_coin::aptoscoin",
69
+ "APT",
70
+ "Aptos Coin",
71
+ "0x1::aptos_coin::AptosCoin",
72
+ 8,
73
+ false,
74
+ ],
75
+ ]),
76
+ );
77
+ expect(mockedFs).toHaveBeenNthCalledWith(2, "apt_coin-hash.json", JSON.stringify("commitHash"));
78
+ expect(mockedFs).toHaveBeenNthCalledWith(3, "apt_coin.ts", expectedFile);
79
+ });
80
+ });
@@ -0,0 +1,61 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+ import { fetchTokensFromCALService } from "../../fetch";
4
+
5
+ type AptosToken = [
6
+ string, // id
7
+ string, // ticker
8
+ string, // name
9
+ string, // contractAddress
10
+ number, // decimals
11
+ boolean?, // delisted
12
+ ];
13
+
14
+ export const importAptosTokens = async (outputDir: string, standard: string) => {
15
+ try {
16
+ console.log(`importing aptos ${standard} tokens...`);
17
+ const { tokens, hash } = await fetchTokensFromCALService(
18
+ { blockchain_name: "aptos", standard: standard },
19
+ ["id", "ticker", "name", "contract_address", "decimals", "delisted"],
20
+ );
21
+ const aptosTokens: AptosToken[] = tokens.map(token => [
22
+ token.id,
23
+ token.ticker,
24
+ token.name,
25
+ token.contract_address,
26
+ token.decimals,
27
+ token.delisted,
28
+ ]);
29
+
30
+ const filePath = path.join(outputDir, `apt_${standard}`);
31
+ const aptosTypeStringified = `export type AptosToken = [
32
+ string, // id
33
+ string, // ticker
34
+ string, // name
35
+ string, // contractAddress
36
+ number, // decimals
37
+ boolean?, // delisted
38
+ ];`;
39
+
40
+ fs.writeFileSync(`${filePath}.json`, JSON.stringify(aptosTokens));
41
+ if (hash) {
42
+ fs.writeFileSync(`${filePath}-hash.json`, JSON.stringify(hash));
43
+ }
44
+
45
+ fs.writeFileSync(
46
+ `${filePath}.ts`,
47
+ `${aptosTypeStringified}
48
+
49
+ import tokens from "./apt_${standard}.json";
50
+
51
+ ${hash ? `export { default as hash } from "./apt_${standard}-hash.json";` : ""}
52
+
53
+ export default tokens as AptosToken[];
54
+ `,
55
+ );
56
+
57
+ console.log(`importing aptos ${standard} tokens success`);
58
+ } catch (err) {
59
+ console.error(err);
60
+ }
61
+ };
@@ -12,6 +12,7 @@ import { importTonJettonTokens } from "./importers/ton";
12
12
  import { importTRC10Tokens } from "./importers/trc10";
13
13
  import { importTRC20Tokens } from "./importers/trc20";
14
14
  import { importVip180Tokens } from "./importers/vip180";
15
+ import { importAptosTokens } from "./importers/apt";
15
16
 
16
17
  import { importBEP20Exchange } from "./exchange/bep20";
17
18
  import { importCoinsExchange } from "./exchange/coins";
@@ -36,6 +37,8 @@ const importTokens = async () => {
36
37
  importFilecoinERC20Tokens(outputFolder),
37
38
  importTonJettonTokens(outputFolder),
38
39
  importVip180Tokens(outputFolder),
40
+ importAptosTokens(outputFolder, "coin"),
41
+ importAptosTokens(outputFolder, "fungible_asset"),
39
42
  ];
40
43
 
41
44
  await Promise.allSettled(promises);
package/src/currencies.ts CHANGED
@@ -21,7 +21,26 @@
21
21
  * if bitcoin family, supportsSegwit defines if it supports segwit.
22
22
  */
23
23
 
24
- import { CoinType, CryptoCurrency, CryptoCurrencyId, Unit } from "@ledgerhq/types-cryptoassets";
24
+ import {
25
+ CoinType,
26
+ CryptoCurrency,
27
+ CryptoCurrencyId,
28
+ ExplorerView,
29
+ Unit,
30
+ } from "@ledgerhq/types-cryptoassets";
31
+
32
+ /**
33
+ * Make an ExplorerView for a Blockscout based explorer
34
+ * @private
35
+ * @param baseURL The explorer base URL. It MUST be properly formatted with no trailing slash. No checks are performed.
36
+ */
37
+ function blockscoutExplorerView(baseURL: string) {
38
+ return {
39
+ tx: `${baseURL}/tx/$hash`,
40
+ address: `${baseURL}/address/$address`,
41
+ token: `${baseURL}/address/$address?tab=token_transfer&token=$contractAddress`,
42
+ } satisfies ExplorerView;
43
+ }
25
44
 
26
45
  const makeTestnetUnit = u => ({ ...u, code: `𝚝${u.code}` });
27
46
 
@@ -3595,13 +3614,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3595
3614
  ethereumLikeInfo: {
3596
3615
  chainId: 42161,
3597
3616
  },
3598
- explorerViews: [
3599
- {
3600
- tx: "https://arbiscan.io/tx/$hash",
3601
- address: "https://arbiscan.io/address/$address",
3602
- token: "https://arbiscan.io/token/$contractAddress?a=$address",
3603
- },
3604
- ],
3617
+ explorerViews: [blockscoutExplorerView("https://arbitrum.blockscout.com")],
3605
3618
  },
3606
3619
  arbitrum_sepolia: {
3607
3620
  type: "CryptoCurrency",
@@ -3620,13 +3633,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3620
3633
  ethereumLikeInfo: {
3621
3634
  chainId: 421614,
3622
3635
  },
3623
- explorerViews: [
3624
- {
3625
- tx: "https://sepolia.arbiscan.io/tx/$hash",
3626
- address: "https://sepolia.arbiscan.io/address/$address",
3627
- token: "https://sepolia.arbiscan.io/token/$contractAddress?a=$address",
3628
- },
3629
- ],
3636
+ explorerViews: [blockscoutExplorerView("https://arbitrum-sepolia.blockscout.com")],
3630
3637
  },
3631
3638
  // Cronos EVM blockchain
3632
3639
  cronos: {
@@ -3649,13 +3656,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3649
3656
  magnitude: 18,
3650
3657
  },
3651
3658
  ],
3652
- explorerViews: [
3653
- {
3654
- tx: "https://cronoscan.com/tx/$hash",
3655
- address: "https://cronoscan.com/address/$address",
3656
- token: "https://cronoscan.com/token/$contractAddress?a=$address",
3657
- },
3658
- ],
3659
+ explorerViews: [blockscoutExplorerView("https://cronos.org/explorer")],
3659
3660
  },
3660
3661
  fantom: {
3661
3662
  type: "CryptoCurrency",
@@ -3693,12 +3694,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3693
3694
  chainId: 14,
3694
3695
  },
3695
3696
  units: ethereumUnits("FLR", "FLR"),
3696
- explorerViews: [
3697
- {
3698
- tx: "https://flare-explorer.flare.network/tx/$hash/internal-transactions",
3699
- address: "https://flare-explorer.flare.network/address/$address/transactions",
3700
- },
3701
- ],
3697
+ explorerViews: [blockscoutExplorerView("https://flare-explorer.flare.network")],
3702
3698
  },
3703
3699
  songbird: {
3704
3700
  type: "CryptoCurrency",
@@ -3714,12 +3710,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3714
3710
  chainId: 19,
3715
3711
  },
3716
3712
  units: ethereumUnits("SGB", "SGB"),
3717
- explorerViews: [
3718
- {
3719
- tx: "https://songbird-explorer.flare.network/tx/$hash/internal-transactions",
3720
- address: "https://songbird-explorer.flare.network/address/$address/transactions",
3721
- },
3722
- ],
3713
+ explorerViews: [blockscoutExplorerView("https://songbird-explorer.flare.network")],
3723
3714
  },
3724
3715
  moonbeam: {
3725
3716
  type: "CryptoCurrency",
@@ -3763,13 +3754,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3763
3754
  ethereumLikeInfo: {
3764
3755
  chainId: 30,
3765
3756
  },
3766
- explorerViews: [
3767
- {
3768
- tx: "https://explorer.rootstock.io/tx/$hash",
3769
- address: "https://explorer.rootstock.io/address/$address",
3770
- token: "https://explorer.rootstock.io/address/$address",
3771
- },
3772
- ],
3757
+ explorerViews: [blockscoutExplorerView("https://rootstock.blockscout.com")],
3773
3758
  },
3774
3759
  bittorrent: {
3775
3760
  type: "CryptoCurrency",
@@ -3807,13 +3792,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3807
3792
  ethereumLikeInfo: {
3808
3793
  chainId: 10,
3809
3794
  },
3810
- explorerViews: [
3811
- {
3812
- tx: "https://optimistic.etherscan.io/tx/$hash",
3813
- address: "https://optimistic.etherscan.io/address/$address",
3814
- token: "https://optimistic.etherscan.io/token/$contractAddress?a=$address",
3815
- },
3816
- ],
3795
+ explorerViews: [blockscoutExplorerView("https://optimism.blockscout.com")],
3817
3796
  keywords: ["optimism"],
3818
3797
  },
3819
3798
  optimism_sepolia: {
@@ -3831,13 +3810,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3831
3810
  ethereumLikeInfo: {
3832
3811
  chainId: 11155420,
3833
3812
  },
3834
- explorerViews: [
3835
- {
3836
- tx: "https://sepolia-optimism.etherscan.io/tx/$hash",
3837
- address: "https://sepolia-optimism.etherscan.io/address/$address",
3838
- token: "https://sepolia-optimism.etherscan.io/token/$contractAddress?a=$address",
3839
- },
3840
- ],
3813
+ explorerViews: [blockscoutExplorerView("https://optimism-sepolia.blockscout.com")],
3841
3814
  },
3842
3815
  energy_web: {
3843
3816
  type: "CryptoCurrency",
@@ -3853,13 +3826,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3853
3826
  ethereumLikeInfo: {
3854
3827
  chainId: 246,
3855
3828
  },
3856
- explorerViews: [
3857
- {
3858
- tx: "https://explorer.energyweb.org/tx/$hash",
3859
- address: "https://explorer.energyweb.org/address/$address",
3860
- token: "https://explorer.energyweb.org/token/$contractAddress?a=$address",
3861
- },
3862
- ],
3829
+ explorerViews: [blockscoutExplorerView("https://explorer.energyweb.org")],
3863
3830
  },
3864
3831
  astar: {
3865
3832
  type: "CryptoCurrency",
@@ -3875,13 +3842,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3875
3842
  ethereumLikeInfo: {
3876
3843
  chainId: 592,
3877
3844
  },
3878
- explorerViews: [
3879
- {
3880
- tx: "https://blockscout.com/astar/tx/$hash",
3881
- address: "https://blockscout.com/astar/address/$address",
3882
- token: "https://blockscout.com/astar/token/$contractAddress?a=$address",
3883
- },
3884
- ],
3845
+ explorerViews: [blockscoutExplorerView("https://astar.blockscout.com")],
3885
3846
  },
3886
3847
  metis: {
3887
3848
  type: "CryptoCurrency",
@@ -3897,13 +3858,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3897
3858
  ethereumLikeInfo: {
3898
3859
  chainId: 1088,
3899
3860
  },
3900
- explorerViews: [
3901
- {
3902
- tx: "https://andromeda-explorer.metis.io/tx/$hash",
3903
- address: "https://andromeda-explorer.metis.io/address/$address",
3904
- token: "https://andromeda-explorer.metis.io/token/$contractAddress?a=$address",
3905
- },
3906
- ],
3861
+ explorerViews: [blockscoutExplorerView("https://andromeda-explorer.metis.io")],
3907
3862
  },
3908
3863
  boba: {
3909
3864
  type: "CryptoCurrency",
@@ -3963,13 +3918,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3963
3918
  ethereumLikeInfo: {
3964
3919
  chainId: 106,
3965
3920
  },
3966
- explorerViews: [
3967
- {
3968
- tx: "https://evmexplorer.velas.com/tx/$hash",
3969
- address: "https://evmexplorer.velas.com/address/$address",
3970
- token: "https://evmexplorer.velas.com/token/$contractAddress?a=$address",
3971
- },
3972
- ],
3921
+ explorerViews: [blockscoutExplorerView("https://evmexplorer.velas.com")],
3973
3922
  },
3974
3923
  syscoin: {
3975
3924
  type: "CryptoCurrency",
@@ -3985,13 +3934,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
3985
3934
  ethereumLikeInfo: {
3986
3935
  chainId: 57,
3987
3936
  },
3988
- explorerViews: [
3989
- {
3990
- tx: "https://explorer.syscoin.org/tx/$hash",
3991
- address: "https://explorer.syscoin.org/address/$address",
3992
- token: "https://explorer.syscoin.org/token/$contractAddress?a=$address",
3993
- },
3994
- ],
3937
+ explorerViews: [blockscoutExplorerView("https://explorer.syscoin.org")],
3995
3938
  },
3996
3939
  telos_evm: {
3997
3940
  type: "CryptoCurrency",
@@ -4029,13 +3972,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4029
3972
  ethereumLikeInfo: {
4030
3973
  chainId: 1101,
4031
3974
  },
4032
- explorerViews: [
4033
- {
4034
- tx: "https://zkevm.polygonscan.com/tx/$hash",
4035
- address: "https://zkevm.polygonscan.com/address/$address",
4036
- token: "https://zkevm.polygonscan.com/token/$contractAddress?a=$address",
4037
- },
4038
- ],
3975
+ explorerViews: [blockscoutExplorerView("https://zkevm.blockscout.com")],
4039
3976
  },
4040
3977
  polygon_zk_evm_testnet: {
4041
3978
  type: "CryptoCurrency",
@@ -4054,13 +3991,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4054
3991
  ethereumLikeInfo: {
4055
3992
  chainId: 1442,
4056
3993
  },
4057
- explorerViews: [
4058
- {
4059
- tx: "https://testnet-zkevm.polygonscan.com/tx/$hash",
4060
- address: "https://testnet-zkevm.polygonscan.com/address/$address",
4061
- token: "https://testnet-zkevm.polygonscan.com/token/$contractAddress?a=$address",
4062
- },
4063
- ],
3994
+ explorerViews: [blockscoutExplorerView("https://explorer-ui.cardona.zkevm-rpc.com")],
4064
3995
  },
4065
3996
  base: {
4066
3997
  type: "CryptoCurrency",
@@ -4076,13 +4007,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4076
4007
  ethereumLikeInfo: {
4077
4008
  chainId: 8453,
4078
4009
  },
4079
- explorerViews: [
4080
- {
4081
- tx: "https://basescan.org/tx/$hash",
4082
- address: "https://basescan.org/address/$address",
4083
- token: "https://basescan.org/token/$contractAddress?a=$address",
4084
- },
4085
- ],
4010
+ explorerViews: [blockscoutExplorerView("https://base.blockscout.com")],
4086
4011
  },
4087
4012
  base_sepolia: {
4088
4013
  type: "CryptoCurrency",
@@ -4101,13 +4026,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4101
4026
  ethereumLikeInfo: {
4102
4027
  chainId: 84532,
4103
4028
  },
4104
- explorerViews: [
4105
- {
4106
- tx: "https://sepolia.basescan.org/tx/$hash",
4107
- address: "https://sepolia.basescan.org/address/$address",
4108
- token: "https://sepolia.basescan.org/token/$contractAddress?a=$address",
4109
- },
4110
- ],
4029
+ explorerViews: [blockscoutExplorerView("https://base-sepolia.blockscout.com")],
4111
4030
  },
4112
4031
  klaytn: {
4113
4032
  type: "CryptoCurrency",
@@ -4145,13 +4064,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4145
4064
  ethereumLikeInfo: {
4146
4065
  chainId: 245022934,
4147
4066
  },
4148
- explorerViews: [
4149
- {
4150
- tx: "https://neonscan.org/tx/$hash",
4151
- address: "https://neonscan.org/address/$address",
4152
- token: "https://neonscan.org/token/$address",
4153
- },
4154
- ],
4067
+ explorerViews: [blockscoutExplorerView("https://neon.blockscout.com")],
4155
4068
  },
4156
4069
  lukso: {
4157
4070
  type: "CryptoCurrency",
@@ -4168,13 +4081,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4168
4081
  ethereumLikeInfo: {
4169
4082
  chainId: 42,
4170
4083
  },
4171
- explorerViews: [
4172
- {
4173
- tx: "https://explorer.execution.mainnet.lukso.network/tx/$hash",
4174
- address: "https://explorer.execution.mainnet.lukso.network/address/$address",
4175
- token: "https://explorer.execution.mainnet.lukso.network/token/$address",
4176
- },
4177
- ],
4084
+ explorerViews: [blockscoutExplorerView("https://explorer.execution.mainnet.lukso.network")],
4178
4085
  },
4179
4086
  linea: {
4180
4087
  type: "CryptoCurrency",
@@ -4238,13 +4145,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4238
4145
  ethereumLikeInfo: {
4239
4146
  chainId: 81457,
4240
4147
  },
4241
- explorerViews: [
4242
- {
4243
- tx: "https://blastscan.io/tx/$hash",
4244
- address: "https://blastscan.io/address/$address",
4245
- token: "https://blastscan.io/token/$address",
4246
- },
4247
- ],
4148
+ explorerViews: [blockscoutExplorerView("https://blast.blockscout.com")],
4248
4149
  },
4249
4150
  blast_sepolia: {
4250
4151
  type: "CryptoCurrency",
@@ -4262,13 +4163,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4262
4163
  ethereumLikeInfo: {
4263
4164
  chainId: 168587773,
4264
4165
  },
4265
- explorerViews: [
4266
- {
4267
- tx: "https://testnet.blastscan.io/tx/$hash",
4268
- address: "https://testnet.blastscan.io/address/$address",
4269
- token: "https://testnet.blastscan.io/token/$address",
4270
- },
4271
- ],
4166
+ explorerViews: [blockscoutExplorerView("https://blast-testnet.blockscout.com")],
4272
4167
  },
4273
4168
  scroll: {
4274
4169
  type: "CryptoCurrency",
@@ -4285,13 +4180,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4285
4180
  ethereumLikeInfo: {
4286
4181
  chainId: 534352,
4287
4182
  },
4288
- explorerViews: [
4289
- {
4290
- tx: "https://scrollscan.com/tx/$hash",
4291
- address: "https://scrollscan.com/address/$address",
4292
- token: "https://scrollscan.com/token/$address",
4293
- },
4294
- ],
4183
+ explorerViews: [blockscoutExplorerView("https://scroll.blockscout.com")],
4295
4184
  },
4296
4185
  scroll_sepolia: {
4297
4186
  type: "CryptoCurrency",
@@ -4309,13 +4198,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4309
4198
  ethereumLikeInfo: {
4310
4199
  chainId: 534351,
4311
4200
  },
4312
- explorerViews: [
4313
- {
4314
- tx: "https://sepolia.scrollscan.dev/tx/$hash",
4315
- address: "https://sepolia.scrollscan.dev/address/$address",
4316
- token: "https://sepolia.scrollscan.dev/token/$address",
4317
- },
4318
- ],
4201
+ explorerViews: [blockscoutExplorerView("https://scroll-sepolia.blockscout.com")],
4319
4202
  },
4320
4203
  etherlink: {
4321
4204
  type: "CryptoCurrency",
@@ -4331,13 +4214,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4331
4214
  ethereumLikeInfo: {
4332
4215
  chainId: 42793,
4333
4216
  },
4334
- explorerViews: [
4335
- {
4336
- tx: "https://explorer.etherlink.com/tx/$hash",
4337
- address: "https://explorer.etherlink.com/address/$address",
4338
- token: "https://explorer.etherlink.com/token/$contractAddress?a=$address",
4339
- },
4340
- ],
4217
+ explorerViews: [blockscoutExplorerView("https://explorer.etherlink.com")],
4341
4218
  },
4342
4219
  zksync: {
4343
4220
  type: "CryptoCurrency",
@@ -4353,13 +4230,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4353
4230
  ethereumLikeInfo: {
4354
4231
  chainId: 324,
4355
4232
  },
4356
- explorerViews: [
4357
- {
4358
- tx: "https://explorer.zksync.io/tx/$hash",
4359
- address: "https://explorer.zksync.io/address/$address",
4360
- token: "https://explorer.zksync.io/token/$contractAddress?a=$address",
4361
- },
4362
- ],
4233
+ explorerViews: [blockscoutExplorerView("https://zksync.blockscout.com")],
4363
4234
  },
4364
4235
  zksync_sepolia: {
4365
4236
  type: "CryptoCurrency",
@@ -4375,13 +4246,7 @@ export const cryptocurrenciesById: Record<CryptoCurrencyId, CryptoCurrency> = {
4375
4246
  ethereumLikeInfo: {
4376
4247
  chainId: 300,
4377
4248
  },
4378
- explorerViews: [
4379
- {
4380
- tx: "https://sepolia-era.zksync.network/tx/$hash",
4381
- address: "https://sepolia-era.zksync.network/address/$address",
4382
- token: "https://sepolia-era.zksync.network/token/$contractAddress?a=$address",
4383
- },
4384
- ],
4249
+ explorerViews: [blockscoutExplorerView("https://zksync-sepolia.blockscout.com")],
4385
4250
  },
4386
4251
  // Keep it at the bottom
4387
4252
  // Tickers dup
@@ -0,0 +1 @@
1
+ "W/\"e4a56acb75ba5d15926afa258a722ff15ba400a3\""
@@ -0,0 +1 @@
1
+ [["aptos/coin/amnis_aptos_coin_0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::amapt_token::amnisapt","amAPT","Amnis Aptos Coin","0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::amapt_token::AmnisApt",8,false],["aptos/coin/animeswap_coin_0x16fe2df00ea7dde4a63409201f7f4e536bde7bb7335526a35d05111e68aa322c::animecoin::ani","ANI","AnimeSwap Coin","0x16fe2df00ea7dde4a63409201f7f4e536bde7bb7335526a35d05111e68aa322c::AnimeCoin::ANI",8,false],["aptos/coin/apartment_0x7b7bab2131de3e4f318b4abaa952f7c817b2c3df16c951caca809ac9ca9b650e::apartment::apartment","APARTMENT","Apartment","0x7b7bab2131de3e4f318b4abaa952f7c817b2c3df16c951caca809ac9ca9b650e::APARTMENT::APARTMENT",8,false],["aptos/coin/apetos_0xada35ada7e43e2ee1c39633ffccec38b76ce702b4efc2e60b50f63fbe4f710d8::apetos_token::apetoscoin","APE","APETOS","0xada35ada7e43e2ee1c39633ffccec38b76ce702b4efc2e60b50f63fbe4f710d8::apetos_token::ApetosCoin",8,false],["aptos/coin/aptos_fomo_0xf891d2e004973430cc2bbbee69f3d0f4adb9c7ae03137b4579f7bb9979283ee6::aptos_fomo::aptos_fomo","FOMO","APTOS FOMO","0xf891d2e004973430cc2bbbee69f3d0f4adb9c7ae03137b4579f7bb9979283ee6::APTOS_FOMO::APTOS_FOMO",6,false],["aptos/coin/aptos_launch_token_0xd0b4efb4be7c3508d9a26a9b5405cf9f860d0b9e5fe2f498b90e68b8d2cedd3e::aptos_launch_token::aptoslaunchtoken","ALT","Aptos Launch Token","0xd0b4efb4be7c3508d9a26a9b5405cf9f860d0b9e5fe2f498b90e68b8d2cedd3e::aptos_launch_token::AptosLaunchToken",8,false],["aptos/coin/blocto_token_0xfbab9fb68bd2103925317b6a540baa20087b1e7a7a4eb90badee04abb6b5a16f::blt::blt","BLT","Blocto Token","0xfbab9fb68bd2103925317b6a540baa20087b1e7a7a4eb90badee04abb6b5a16f::blt::Blt",8,false],["aptos/coin/bluemove_0x27fafcc4e39daac97556af8a803dbb52bcb03f0821898dc845ac54225b9793eb::move_coin::movecoin","MOVE","BlueMove","0x27fafcc4e39daac97556af8a803dbb52bcb03f0821898dc845ac54225b9793eb::move_coin::MoveCoin",8,false],["aptos/coin/bubbles_0xd6a49762f6e4f7401ee79be6f5d4111e70db1408966ba1aa204e6e10c9d437ca::bubbles::bubblescoin","BUBBLES","BUBBLES","0xd6a49762f6e4f7401ee79be6f5d4111e70db1408966ba1aa204e6e10c9d437ca::bubbles::BubblesCoin",8,false],["aptos/coin/doodoo_0x73eb84966be67e4697fc5ae75173ca6c35089e802650f75422ab49a8729704ec::coin::doodoo","doodoo","DooDoo","0x73eb84966be67e4697fc5ae75173ca6c35089e802650f75422ab49a8729704ec::coin::DooDoo",8,false],["aptos/coin/dstapt_0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5::staked_coin::stakedaptos","dstAPT","dstAPT","0xd11107bdf0d6d7040c6c0bfbdecb6545191fdf13e8d8d259952f53e1713f61b5::staked_coin::StakedAptos",8,false],["aptos/coin/gari_wormhole_0x4def3d3dee27308886f0a3611dd161ce34f977a9a5de4e80b237225923492a2a::coin::t","whGARI","Gari (Wormhole)","0x4def3d3dee27308886f0a3611dd161ce34f977a9a5de4e80b237225923492a2a::coin::T",8,false],["aptos/coin/gui_inu_0xe4ccb6d39136469f376242c31b34d10515c8eaaa38092f804db8e08a8f53c5b2::assets_v1::echocoin002","GUI","Gui Inu","0xe4ccb6d39136469f376242c31b34d10515c8eaaa38092f804db8e08a8f53c5b2::assets_v1::EchoCoin002",6,false],["aptos/coin/heart_0x7de3fea83cd5ca0e1def27c3f3803af619882db51f34abf30dd04ad12ee6af31::tapos::heart","HEART","HEART","0x7de3fea83cd5ca0e1def27c3f3803af619882db51f34abf30dd04ad12ee6af31::tapos::Heart",8,false],["aptos/coin/liquidswap_0x53a30a6e5936c0a4c5140daed34de39d17ca7fcae08f947c02e979cef98a3719::coin::lsd","LSD","Liquidswap","0x53a30a6e5936c0a4c5140daed34de39d17ca7fcae08f947c02e979cef98a3719::coin::LSD",8,false],["aptos/coin/mojito_0x881ac202b1f1e6ad4efcff7a1d0579411533f2502417a19211cfc49751ddb5f4::coin::mojo","MOJO","Mojito","0x881ac202b1f1e6ad4efcff7a1d0579411533f2502417a19211cfc49751ddb5f4::coin::MOJO",8,false],["aptos/coin/moo_moo_0xc5fbbcc4637aeebb4e732767abee8a21f2b0776f73b73e16ce13e7d31d6700da::moomoo::moomoo","MOOMOO","MOO MOO","0xc5fbbcc4637aeebb4e732767abee8a21f2b0776f73b73e16ce13e7d31d6700da::MOOMOO::MOOMOO",6,false],["aptos/coin/move_dollar_0x6f986d146e4a90b828d8c12c14b6f4e003fdff11a8eecceceb63744363eaac01::mod_coin::mod","MOD","Move Dollar","0x6f986d146e4a90b828d8c12c14b6f4e003fdff11a8eecceceb63744363eaac01::mod_coin::MOD",8,false],["aptos/coin/pancakeswap_token_0x159df6b7689437016108a019fd5bef736bac692b6d4a1f10c941f6fbb9a74ca6::oft::cakeoft","Cake","PancakeSwap Token","0x159df6b7689437016108a019fd5bef736bac692b6d4a1f10c941f6fbb9a74ca6::oft::CakeOFT",8,false],["aptos/coin/returd_0xdf3d5eb83df80dfde8ceb1edaa24d8dbc46da6a89ae134a858338e1b86a29e38::coin::returd","RETuRD","Returd","0xdf3d5eb83df80dfde8ceb1edaa24d8dbc46da6a89ae134a858338e1b86a29e38::coin::Returd",8,false],["aptos/coin/shrimp_0x55987edfab9a57f69bac759674f139ae473b5e09a9283848c1f87faf6fc1e789::shrimp::shrimpcoin","SHRIMP","SHRIMP","0x55987edfab9a57f69bac759674f139ae473b5e09a9283848c1f87faf6fc1e789::shrimp::ShrimpCoin",2,false],["aptos/coin/solana_wormhole_0xdd89c0e695df0692205912fb69fc290418bed0dbe6e4573d744a6d5e6bab6c13::coin::t","whSOL","Solana (Wormhole)","0xdd89c0e695df0692205912fb69fc290418bed0dbe6e4573d744a6d5e6bab6c13::coin::T",8,false],["aptos/coin/staked_aptos_coin_0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::stapt_token::stakedapt","stAPT","Staked Aptos Coin","0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::stapt_token::StakedApt",8,false],["aptos/coin/staked_thala_apt_0xfaf4e633ae9eb31366c9ca24214231760926576c7b625313b3688b5e900731f6::staking::stakedthalaapt","sthAPT","Staked Thala APT","0xfaf4e633ae9eb31366c9ca24214231760926576c7b625313b3688b5e900731f6::staking::StakedThalaAPT",8,false],["aptos/coin/tether_usd_celer_0x8d87a65ba30e09357fa2edea2c80dbac296e5dec2b18287113500b902942929d::celer_coin_manager::usdtcoin","ceUSDT","Tether USD (Celer)","0x8d87a65ba30e09357fa2edea2c80dbac296e5dec2b18287113500b902942929d::celer_coin_manager::UsdtCoin",6,false],["aptos/coin/tether_usd_layerzero_0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::usdt","lzUSDT","Tether USD (LayerZero)","0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDT",6,false],["aptos/coin/tether_usd_wormhole_0xa2eda21a58856fda86451436513b867c97eecb4ba099da5775520e0f7492e852::coin::t","whUSDT","Tether USD (Wormhole)","0xa2eda21a58856fda86451436513b867c97eecb4ba099da5775520e0f7492e852::coin::T",6,false],["aptos/coin/thala_apt_0xfaf4e633ae9eb31366c9ca24214231760926576c7b625313b3688b5e900731f6::staking::thalaapt","thAPT","Thala APT","0xfaf4e633ae9eb31366c9ca24214231760926576c7b625313b3688b5e900731f6::staking::ThalaAPT",8,false],["aptos/coin/thala_token_0x7fd500c11216f0fe3095d0c4b8aa4d64a4e2e04f83758462f2b127255643615::thl_coin::thl","THL","Thala Token","0x7fd500c11216f0fe3095d0c4b8aa4d64a4e2e04f83758462f2b127255643615::thl_coin::THL",8,false],["aptos/coin/the_loonies_0x268d4a7a2ad93274edf6116f9f20ad8455223a7ab5fc73154f687e7dbc3e3ec6::loon::loon","LOON","The Loonies","0x268d4a7a2ad93274edf6116f9f20ad8455223a7ab5fc73154f687e7dbc3e3ec6::LOON::LOON",6,false],["aptos/coin/token_in_0xc32ba5d293577cbb1df390f35b2bc6369a593b736d0865fedec1a2b08565de8e::in_coin::incoin","TIN","Token \"IN\"","0xc32ba5d293577cbb1df390f35b2bc6369a593b736d0865fedec1a2b08565de8e::in_coin::InCoin",8,false],["aptos/coin/tomarket_0x9d0595765a31f8d56e1d2aafc4d6c76f283c67a074ef8812d8c31bd8252ac2c3::asset::toma","TOMA","Tomarket","0x9d0595765a31f8d56e1d2aafc4d6c76f283c67a074ef8812d8c31bd8252ac2c3::asset::TOMA",6,false],["aptos/coin/tortuga_staked_apt_0x84d7aeef42d38a5ffc3ccef853e1b82e4958659d16a7de736a29c55fbbeb0114::staked_aptos_coin::stakedaptoscoin","tAPT","Tortuga Staked APT","0x84d7aeef42d38a5ffc3ccef853e1b82e4958659d16a7de736a29c55fbbeb0114::staked_aptos_coin::StakedAptosCoin",8,false],["aptos/coin/uptos_0x4fbed3f8a3fd8a11081c8b6392152a8b0cb14d70d0414586f0c9b858fcd2d6a7::uptos::uptos","UPTOS","UPTOS","0x4fbed3f8a3fd8a11081c8b6392152a8b0cb14d70d0414586f0c9b858fcd2d6a7::UPTOS::UPTOS",8,false],["aptos/coin/usd_coin_layerzero_0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::usdc","lzUSDC","USD Coin (LayerZero)","0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC",6,false],["aptos/coin/usd_coin_wormhole_0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea::coin::t","whUSDC","USD Coin (Wormhole)","0x5e156f1207d0ebfa19a9eeff00d62a282278fb8719f4fab3a586a0a2c0fffbea::coin::T",6,false],["aptos/coin/wrapped_bnb_celer_0x8d87a65ba30e09357fa2edea2c80dbac296e5dec2b18287113500b902942929d::celer_coin_manager::bnbcoin","ceWBNB","Wrapped BNB (Celer)","0x8d87a65ba30e09357fa2edea2c80dbac296e5dec2b18287113500b902942929d::celer_coin_manager::BnbCoin",8,false],["aptos/coin/wrapped_ether_layerzero_0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::weth","lzWETH","Wrapped Ether (LayerZero)","0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::WETH",6,false],["aptos/coin/wrapped_ether_wormhole_0xcc8a89c8dce9693d354449f1f73e60e14e347417854f029db5bc8e7454008abb::coin::t","whWETH","Wrapped Ether (Wormhole)","0xcc8a89c8dce9693d354449f1f73e60e14e347417854f029db5bc8e7454008abb::coin::T",8,false]]
@@ -0,0 +1,14 @@
1
+ export type AptosToken = [
2
+ string, // id
3
+ string, // ticker
4
+ string, // name
5
+ string, // contractAddress
6
+ number, // decimals
7
+ boolean?, // delisted
8
+ ];
9
+
10
+ import tokens from "./apt_coin.json";
11
+
12
+ export { default as hash } from "./apt_coin-hash.json";
13
+
14
+ export default tokens as AptosToken[];
@@ -0,0 +1 @@
1
+ "W/\"537ff2232fc063027f3a185574b6200c9972378a\""
@@ -0,0 +1 @@
1
+ [["aptos/fungible_asset/amaterasu_0xd0ab8c2f76cd640455db56ca758a9766a966c88f77920347aac1719edab1df5e","AMA","Amaterasu","0xd0ab8c2f76cd640455db56ca758a9766a966c88f77920347aac1719edab1df5e",8,false],["aptos/fungible_asset/cellana_0x2ebb2ccac5e027a87fa0e2e5f656a3a4238d6a48d93ec9b610d570fc0aa0df12","CELL","CELLANA","0x2ebb2ccac5e027a87fa0e2e5f656a3a4238d6a48d93ec9b610d570fc0aa0df12",8,false],["aptos/fungible_asset/mkl_0x878370592f9129e14b76558689a4b570ad22678111df775befbfcbc9fb3d90ab","MKL","MKL","0x878370592f9129e14b76558689a4b570ad22678111df775befbfcbc9fb3d90ab",6,false],["aptos/fungible_asset/tether_usd_0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b","USDT","Tether USD","0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b",6,false],["aptos/fungible_asset/truapt_coin_0xaef6a8c3182e076db72d64324617114cacf9a52f28325edc10b483f7f05da0e7","TruAPT","TruAPT coin","0xaef6a8c3182e076db72d64324617114cacf9a52f28325edc10b483f7f05da0e7",8,false],["aptos/fungible_asset/usdc_0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b","USDC","USDC","0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b",6,false]]
@@ -0,0 +1,14 @@
1
+ export type AptosToken = [
2
+ string, // id
3
+ string, // ticker
4
+ string, // name
5
+ string, // contractAddress
6
+ number, // decimals
7
+ boolean?, // delisted
8
+ ];
9
+
10
+ import tokens from "./apt_fungible_asset.json";
11
+
12
+ export { default as hash } from "./apt_fungible_asset-hash.json";
13
+
14
+ export default tokens as AptosToken[];