@tria-sdk/constants 1.0.18 → 1.0.20

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.
@@ -2,10 +2,14 @@ export declare const zkLink: string;
2
2
  export declare const zkLinkTestnet: string;
3
3
  export declare const bitlayerTestnet: string;
4
4
  export declare const neoxTestnet: string;
5
+ export declare const sepolia: string;
6
+ export declare const polygonAmoy: string;
5
7
  export type ZKLINK = "ZKLINK-NOVA";
6
8
  export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
7
9
  export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
8
10
  export type NEOX_TESTNET = "NEOX-TESTNET";
11
+ export type SEPOLIA = "SEPOLIA";
12
+ export type AMOY = "AMOY";
9
13
  export declare const TESTNET_CHAINS: string[];
10
14
  export declare const SUPPORTED_EVM_CHAINS: string[];
11
15
  export declare const AA_SUPPORTED_EVM_CHAINS: string[];
@@ -2,6 +2,8 @@ export const zkLink = "ZKLINK-NOVA";
2
2
  export const zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
3
3
  export const bitlayerTestnet = "BITLAYER-TESTNET";
4
4
  export const neoxTestnet = "NEOX-TESTNET";
5
+ export const sepolia = "SEPOLIA";
6
+ export const polygonAmoy = "AMOY";
5
7
  export const TESTNET_CHAINS = [
6
8
  "MUMBAI",
7
9
  "FUSESPARK",
@@ -11,6 +13,8 @@ export const TESTNET_CHAINS = [
11
13
  zkLinkTestnet,
12
14
  bitlayerTestnet,
13
15
  neoxTestnet,
16
+ sepolia,
17
+ polygonAmoy,
14
18
  ];
15
19
  export const SUPPORTED_EVM_CHAINS = [
16
20
  "ETH",
@@ -33,6 +37,8 @@ export const SUPPORTED_EVM_CHAINS = [
33
37
  zkLinkTestnet,
34
38
  bitlayerTestnet,
35
39
  neoxTestnet,
40
+ sepolia,
41
+ polygonAmoy,
36
42
  ];
37
43
  export const AA_SUPPORTED_EVM_CHAINS = [
38
44
  // "ETH",
@@ -44,6 +50,7 @@ export const AA_SUPPORTED_EVM_CHAINS = [
44
50
  "FUSE",
45
51
  "MUMBAI",
46
52
  // "MANTLE",
53
+ sepolia,
47
54
  ];
48
55
  export const ALLCHAINS = [
49
56
  "ETH",
@@ -67,6 +74,8 @@ export const ALLCHAINS = [
67
74
  zkLinkTestnet,
68
75
  bitlayerTestnet,
69
76
  neoxTestnet,
77
+ sepolia,
78
+ polygonAmoy,
70
79
  ];
71
80
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
72
81
  const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
@@ -76,6 +85,11 @@ export const networks = [
76
85
  logo: `${baseLogoUrl}/Ethereum.webp`,
77
86
  type: "mainnet",
78
87
  },
88
+ {
89
+ chainName: sepolia,
90
+ logo: `${baseLogoUrl}/Ethereum.webp`,
91
+ type: "testnet",
92
+ },
79
93
  {
80
94
  chainName: "FANTOM",
81
95
  logo: `${baseLogoUrl}/Fantom.webp`,
@@ -86,6 +100,11 @@ export const networks = [
86
100
  logo: `${baseLogoUrl}/Polygon.svg`,
87
101
  type: "mainnet",
88
102
  },
103
+ {
104
+ chainName: polygonAmoy,
105
+ logo: `${baseLogoUrl}/Polygon.svg`,
106
+ type: "testnet",
107
+ },
89
108
  {
90
109
  chainName: "AVALANCHE",
91
110
  logo: `${baseLogoUrl}/Avalanche.webp`,
@@ -183,8 +202,10 @@ export const networks = [
183
202
  ];
184
203
  export const chainNameToLogo = {
185
204
  ETH: `${baseLogoUrl}/Ethereum.webp`,
205
+ [sepolia]: `${baseLogoUrl}/Ethereum.webp`,
186
206
  FANTOM: `${baseLogoUrl}/Fantom.webp`,
187
207
  POLYGON: `${baseLogoUrl}/Polygon.webp`,
208
+ [polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
188
209
  AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
189
210
  OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
190
211
  ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
@@ -207,9 +228,11 @@ export const chainNameToLogo = {
207
228
  };
208
229
  export const chainNameToLogoBlack = {
209
230
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
231
+ [sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
210
232
  BINANCE: `${baseLogoUrlBlack}/binance.webp`,
211
233
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
212
234
  POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
235
+ [polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
213
236
  AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
214
237
  OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
215
238
  ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
package/dist/src/txn.d.ts CHANGED
@@ -172,6 +172,8 @@ export declare const chainNameToChainId: {
172
172
  };
173
173
  export declare const chainIdToChainName: {
174
174
  80001: string;
175
+ 80002: string;
176
+ 11155111: string;
175
177
  137: string;
176
178
  1: string;
177
179
  43114: string;
package/dist/src/txn.js CHANGED
@@ -1,7 +1,9 @@
1
- import { bitlayerTestnet, neoxTestnet, zkLink, zkLinkTestnet } from "./chains";
1
+ import { bitlayerTestnet, neoxTestnet, polygonAmoy, sepolia, zkLink, zkLinkTestnet, } from "./chains";
2
2
  export const explorerBaseUrls = {
3
3
  ETH: "https://etherscan.io",
4
+ [sepolia]: "https://sepolia.etherscan.io",
4
5
  POLYGON: "https://polygonscan.com",
6
+ [polygonAmoy]: "https://www.oklink.com/amoy",
5
7
  AVALANCHE: "https://snowtrace.io",
6
8
  ARBITRUM: "https://arbiscan.io",
7
9
  BINANCE: "https://bscscan.com",
@@ -27,7 +29,9 @@ export const explorerBaseUrls = {
27
29
  };
28
30
  export const txnBaseUrl = {
29
31
  ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
32
+ [sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
30
33
  POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
34
+ [polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
31
35
  AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
32
36
  ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
33
37
  BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
@@ -53,11 +57,21 @@ export const nativeTokenDetails = {
53
57
  symbol: "ETH",
54
58
  logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
55
59
  },
60
+ [sepolia]: {
61
+ name: "Ether",
62
+ symbol: "ETH",
63
+ logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
64
+ },
56
65
  POLYGON: {
57
66
  name: "Matic Token",
58
67
  symbol: "MATIC",
59
68
  logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
60
69
  },
70
+ [polygonAmoy]: {
71
+ name: "Matic Token",
72
+ symbol: "MATIC",
73
+ logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
74
+ },
61
75
  AVALANCHE: {
62
76
  name: "Avalanche Coin",
63
77
  symbol: "AVAX",
@@ -157,6 +171,8 @@ export const nativeTokenDetails = {
157
171
  const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
158
172
  export const rpcUrls = {
159
173
  MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
174
+ [polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
175
+ [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
160
176
  ETH: "https://eth.llamarpc.com",
161
177
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
162
178
  AVALANCHE: "https://avalanche-c-chain.publicnode.com",
@@ -179,6 +195,8 @@ export const rpcUrls = {
179
195
  };
180
196
  export const chainNameToChainId = {
181
197
  MUMBAI: 80001,
198
+ [polygonAmoy]: 80002,
199
+ [sepolia]: 11155111,
182
200
  POLYGON: 137,
183
201
  ETH: 1,
184
202
  AVALANCHE: 43114,
@@ -201,6 +219,8 @@ export const chainNameToChainId = {
201
219
  };
202
220
  export const chainIdToChainName = {
203
221
  80001: "MUMBAI",
222
+ 80002: polygonAmoy,
223
+ 11155111: sepolia,
204
224
  137: "POLYGON",
205
225
  1: "ETH",
206
226
  43114: "AVALANCHE",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tria-sdk/constants",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/chains.ts CHANGED
@@ -2,11 +2,15 @@ export const zkLink: string = "ZKLINK-NOVA";
2
2
  export const zkLinkTestnet: string = "ZKLINK-NOVA-TESTNET";
3
3
  export const bitlayerTestnet: string = "BITLAYER-TESTNET";
4
4
  export const neoxTestnet: string = "NEOX-TESTNET";
5
+ export const sepolia: string = "SEPOLIA";
6
+ export const polygonAmoy: string = "AMOY";
5
7
 
6
8
  export type ZKLINK = "ZKLINK-NOVA";
7
9
  export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
8
10
  export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
9
11
  export type NEOX_TESTNET = "NEOX-TESTNET";
12
+ export type SEPOLIA = "SEPOLIA";
13
+ export type AMOY = "AMOY";
10
14
 
11
15
  export const TESTNET_CHAINS = [
12
16
  "MUMBAI",
@@ -17,6 +21,8 @@ export const TESTNET_CHAINS = [
17
21
  zkLinkTestnet,
18
22
  bitlayerTestnet,
19
23
  neoxTestnet,
24
+ sepolia,
25
+ polygonAmoy,
20
26
  ];
21
27
 
22
28
  export const SUPPORTED_EVM_CHAINS = [
@@ -40,6 +46,8 @@ export const SUPPORTED_EVM_CHAINS = [
40
46
  zkLinkTestnet,
41
47
  bitlayerTestnet,
42
48
  neoxTestnet,
49
+ sepolia,
50
+ polygonAmoy,
43
51
  ];
44
52
 
45
53
  export const AA_SUPPORTED_EVM_CHAINS = [
@@ -52,6 +60,7 @@ export const AA_SUPPORTED_EVM_CHAINS = [
52
60
  "FUSE",
53
61
  "MUMBAI",
54
62
  // "MANTLE",
63
+ sepolia,
55
64
  ];
56
65
 
57
66
  export const ALLCHAINS = [
@@ -76,6 +85,8 @@ export const ALLCHAINS = [
76
85
  zkLinkTestnet,
77
86
  bitlayerTestnet,
78
87
  neoxTestnet,
88
+ sepolia,
89
+ polygonAmoy,
79
90
  ];
80
91
 
81
92
  const baseLogoUrl = "https://static.tria.so/chain-logo-w";
@@ -87,6 +98,11 @@ export const networks = [
87
98
  logo: `${baseLogoUrl}/Ethereum.webp`,
88
99
  type: "mainnet",
89
100
  },
101
+ {
102
+ chainName: sepolia,
103
+ logo: `${baseLogoUrl}/Ethereum.webp`,
104
+ type: "testnet",
105
+ },
90
106
  {
91
107
  chainName: "FANTOM",
92
108
  logo: `${baseLogoUrl}/Fantom.webp`,
@@ -97,6 +113,11 @@ export const networks = [
97
113
  logo: `${baseLogoUrl}/Polygon.svg`,
98
114
  type: "mainnet",
99
115
  },
116
+ {
117
+ chainName: polygonAmoy,
118
+ logo: `${baseLogoUrl}/Polygon.svg`,
119
+ type: "testnet",
120
+ },
100
121
  {
101
122
  chainName: "AVALANCHE",
102
123
  logo: `${baseLogoUrl}/Avalanche.webp`,
@@ -195,8 +216,10 @@ export const networks = [
195
216
 
196
217
  export const chainNameToLogo = {
197
218
  ETH: `${baseLogoUrl}/Ethereum.webp`,
219
+ [sepolia]: `${baseLogoUrl}/Ethereum.webp`,
198
220
  FANTOM: `${baseLogoUrl}/Fantom.webp`,
199
221
  POLYGON: `${baseLogoUrl}/Polygon.webp`,
222
+ [polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
200
223
  AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
201
224
  OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
202
225
  ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
@@ -220,9 +243,11 @@ export const chainNameToLogo = {
220
243
 
221
244
  export const chainNameToLogoBlack = {
222
245
  ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
246
+ [sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
223
247
  BINANCE: `${baseLogoUrlBlack}/binance.webp`,
224
248
  FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
225
249
  POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
250
+ [polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
226
251
  AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
227
252
  OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
228
253
  ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
package/src/txn.ts CHANGED
@@ -1,8 +1,17 @@
1
- import { bitlayerTestnet, neoxTestnet, zkLink, zkLinkTestnet } from "./chains";
1
+ import {
2
+ bitlayerTestnet,
3
+ neoxTestnet,
4
+ polygonAmoy,
5
+ sepolia,
6
+ zkLink,
7
+ zkLinkTestnet,
8
+ } from "./chains";
2
9
 
3
10
  export const explorerBaseUrls = {
4
11
  ETH: "https://etherscan.io",
12
+ [sepolia]: "https://sepolia.etherscan.io",
5
13
  POLYGON: "https://polygonscan.com",
14
+ [polygonAmoy]: "https://www.oklink.com/amoy",
6
15
  AVALANCHE: "https://snowtrace.io",
7
16
  ARBITRUM: "https://arbiscan.io",
8
17
  BINANCE: "https://bscscan.com",
@@ -29,7 +38,9 @@ export const explorerBaseUrls = {
29
38
 
30
39
  export const txnBaseUrl = {
31
40
  ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
41
+ [sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
32
42
  POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
43
+ [polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
33
44
  AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
34
45
  ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
35
46
  BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
@@ -56,12 +67,23 @@ export const nativeTokenDetails = {
56
67
  symbol: "ETH",
57
68
  logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
58
69
  },
70
+ [sepolia]: {
71
+ name: "Ether",
72
+ symbol: "ETH",
73
+ logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
74
+ },
59
75
  POLYGON: {
60
76
  name: "Matic Token",
61
77
  symbol: "MATIC",
62
78
  logoUrl:
63
79
  "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
64
80
  },
81
+ [polygonAmoy]: {
82
+ name: "Matic Token",
83
+ symbol: "MATIC",
84
+ logoUrl:
85
+ "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
86
+ },
65
87
  AVALANCHE: {
66
88
  name: "Avalanche Coin",
67
89
  symbol: "AVAX",
@@ -170,6 +192,8 @@ const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
170
192
 
171
193
  export const rpcUrls = {
172
194
  MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
195
+ [polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
196
+ [sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
173
197
  ETH: "https://eth.llamarpc.com",
174
198
  POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
175
199
  AVALANCHE: "https://avalanche-c-chain.publicnode.com",
@@ -193,6 +217,8 @@ export const rpcUrls = {
193
217
 
194
218
  export const chainNameToChainId = {
195
219
  MUMBAI: 80001,
220
+ [polygonAmoy]: 80002,
221
+ [sepolia]: 11155111,
196
222
  POLYGON: 137,
197
223
  ETH: 1,
198
224
  AVALANCHE: 43114,
@@ -216,6 +242,8 @@ export const chainNameToChainId = {
216
242
 
217
243
  export const chainIdToChainName = {
218
244
  80001: "MUMBAI",
245
+ 80002: polygonAmoy,
246
+ 11155111: sepolia,
219
247
  137: "POLYGON",
220
248
  1: "ETH",
221
249
  43114: "AVALANCHE",