@tria-sdk/constants 1.0.34 → 1.0.40
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.
- package/dist/index.js +20 -5
- package/dist/src/chains.d.ts +1 -8
- package/dist/src/chains.js +61 -69
- package/dist/src/config.d.ts +0 -1
- package/dist/src/config.js +17 -13
- package/dist/src/connect.js +8 -5
- package/dist/src/txn.d.ts +2 -2
- package/dist/src/txn.js +72 -70
- package/index.ts +0 -1
- package/package.json +1 -1
- package/src/chains.ts +10 -24
- package/src/config.ts +0 -5
- package/src/txn.ts +12 -14
- package/tsconfig.json +1 -1
- package/src/gasToken.ts +0 -13
package/dist/index.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/config"), exports);
|
|
18
|
+
__exportStar(require("./src/chains"), exports);
|
|
19
|
+
__exportStar(require("./src/txn"), exports);
|
|
20
|
+
__exportStar(require("./src/connect"), exports);
|
package/dist/src/chains.d.ts
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
export declare const mumbai = "MUMBAI";
|
|
2
|
-
export declare const polygon = "POLYGON";
|
|
3
|
-
export declare const ethereum = "ETH";
|
|
4
|
-
export declare const fuse = "FUSE";
|
|
5
|
-
export declare const fuseSpark = "FUSESPARK";
|
|
6
1
|
export declare const zkLink: string;
|
|
7
2
|
export declare const zkLinkTestnet: string;
|
|
8
3
|
export declare const bitlayerTestnet: string;
|
|
4
|
+
export declare const bitlayerMainnet: string;
|
|
9
5
|
export declare const neoxTestnet: string;
|
|
10
6
|
export declare const sepolia: string;
|
|
11
7
|
export declare const polygonAmoy: string;
|
|
12
|
-
export declare const vanarTestnet: string;
|
|
13
8
|
export type ZKLINK = "ZKLINK-NOVA";
|
|
14
9
|
export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
|
|
15
10
|
export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
|
|
16
11
|
export type NEOX_TESTNET = "NEOX-TESTNET";
|
|
17
12
|
export type SEPOLIA = "SEPOLIA";
|
|
18
13
|
export type AMOY = "AMOY";
|
|
19
|
-
export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
|
|
20
14
|
export declare const TESTNET_CHAINS: string[];
|
|
21
15
|
export declare const SUPPORTED_EVM_CHAINS: string[];
|
|
22
|
-
export declare const GAS_ABS_ENABLED_CHAINS: string[];
|
|
23
16
|
export declare const AA_SUPPORTED_EVM_CHAINS: string[];
|
|
24
17
|
export declare const ALLCHAINS: string[];
|
|
25
18
|
export declare const networks: {
|
package/dist/src/chains.js
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const vanarTestnet = "VANGUARD-VANAR-TESTNET";
|
|
13
|
-
export const TESTNET_CHAINS = [
|
|
14
|
-
sepolia,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chainNameToLogoBlack = exports.chainNameToLogo = exports.networks = exports.ALLCHAINS = exports.AA_SUPPORTED_EVM_CHAINS = exports.SUPPORTED_EVM_CHAINS = exports.TESTNET_CHAINS = exports.polygonAmoy = exports.sepolia = exports.neoxTestnet = exports.bitlayerMainnet = exports.bitlayerTestnet = exports.zkLinkTestnet = exports.zkLink = void 0;
|
|
4
|
+
exports.zkLink = "ZKLINK-NOVA";
|
|
5
|
+
exports.zkLinkTestnet = "ZKLINK-NOVA-TESTNET";
|
|
6
|
+
exports.bitlayerTestnet = "BITLAYER-TESTNET";
|
|
7
|
+
exports.bitlayerMainnet = "BITLAYER-MAINNET";
|
|
8
|
+
exports.neoxTestnet = "NEOX-TESTNET";
|
|
9
|
+
exports.sepolia = "SEPOLIA";
|
|
10
|
+
exports.polygonAmoy = "AMOY";
|
|
11
|
+
exports.TESTNET_CHAINS = [
|
|
15
12
|
"MUMBAI",
|
|
16
13
|
"FUSESPARK",
|
|
17
14
|
"MANTA-TESTNET",
|
|
18
15
|
"METIS-TESTNET",
|
|
19
16
|
"MANTLE-TESTNET",
|
|
20
|
-
zkLinkTestnet,
|
|
21
|
-
bitlayerTestnet,
|
|
22
|
-
neoxTestnet,
|
|
23
|
-
sepolia,
|
|
24
|
-
polygonAmoy,
|
|
25
|
-
vanarTestnet,
|
|
17
|
+
exports.zkLinkTestnet,
|
|
18
|
+
exports.bitlayerTestnet,
|
|
19
|
+
exports.neoxTestnet,
|
|
20
|
+
exports.sepolia,
|
|
21
|
+
exports.polygonAmoy,
|
|
26
22
|
];
|
|
27
|
-
|
|
23
|
+
exports.SUPPORTED_EVM_CHAINS = [
|
|
28
24
|
"ETH",
|
|
29
25
|
"POLYGON",
|
|
30
26
|
"AVALANCHE",
|
|
@@ -35,26 +31,23 @@ export const SUPPORTED_EVM_CHAINS = [
|
|
|
35
31
|
"FUSE",
|
|
36
32
|
"FUSESPARK",
|
|
37
33
|
"MUMBAI",
|
|
38
|
-
sepolia,
|
|
39
34
|
"MANTA",
|
|
40
35
|
"MANTA-TESTNET",
|
|
41
36
|
"METIS",
|
|
42
37
|
"METIS-TESTNET",
|
|
43
38
|
"MANTLE",
|
|
44
39
|
"MANTLE-TESTNET",
|
|
45
|
-
zkLink,
|
|
46
|
-
zkLinkTestnet,
|
|
47
|
-
bitlayerTestnet,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
exports.zkLink,
|
|
41
|
+
exports.zkLinkTestnet,
|
|
42
|
+
exports.bitlayerTestnet,
|
|
43
|
+
exports.bitlayerMainnet,
|
|
44
|
+
exports.neoxTestnet,
|
|
45
|
+
exports.sepolia,
|
|
46
|
+
exports.polygonAmoy,
|
|
52
47
|
];
|
|
53
|
-
|
|
54
|
-
export const AA_SUPPORTED_EVM_CHAINS = [
|
|
48
|
+
exports.AA_SUPPORTED_EVM_CHAINS = [
|
|
55
49
|
// "ETH",
|
|
56
50
|
"POLYGON",
|
|
57
|
-
sepolia,
|
|
58
51
|
// "AVALANCHE",
|
|
59
52
|
// "ARBITRUM",
|
|
60
53
|
// "BINANCE",
|
|
@@ -62,13 +55,13 @@ export const AA_SUPPORTED_EVM_CHAINS = [
|
|
|
62
55
|
"FUSE",
|
|
63
56
|
"MUMBAI",
|
|
64
57
|
// "MANTLE",
|
|
65
|
-
sepolia,
|
|
58
|
+
exports.sepolia,
|
|
66
59
|
"OPTIMISM",
|
|
67
60
|
"ARBITRUM",
|
|
68
61
|
"AVALANCHE",
|
|
69
62
|
"MANTLE",
|
|
70
63
|
];
|
|
71
|
-
|
|
64
|
+
exports.ALLCHAINS = [
|
|
72
65
|
"ETH",
|
|
73
66
|
"POLYGON",
|
|
74
67
|
"AVALANCHE",
|
|
@@ -79,7 +72,6 @@ export const ALLCHAINS = [
|
|
|
79
72
|
"FUSE",
|
|
80
73
|
"FUSESPARK",
|
|
81
74
|
"MUMBAI",
|
|
82
|
-
sepolia,
|
|
83
75
|
"MANTA",
|
|
84
76
|
"MANTA-TESTNET",
|
|
85
77
|
"METIS",
|
|
@@ -87,24 +79,24 @@ export const ALLCHAINS = [
|
|
|
87
79
|
"MANTLE",
|
|
88
80
|
"MANTLE-TESTNET",
|
|
89
81
|
"SOLANA",
|
|
90
|
-
zkLink,
|
|
91
|
-
zkLinkTestnet,
|
|
92
|
-
bitlayerTestnet,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
exports.zkLink,
|
|
83
|
+
exports.zkLinkTestnet,
|
|
84
|
+
exports.bitlayerTestnet,
|
|
85
|
+
exports.bitlayerMainnet,
|
|
86
|
+
exports.neoxTestnet,
|
|
87
|
+
exports.sepolia,
|
|
88
|
+
exports.polygonAmoy,
|
|
97
89
|
];
|
|
98
90
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
99
91
|
const baseLogoUrlBlack = "https://static.tria.so/chain-logo-b";
|
|
100
|
-
|
|
92
|
+
exports.networks = [
|
|
101
93
|
{
|
|
102
94
|
chainName: "ETH",
|
|
103
95
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
104
96
|
type: "mainnet",
|
|
105
97
|
},
|
|
106
98
|
{
|
|
107
|
-
chainName: sepolia,
|
|
99
|
+
chainName: exports.sepolia,
|
|
108
100
|
logo: `${baseLogoUrl}/Ethereum.webp`,
|
|
109
101
|
type: "testnet",
|
|
110
102
|
},
|
|
@@ -119,7 +111,7 @@ export const networks = [
|
|
|
119
111
|
type: "mainnet",
|
|
120
112
|
},
|
|
121
113
|
{
|
|
122
|
-
chainName: polygonAmoy,
|
|
114
|
+
chainName: exports.polygonAmoy,
|
|
123
115
|
logo: `${baseLogoUrl}/Polygon.svg`,
|
|
124
116
|
type: "testnet",
|
|
125
117
|
},
|
|
@@ -198,37 +190,37 @@ export const networks = [
|
|
|
198
190
|
type: "mainnet",
|
|
199
191
|
},
|
|
200
192
|
{
|
|
201
|
-
chainName: zkLink,
|
|
193
|
+
chainName: exports.zkLink,
|
|
202
194
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
203
195
|
type: "mainnet",
|
|
204
196
|
},
|
|
205
197
|
{
|
|
206
|
-
chainName: zkLinkTestnet,
|
|
198
|
+
chainName: exports.zkLinkTestnet,
|
|
207
199
|
logo: `${baseLogoUrl}/zklink.webp`,
|
|
208
200
|
type: "testnet",
|
|
209
201
|
},
|
|
210
202
|
{
|
|
211
|
-
chainName: bitlayerTestnet,
|
|
203
|
+
chainName: exports.bitlayerTestnet,
|
|
212
204
|
logo: `${baseLogoUrl}/bitlayer.webp`,
|
|
213
205
|
type: "testnet",
|
|
214
206
|
},
|
|
215
207
|
{
|
|
216
|
-
chainName:
|
|
217
|
-
logo: `${baseLogoUrl}/
|
|
218
|
-
type: "
|
|
208
|
+
chainName: exports.bitlayerMainnet,
|
|
209
|
+
logo: `${baseLogoUrl}/bitlayer.webp`,
|
|
210
|
+
type: "mainnet",
|
|
219
211
|
},
|
|
220
212
|
{
|
|
221
|
-
chainName:
|
|
222
|
-
logo:
|
|
213
|
+
chainName: exports.neoxTestnet,
|
|
214
|
+
logo: `${baseLogoUrl}/Neo.webp`,
|
|
223
215
|
type: "testnet",
|
|
224
216
|
},
|
|
225
217
|
];
|
|
226
|
-
|
|
218
|
+
exports.chainNameToLogo = {
|
|
227
219
|
ETH: `${baseLogoUrl}/Ethereum.webp`,
|
|
228
|
-
[sepolia]: `${baseLogoUrl}/Ethereum.webp`,
|
|
220
|
+
[exports.sepolia]: `${baseLogoUrl}/Ethereum.webp`,
|
|
229
221
|
FANTOM: `${baseLogoUrl}/Fantom.webp`,
|
|
230
222
|
POLYGON: `${baseLogoUrl}/Polygon.webp`,
|
|
231
|
-
[polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
|
|
223
|
+
[exports.polygonAmoy]: `${baseLogoUrl}/Polygon.webp`,
|
|
232
224
|
AVALANCHE: `${baseLogoUrl}/Avalanche.webp`,
|
|
233
225
|
OPTIMISM: `${baseLogoUrl}/Optimism.webp`,
|
|
234
226
|
ARBITRUM: `${baseLogoUrl}/Arbitrum.webp`,
|
|
@@ -244,19 +236,19 @@ export const chainNameToLogo = {
|
|
|
244
236
|
MANTLE: `${baseLogoUrl}/Mantle.webp`,
|
|
245
237
|
"MANTLE-TESTNET": `${baseLogoUrl}/Mantle.webp`,
|
|
246
238
|
SOLANA: `${baseLogoUrl}/Solana.webp`,
|
|
247
|
-
[zkLink]: `${baseLogoUrl}/zklink.webp`,
|
|
248
|
-
[zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
249
|
-
[bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
250
|
-
[
|
|
251
|
-
[
|
|
239
|
+
[exports.zkLink]: `${baseLogoUrl}/zklink.webp`,
|
|
240
|
+
[exports.zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
241
|
+
[exports.bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
242
|
+
[exports.bitlayerMainnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
243
|
+
[exports.neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
252
244
|
};
|
|
253
|
-
|
|
245
|
+
exports.chainNameToLogoBlack = {
|
|
254
246
|
ETH: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
255
|
-
[sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
247
|
+
[exports.sepolia]: `${baseLogoUrlBlack}/Ethereum.webp`,
|
|
256
248
|
BINANCE: `${baseLogoUrlBlack}/binance.webp`,
|
|
257
249
|
FANTOM: `${baseLogoUrlBlack}/Fantom.webp`,
|
|
258
250
|
POLYGON: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
259
|
-
[polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
251
|
+
[exports.polygonAmoy]: `${baseLogoUrlBlack}/Polygon.webp`,
|
|
260
252
|
AVALANCHE: `${baseLogoUrlBlack}/Avalanche.webp`,
|
|
261
253
|
OPTIMISM: `${baseLogoUrlBlack}/Optimism.webp`,
|
|
262
254
|
ARBITRUM: `${baseLogoUrlBlack}/Arbitrum.webp`,
|
|
@@ -271,9 +263,9 @@ export const chainNameToLogoBlack = {
|
|
|
271
263
|
MANTLE: `${baseLogoUrlBlack}/Mantle.webp`,
|
|
272
264
|
"MANTLE-TESTNET": `${baseLogoUrlBlack}/Mantle.webp`,
|
|
273
265
|
SOLANA: `${baseLogoUrlBlack}/Solana.webp`,
|
|
274
|
-
[zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
275
|
-
[zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
276
|
-
[bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
277
|
-
[
|
|
278
|
-
[
|
|
266
|
+
[exports.zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
267
|
+
[exports.zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
268
|
+
[exports.bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
269
|
+
[exports.bitlayerMainnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
270
|
+
[exports.neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
279
271
|
};
|
package/dist/src/config.d.ts
CHANGED
|
@@ -3,4 +3,3 @@ export declare const isEvmChain: (chainName: string) => boolean;
|
|
|
3
3
|
export declare const isAaSupportedChain: (chainName: string) => boolean;
|
|
4
4
|
export declare const isChainSupported: (chainName: string) => boolean;
|
|
5
5
|
export declare const isTestnetChain: (chainName: string) => boolean;
|
|
6
|
-
export declare const isGasAbsEnabled: (chainName: string) => boolean;
|
package/dist/src/config.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTestnetChain = exports.isChainSupported = exports.isAaSupportedChain = exports.isEvmChain = exports.prodApiUrl = void 0;
|
|
4
|
+
const chains_1 = require("./chains");
|
|
5
|
+
exports.prodApiUrl = "https://prod.tria.so";
|
|
6
|
+
const isEvmChain = (chainName) => {
|
|
7
|
+
return chains_1.SUPPORTED_EVM_CHAINS.includes(chainName);
|
|
5
8
|
};
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
exports.isEvmChain = isEvmChain;
|
|
10
|
+
const isAaSupportedChain = (chainName) => {
|
|
11
|
+
return chains_1.AA_SUPPORTED_EVM_CHAINS.includes(chainName);
|
|
8
12
|
};
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
exports.isAaSupportedChain = isAaSupportedChain;
|
|
14
|
+
const isChainSupported = (chainName) => {
|
|
15
|
+
return chains_1.ALLCHAINS.includes(chainName);
|
|
11
16
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const isGasAbsEnabled = (chainName) => {
|
|
16
|
-
return GAS_ABS_ENABLED_CHAINS.includes(chainName);
|
|
17
|
+
exports.isChainSupported = isChainSupported;
|
|
18
|
+
const isTestnetChain = (chainName) => {
|
|
19
|
+
return chains_1.TESTNET_CHAINS.includes(chainName);
|
|
17
20
|
};
|
|
21
|
+
exports.isTestnetChain = isTestnetChain;
|
package/dist/src/connect.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triaAuthUrl = exports.storageKeys = exports.TRIA_WALLET_SELECTED_CHAIN = exports.TRIA_WALLET_STORE = exports.eventTypes = void 0;
|
|
4
|
+
exports.eventTypes = {
|
|
2
5
|
logIn: "Log in",
|
|
3
6
|
triaSignUp: "Tria Sign up",
|
|
4
7
|
emailPwSignUp: "Email Pwd Sign up",
|
|
@@ -15,12 +18,12 @@ export const eventTypes = {
|
|
|
15
18
|
saveToAuth: "Save to Auth Iframe",
|
|
16
19
|
triaStoreSet: "triaStoreSet",
|
|
17
20
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
exports.TRIA_WALLET_STORE = "tria.wallet.store";
|
|
22
|
+
exports.TRIA_WALLET_SELECTED_CHAIN = "tria.wallet.selectedChain";
|
|
23
|
+
exports.storageKeys = {
|
|
21
24
|
TRIA_WALLET_STORE: "tria.wallet.store",
|
|
22
25
|
TRIA_WALLET_SELECTED_CHAIN: "tria.wallet.selectedChain",
|
|
23
26
|
PERSIST_ROOT: "persist:root",
|
|
24
27
|
};
|
|
25
|
-
|
|
28
|
+
exports.triaAuthUrl = "https://auth.tria.so";
|
|
26
29
|
// export const PARENT_URL = document?.referrer || window?.parent?.[0]?.location?.ancestorOrigins?.[0];
|
package/dist/src/txn.d.ts
CHANGED
|
@@ -171,9 +171,9 @@ export declare const chainNameToChainId: {
|
|
|
171
171
|
"MANTLE-TESTNET": number;
|
|
172
172
|
};
|
|
173
173
|
export declare const chainIdToChainName: {
|
|
174
|
-
11155111: string;
|
|
175
174
|
80001: string;
|
|
176
175
|
80002: string;
|
|
176
|
+
11155111: string;
|
|
177
177
|
137: string;
|
|
178
178
|
1: string;
|
|
179
179
|
43114: string;
|
|
@@ -192,6 +192,6 @@ export declare const chainIdToChainName: {
|
|
|
192
192
|
810180: string;
|
|
193
193
|
810182: string;
|
|
194
194
|
200810: string;
|
|
195
|
+
200901: string;
|
|
195
196
|
12227330: string;
|
|
196
|
-
78600: string;
|
|
197
197
|
};
|
package/dist/src/txn.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chainIdToChainName = exports.chainNameToChainId = exports.rpcUrls = exports.nativeTokenDetails = exports.txnBaseUrl = exports.explorerBaseUrls = void 0;
|
|
4
|
+
const chains_1 = require("./chains");
|
|
5
|
+
exports.explorerBaseUrls = {
|
|
3
6
|
ETH: "https://etherscan.io",
|
|
4
|
-
[sepolia]: "https://sepolia.etherscan.io",
|
|
7
|
+
[chains_1.sepolia]: "https://sepolia.etherscan.io",
|
|
5
8
|
POLYGON: "https://polygonscan.com",
|
|
6
|
-
[polygonAmoy]: "https://www.oklink.com/amoy",
|
|
9
|
+
[chains_1.polygonAmoy]: "https://www.oklink.com/amoy",
|
|
7
10
|
AVALANCHE: "https://snowtrace.io",
|
|
8
11
|
ARBITRUM: "https://arbiscan.io",
|
|
9
12
|
BINANCE: "https://bscscan.com",
|
|
@@ -22,44 +25,44 @@ export const explorerBaseUrls = {
|
|
|
22
25
|
"MANTLE-TESTNET": "https://explorer.testnet.mantle.xyz",
|
|
23
26
|
MANTA: "https://pacific-explorer.manta.network",
|
|
24
27
|
"MANTA-TESTNET": "https://manta-testnet.calderaexplorer.xyz",
|
|
25
|
-
[zkLink]: "https://explorer.zklink.io",
|
|
26
|
-
[zkLinkTestnet]: "https://goerli.explorer.zklink.io",
|
|
27
|
-
[bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
|
|
28
|
-
[
|
|
29
|
-
[
|
|
28
|
+
[chains_1.zkLink]: "https://explorer.zklink.io",
|
|
29
|
+
[chains_1.zkLinkTestnet]: "https://goerli.explorer.zklink.io",
|
|
30
|
+
[chains_1.bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
|
|
31
|
+
[chains_1.bitlayerMainnet]: "https://www.btrscan.com",
|
|
32
|
+
[chains_1.neoxTestnet]: "https://xt2scan.ngd.network",
|
|
30
33
|
};
|
|
31
|
-
|
|
32
|
-
ETH: `${explorerBaseUrls.ETH}/tx`, // /txHash
|
|
33
|
-
[sepolia]: `${explorerBaseUrls[sepolia]}/tx`,
|
|
34
|
-
POLYGON: `${explorerBaseUrls.POLYGON}/tx`,
|
|
35
|
-
[polygonAmoy]: `${explorerBaseUrls[polygonAmoy]}/tx`,
|
|
36
|
-
AVALANCHE: `${explorerBaseUrls.AVALANCHE}/tx`,
|
|
37
|
-
ARBITRUM: `${explorerBaseUrls.ARBITRUM}/tx`,
|
|
38
|
-
BINANCE: `${explorerBaseUrls.BINANCE}/tx`,
|
|
39
|
-
OPTIMISM: `${explorerBaseUrls.OPTIMISM}/tx`,
|
|
40
|
-
FANTOM: `${explorerBaseUrls.FANTOM}/tx`,
|
|
41
|
-
FUSE: `${explorerBaseUrls.FUSE}/tx`,
|
|
42
|
-
FUSESPARK: `${explorerBaseUrls.FUSESPARK}/tx`,
|
|
43
|
-
MUMBAI: `${explorerBaseUrls.MUMBAI}/tx`,
|
|
44
|
-
METIS: `${explorerBaseUrls.METIS}/tx`,
|
|
45
|
-
"METIS-TESTNET": `${explorerBaseUrls["METIS-TESTNET"]}/tx`,
|
|
46
|
-
MANTLE: `${explorerBaseUrls.MANTLE}/tx`,
|
|
47
|
-
"MANTLE-TESTNET": `${explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
|
|
48
|
-
MANTA: `${explorerBaseUrls.MANTA}/tx`,
|
|
49
|
-
"MANTA-TESTNET": `${explorerBaseUrls["MANTA-TESTNET"]}/tx`,
|
|
50
|
-
[zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
|
|
51
|
-
[zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
|
|
52
|
-
[bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
|
|
53
|
-
[
|
|
54
|
-
[
|
|
34
|
+
exports.txnBaseUrl = {
|
|
35
|
+
ETH: `${exports.explorerBaseUrls.ETH}/tx`, // /txHash
|
|
36
|
+
[chains_1.sepolia]: `${exports.explorerBaseUrls[chains_1.sepolia]}/tx`,
|
|
37
|
+
POLYGON: `${exports.explorerBaseUrls.POLYGON}/tx`,
|
|
38
|
+
[chains_1.polygonAmoy]: `${exports.explorerBaseUrls[chains_1.polygonAmoy]}/tx`,
|
|
39
|
+
AVALANCHE: `${exports.explorerBaseUrls.AVALANCHE}/tx`,
|
|
40
|
+
ARBITRUM: `${exports.explorerBaseUrls.ARBITRUM}/tx`,
|
|
41
|
+
BINANCE: `${exports.explorerBaseUrls.BINANCE}/tx`,
|
|
42
|
+
OPTIMISM: `${exports.explorerBaseUrls.OPTIMISM}/tx`,
|
|
43
|
+
FANTOM: `${exports.explorerBaseUrls.FANTOM}/tx`,
|
|
44
|
+
FUSE: `${exports.explorerBaseUrls.FUSE}/tx`,
|
|
45
|
+
FUSESPARK: `${exports.explorerBaseUrls.FUSESPARK}/tx`,
|
|
46
|
+
MUMBAI: `${exports.explorerBaseUrls.MUMBAI}/tx`,
|
|
47
|
+
METIS: `${exports.explorerBaseUrls.METIS}/tx`,
|
|
48
|
+
"METIS-TESTNET": `${exports.explorerBaseUrls["METIS-TESTNET"]}/tx`,
|
|
49
|
+
MANTLE: `${exports.explorerBaseUrls.MANTLE}/tx`,
|
|
50
|
+
"MANTLE-TESTNET": `${exports.explorerBaseUrls["MANTLE-TESTNET"]}/tx`,
|
|
51
|
+
MANTA: `${exports.explorerBaseUrls.MANTA}/tx`,
|
|
52
|
+
"MANTA-TESTNET": `${exports.explorerBaseUrls["MANTA-TESTNET"]}/tx`,
|
|
53
|
+
[chains_1.zkLink]: `${exports.explorerBaseUrls[chains_1.zkLink]}/tx`,
|
|
54
|
+
[chains_1.zkLinkTestnet]: `${exports.explorerBaseUrls[chains_1.zkLinkTestnet]}/tx`,
|
|
55
|
+
[chains_1.bitlayerTestnet]: `${exports.explorerBaseUrls[chains_1.bitlayerTestnet]}/tx`,
|
|
56
|
+
[chains_1.bitlayerMainnet]: `${exports.explorerBaseUrls[chains_1.bitlayerMainnet]}/tx`,
|
|
57
|
+
[chains_1.neoxTestnet]: `${exports.explorerBaseUrls[chains_1.neoxTestnet]}/tx`,
|
|
55
58
|
};
|
|
56
|
-
|
|
59
|
+
exports.nativeTokenDetails = {
|
|
57
60
|
ETH: {
|
|
58
61
|
name: "Ether",
|
|
59
62
|
symbol: "ETH",
|
|
60
63
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
61
64
|
},
|
|
62
|
-
[sepolia]: {
|
|
65
|
+
[chains_1.sepolia]: {
|
|
63
66
|
name: "Ether",
|
|
64
67
|
symbol: "ETH",
|
|
65
68
|
logoUrl: "https://www.datocms-assets.com/86369/1669619533-ethereum.png",
|
|
@@ -69,7 +72,7 @@ export const nativeTokenDetails = {
|
|
|
69
72
|
symbol: "MATIC",
|
|
70
73
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
71
74
|
},
|
|
72
|
-
[polygonAmoy]: {
|
|
75
|
+
[chains_1.polygonAmoy]: {
|
|
73
76
|
name: "Matic Token",
|
|
74
77
|
symbol: "MATIC",
|
|
75
78
|
logoUrl: "https://logos.covalenthq.com/tokens/1/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
|
|
@@ -149,39 +152,38 @@ export const nativeTokenDetails = {
|
|
|
149
152
|
symbol: "SOL",
|
|
150
153
|
logoUrl: "https://static.tria.so/chain-logo-w/Solana.webp",
|
|
151
154
|
},
|
|
152
|
-
[zkLink]: {
|
|
155
|
+
[chains_1.zkLink]: {
|
|
153
156
|
name: "Ether",
|
|
154
157
|
symbol: "ETH",
|
|
155
158
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
156
159
|
},
|
|
157
|
-
[zkLinkTestnet]: {
|
|
160
|
+
[chains_1.zkLinkTestnet]: {
|
|
158
161
|
name: "Ether",
|
|
159
162
|
symbol: "ETH",
|
|
160
163
|
logoUrl: "https://static.tria.so/chain-logo-w/zklink.webp",
|
|
161
164
|
},
|
|
162
|
-
[bitlayerTestnet]: {
|
|
165
|
+
[chains_1.bitlayerTestnet]: {
|
|
163
166
|
name: "Bitcoin",
|
|
164
167
|
symbol: "BTC",
|
|
165
168
|
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
166
169
|
},
|
|
167
|
-
[
|
|
170
|
+
[chains_1.bitlayerMainnet]: {
|
|
171
|
+
name: "Bitcoin",
|
|
172
|
+
symbol: "BTC",
|
|
173
|
+
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
174
|
+
},
|
|
175
|
+
[chains_1.neoxTestnet]: {
|
|
168
176
|
name: "Gas",
|
|
169
177
|
symbol: "GAS",
|
|
170
178
|
logoUrl: "https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
|
|
171
179
|
},
|
|
172
|
-
[vanarTestnet]: {
|
|
173
|
-
name: "Vanry",
|
|
174
|
-
symbol: "VG",
|
|
175
|
-
logoUrl: "https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
|
|
176
|
-
},
|
|
177
180
|
};
|
|
178
181
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
179
|
-
|
|
182
|
+
exports.rpcUrls = {
|
|
180
183
|
MUMBAI: `https://polygon-mumbai.g.alchemy.com/v2/${alchemyKey}`, //'https://polygon-mumbai.blockpi.network/v1/rpc/public',
|
|
181
|
-
[polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
|
|
182
|
-
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
184
|
+
[chains_1.polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
|
|
185
|
+
[chains_1.sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
183
186
|
ETH: "https://eth.llamarpc.com",
|
|
184
|
-
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
185
187
|
POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
|
|
186
188
|
AVALANCHE: "https://avalanche-c-chain.publicnode.com",
|
|
187
189
|
ARBITRUM: "https://arbitrum-one.publicnode.com",
|
|
@@ -196,16 +198,16 @@ export const rpcUrls = {
|
|
|
196
198
|
"METIS-TESTNET": "https://goerli.gateway.metisdevops.link",
|
|
197
199
|
MANTLE: "https://rpc.mantle.xyz",
|
|
198
200
|
"MANTLE-TESTNET": "https://rpc.testnet.mantle.xyz",
|
|
199
|
-
[zkLink]: "https://rpc.zklink.io",
|
|
200
|
-
[zkLinkTestnet]: "https://goerli.rpc.zklink.io",
|
|
201
|
-
[bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
202
|
-
[
|
|
203
|
-
[
|
|
201
|
+
[chains_1.zkLink]: "https://rpc.zklink.io",
|
|
202
|
+
[chains_1.zkLinkTestnet]: "https://goerli.rpc.zklink.io",
|
|
203
|
+
[chains_1.bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
204
|
+
[chains_1.bitlayerTestnet]: "https://rpc.bitlayer.org",
|
|
205
|
+
[chains_1.neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
204
206
|
};
|
|
205
|
-
|
|
207
|
+
exports.chainNameToChainId = {
|
|
206
208
|
MUMBAI: 80001,
|
|
207
|
-
[polygonAmoy]: 80002,
|
|
208
|
-
[sepolia]: 11155111,
|
|
209
|
+
[chains_1.polygonAmoy]: 80002,
|
|
210
|
+
[chains_1.sepolia]: 11155111,
|
|
209
211
|
POLYGON: 137,
|
|
210
212
|
ETH: 1,
|
|
211
213
|
AVALANCHE: 43114,
|
|
@@ -221,16 +223,16 @@ export const chainNameToChainId = {
|
|
|
221
223
|
"METIS-TESTNET": 599,
|
|
222
224
|
MANTLE: 5000,
|
|
223
225
|
"MANTLE-TESTNET": 5001,
|
|
224
|
-
[zkLink]: 810180,
|
|
225
|
-
[zkLinkTestnet]: 810182,
|
|
226
|
-
[bitlayerTestnet]: 200810,
|
|
227
|
-
[
|
|
228
|
-
[
|
|
226
|
+
[chains_1.zkLink]: 810180,
|
|
227
|
+
[chains_1.zkLinkTestnet]: 810182,
|
|
228
|
+
[chains_1.bitlayerTestnet]: 200810,
|
|
229
|
+
[chains_1.bitlayerMainnet]: 200901,
|
|
230
|
+
[chains_1.neoxTestnet]: 12227330,
|
|
229
231
|
};
|
|
230
|
-
|
|
231
|
-
11155111: sepolia,
|
|
232
|
+
exports.chainIdToChainName = {
|
|
232
233
|
80001: "MUMBAI",
|
|
233
|
-
80002: polygonAmoy,
|
|
234
|
+
80002: chains_1.polygonAmoy,
|
|
235
|
+
11155111: chains_1.sepolia,
|
|
234
236
|
137: "POLYGON",
|
|
235
237
|
1: "ETH",
|
|
236
238
|
43114: "AVALANCHE",
|
|
@@ -246,9 +248,9 @@ export const chainIdToChainName = {
|
|
|
246
248
|
599: "METIS-TESTNET",
|
|
247
249
|
169: "MANTA",
|
|
248
250
|
3441005: "MANTA-TESTNET",
|
|
249
|
-
810180: zkLink,
|
|
250
|
-
810182: zkLinkTestnet,
|
|
251
|
-
200810: bitlayerTestnet,
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
810180: chains_1.zkLink,
|
|
252
|
+
810182: chains_1.zkLinkTestnet,
|
|
253
|
+
200810: chains_1.bitlayerTestnet,
|
|
254
|
+
200901: chains_1.bitlayerMainnet,
|
|
255
|
+
12227330: chains_1.neoxTestnet,
|
|
254
256
|
};
|
package/index.ts
CHANGED
package/package.json
CHANGED
package/src/chains.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
export const mumbai = "MUMBAI";
|
|
2
|
-
export const polygon = "POLYGON";
|
|
3
|
-
export const ethereum = "ETH";
|
|
4
|
-
export const fuse = "FUSE";
|
|
5
|
-
export const fuseSpark = "FUSESPARK";
|
|
6
|
-
|
|
7
1
|
export const zkLink: string = "ZKLINK-NOVA";
|
|
8
2
|
export const zkLinkTestnet: string = "ZKLINK-NOVA-TESTNET";
|
|
9
3
|
export const bitlayerTestnet: string = "BITLAYER-TESTNET";
|
|
4
|
+
export const bitlayerMainnet: string = "BITLAYER-MAINNET";
|
|
10
5
|
export const neoxTestnet: string = "NEOX-TESTNET";
|
|
11
6
|
export const sepolia: string = "SEPOLIA";
|
|
12
7
|
export const polygonAmoy: string = "AMOY";
|
|
13
|
-
export const vanarTestnet: string = "VANGUARD-VANAR-TESTNET";
|
|
14
8
|
|
|
15
9
|
export type ZKLINK = "ZKLINK-NOVA";
|
|
16
10
|
export type ZKLINK_TESTNET = "ZKLINK-NOVA-TESTNET";
|
|
@@ -18,10 +12,8 @@ export type BITLAYER_TESTNET = "BITLAYER-TESTNET";
|
|
|
18
12
|
export type NEOX_TESTNET = "NEOX-TESTNET";
|
|
19
13
|
export type SEPOLIA = "SEPOLIA";
|
|
20
14
|
export type AMOY = "AMOY";
|
|
21
|
-
export type VANGUARD_VANAR_TESTNET = "VANGUARD-VANAR-TESTNET";
|
|
22
15
|
|
|
23
16
|
export const TESTNET_CHAINS = [
|
|
24
|
-
sepolia,
|
|
25
17
|
"MUMBAI",
|
|
26
18
|
"FUSESPARK",
|
|
27
19
|
"MANTA-TESTNET",
|
|
@@ -32,7 +24,6 @@ export const TESTNET_CHAINS = [
|
|
|
32
24
|
neoxTestnet,
|
|
33
25
|
sepolia,
|
|
34
26
|
polygonAmoy,
|
|
35
|
-
vanarTestnet,
|
|
36
27
|
];
|
|
37
28
|
|
|
38
29
|
export const SUPPORTED_EVM_CHAINS = [
|
|
@@ -46,7 +37,6 @@ export const SUPPORTED_EVM_CHAINS = [
|
|
|
46
37
|
"FUSE",
|
|
47
38
|
"FUSESPARK",
|
|
48
39
|
"MUMBAI",
|
|
49
|
-
sepolia,
|
|
50
40
|
"MANTA",
|
|
51
41
|
"MANTA-TESTNET",
|
|
52
42
|
"METIS",
|
|
@@ -56,18 +46,15 @@ export const SUPPORTED_EVM_CHAINS = [
|
|
|
56
46
|
zkLink,
|
|
57
47
|
zkLinkTestnet,
|
|
58
48
|
bitlayerTestnet,
|
|
49
|
+
bitlayerMainnet,
|
|
59
50
|
neoxTestnet,
|
|
60
51
|
sepolia,
|
|
61
52
|
polygonAmoy,
|
|
62
|
-
vanarTestnet,
|
|
63
53
|
];
|
|
64
54
|
|
|
65
|
-
export const GAS_ABS_ENABLED_CHAINS = [sepolia, "POLYGON"];
|
|
66
|
-
|
|
67
55
|
export const AA_SUPPORTED_EVM_CHAINS = [
|
|
68
56
|
// "ETH",
|
|
69
57
|
"POLYGON",
|
|
70
|
-
sepolia,
|
|
71
58
|
// "AVALANCHE",
|
|
72
59
|
// "ARBITRUM",
|
|
73
60
|
// "BINANCE",
|
|
@@ -93,7 +80,6 @@ export const ALLCHAINS = [
|
|
|
93
80
|
"FUSE",
|
|
94
81
|
"FUSESPARK",
|
|
95
82
|
"MUMBAI",
|
|
96
|
-
sepolia,
|
|
97
83
|
"MANTA",
|
|
98
84
|
"MANTA-TESTNET",
|
|
99
85
|
"METIS",
|
|
@@ -104,10 +90,10 @@ export const ALLCHAINS = [
|
|
|
104
90
|
zkLink,
|
|
105
91
|
zkLinkTestnet,
|
|
106
92
|
bitlayerTestnet,
|
|
93
|
+
bitlayerMainnet,
|
|
107
94
|
neoxTestnet,
|
|
108
95
|
sepolia,
|
|
109
96
|
polygonAmoy,
|
|
110
|
-
vanarTestnet,
|
|
111
97
|
];
|
|
112
98
|
|
|
113
99
|
const baseLogoUrl = "https://static.tria.so/chain-logo-w";
|
|
@@ -229,13 +215,13 @@ export const networks = [
|
|
|
229
215
|
type: "testnet",
|
|
230
216
|
},
|
|
231
217
|
{
|
|
232
|
-
chainName:
|
|
233
|
-
logo: `${baseLogoUrl}/
|
|
234
|
-
type: "
|
|
218
|
+
chainName: bitlayerMainnet,
|
|
219
|
+
logo: `${baseLogoUrl}/bitlayer.webp`,
|
|
220
|
+
type: "mainnet",
|
|
235
221
|
},
|
|
236
222
|
{
|
|
237
|
-
chainName:
|
|
238
|
-
logo:
|
|
223
|
+
chainName: neoxTestnet,
|
|
224
|
+
logo: `${baseLogoUrl}/Neo.webp`,
|
|
239
225
|
type: "testnet",
|
|
240
226
|
},
|
|
241
227
|
];
|
|
@@ -264,8 +250,8 @@ export const chainNameToLogo = {
|
|
|
264
250
|
[zkLink]: `${baseLogoUrl}/zklink.webp`,
|
|
265
251
|
[zkLinkTestnet]: `${baseLogoUrl}/zklink.webp`,
|
|
266
252
|
[bitlayerTestnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
253
|
+
[bitlayerMainnet]: `${baseLogoUrl}/bitlayer.webp`,
|
|
267
254
|
[neoxTestnet]: `${baseLogoUrl}/Neo.webp`,
|
|
268
|
-
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrl}/Vanguard.webp`,
|
|
269
255
|
};
|
|
270
256
|
|
|
271
257
|
export const chainNameToLogoBlack = {
|
|
@@ -292,6 +278,6 @@ export const chainNameToLogoBlack = {
|
|
|
292
278
|
[zkLink]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
293
279
|
[zkLinkTestnet]: `${baseLogoUrlBlack}/zklink.webp`,
|
|
294
280
|
[bitlayerTestnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
281
|
+
[bitlayerMainnet]: `${baseLogoUrlBlack}/bitlayer.webp`,
|
|
295
282
|
[neoxTestnet]: `${baseLogoUrlBlack}/Neo.png`,
|
|
296
|
-
[vanarTestnet]: "https://vanguard.vanarchain.com/assets/vanry-logo.png", //`${baseLogoUrlBlack}/Vanguard.png`,
|
|
297
283
|
};
|
package/src/config.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AA_SUPPORTED_EVM_CHAINS,
|
|
3
3
|
ALLCHAINS,
|
|
4
|
-
GAS_ABS_ENABLED_CHAINS,
|
|
5
4
|
SUPPORTED_EVM_CHAINS,
|
|
6
5
|
TESTNET_CHAINS,
|
|
7
6
|
} from "./chains";
|
|
@@ -23,7 +22,3 @@ export const isChainSupported = (chainName: string) => {
|
|
|
23
22
|
export const isTestnetChain = (chainName: string) => {
|
|
24
23
|
return TESTNET_CHAINS.includes(chainName);
|
|
25
24
|
};
|
|
26
|
-
|
|
27
|
-
export const isGasAbsEnabled = (chainName: string) => {
|
|
28
|
-
return GAS_ABS_ENABLED_CHAINS.includes(chainName);
|
|
29
|
-
};
|
package/src/txn.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bitlayerTestnet,
|
|
3
|
+
bitlayerMainnet,
|
|
3
4
|
neoxTestnet,
|
|
4
5
|
polygonAmoy,
|
|
5
6
|
sepolia,
|
|
6
7
|
zkLink,
|
|
7
8
|
zkLinkTestnet,
|
|
8
|
-
vanarTestnet,
|
|
9
9
|
} from "./chains";
|
|
10
10
|
|
|
11
11
|
export const explorerBaseUrls = {
|
|
@@ -34,8 +34,8 @@ export const explorerBaseUrls = {
|
|
|
34
34
|
[zkLink]: "https://explorer.zklink.io",
|
|
35
35
|
[zkLinkTestnet]: "https://goerli.explorer.zklink.io",
|
|
36
36
|
[bitlayerTestnet]: "https://testnet-scan.bitlayer.org/en-us",
|
|
37
|
+
[bitlayerMainnet]: "https://www.btrscan.com",
|
|
37
38
|
[neoxTestnet]: "https://xt2scan.ngd.network",
|
|
38
|
-
[vanarTestnet]: "https://explorer-vanguard.vanarchain.com",
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
export const txnBaseUrl = {
|
|
@@ -60,8 +60,8 @@ export const txnBaseUrl = {
|
|
|
60
60
|
[zkLink]: `${explorerBaseUrls[zkLink]}/tx`,
|
|
61
61
|
[zkLinkTestnet]: `${explorerBaseUrls[zkLinkTestnet]}/tx`,
|
|
62
62
|
[bitlayerTestnet]: `${explorerBaseUrls[bitlayerTestnet]}/tx`,
|
|
63
|
+
[bitlayerMainnet]: `${explorerBaseUrls[bitlayerMainnet]}/tx`,
|
|
63
64
|
[neoxTestnet]: `${explorerBaseUrls[neoxTestnet]}/tx`,
|
|
64
|
-
[vanarTestnet]: `${explorerBaseUrls[vanarTestnet]}/tx`,
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
export const nativeTokenDetails = {
|
|
@@ -183,18 +183,17 @@ export const nativeTokenDetails = {
|
|
|
183
183
|
symbol: "BTC",
|
|
184
184
|
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
185
185
|
},
|
|
186
|
+
[bitlayerMainnet]: {
|
|
187
|
+
name: "Bitcoin",
|
|
188
|
+
symbol: "BTC",
|
|
189
|
+
logoUrl: "https://static.tria.so/chain-logo-w/bitlayer.webp",
|
|
190
|
+
},
|
|
186
191
|
[neoxTestnet]: {
|
|
187
192
|
name: "Gas",
|
|
188
193
|
symbol: "GAS",
|
|
189
194
|
logoUrl:
|
|
190
195
|
"https://assets.coingecko.com/coins/images/858/standard/GAS_512_512.png?1696501992",
|
|
191
196
|
},
|
|
192
|
-
[vanarTestnet]: {
|
|
193
|
-
name: "Vanry",
|
|
194
|
-
symbol: "VG",
|
|
195
|
-
logoUrl:
|
|
196
|
-
"https://explorer-vanguard.vanarchain.com/assets/network_icon_dark.svg",
|
|
197
|
-
},
|
|
198
197
|
};
|
|
199
198
|
|
|
200
199
|
const alchemyKey = "kcuWVV9ss_iLWJ2Lw6xdHbmtZYixfY7Z";
|
|
@@ -204,7 +203,6 @@ export const rpcUrls = {
|
|
|
204
203
|
[polygonAmoy]: `https://polygon-amoy.g.alchemy.com/v2/${alchemyKey}`,
|
|
205
204
|
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
206
205
|
ETH: "https://eth.llamarpc.com",
|
|
207
|
-
[sepolia]: `https://eth-sepolia.g.alchemy.com/v2/${alchemyKey}`,
|
|
208
206
|
POLYGON: `https://polygon-mainnet.g.alchemy.com/v2/${alchemyKey}`, // 'https://polygon.llamarpc.com',
|
|
209
207
|
AVALANCHE: "https://avalanche-c-chain.publicnode.com",
|
|
210
208
|
ARBITRUM: "https://arbitrum-one.publicnode.com",
|
|
@@ -222,8 +220,8 @@ export const rpcUrls = {
|
|
|
222
220
|
[zkLink]: "https://rpc.zklink.io",
|
|
223
221
|
[zkLinkTestnet]: "https://goerli.rpc.zklink.io",
|
|
224
222
|
[bitlayerTestnet]: "https://testnet-rpc.bitlayer.org",
|
|
223
|
+
[bitlayerTestnet]: "https://rpc.bitlayer.org",
|
|
225
224
|
[neoxTestnet]: "https://neoxseed1.ngd.network",
|
|
226
|
-
[vanarTestnet]: "http://rpc-partners-vanguard.vanarchain.com", // "https://rpc-vanguard.vanarchain.com",
|
|
227
225
|
};
|
|
228
226
|
|
|
229
227
|
export const chainNameToChainId = {
|
|
@@ -248,14 +246,14 @@ export const chainNameToChainId = {
|
|
|
248
246
|
[zkLink]: 810180,
|
|
249
247
|
[zkLinkTestnet]: 810182,
|
|
250
248
|
[bitlayerTestnet]: 200810,
|
|
249
|
+
[bitlayerMainnet]: 200901,
|
|
251
250
|
[neoxTestnet]: 12227330,
|
|
252
|
-
[vanarTestnet]: 78600,
|
|
253
251
|
};
|
|
254
252
|
|
|
255
253
|
export const chainIdToChainName = {
|
|
256
|
-
11155111: sepolia,
|
|
257
254
|
80001: "MUMBAI",
|
|
258
255
|
80002: polygonAmoy,
|
|
256
|
+
11155111: sepolia,
|
|
259
257
|
137: "POLYGON",
|
|
260
258
|
1: "ETH",
|
|
261
259
|
43114: "AVALANCHE",
|
|
@@ -274,6 +272,6 @@ export const chainIdToChainName = {
|
|
|
274
272
|
810180: zkLink,
|
|
275
273
|
810182: zkLinkTestnet,
|
|
276
274
|
200810: bitlayerTestnet,
|
|
275
|
+
200901: bitlayerMainnet,
|
|
277
276
|
12227330: neoxTestnet,
|
|
278
|
-
78600: vanarTestnet,
|
|
279
277
|
};
|
package/tsconfig.json
CHANGED
package/src/gasToken.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// import { polygonAmoy, sepolia } from "./chains";
|
|
2
|
-
|
|
3
|
-
// export const gasTokenAddresses = {
|
|
4
|
-
// [sepolia]: {
|
|
5
|
-
// USDC: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
|
|
6
|
-
// USDT: "",
|
|
7
|
-
// TST: "0xe2fDF4b113552A7bFaD5492D7E68F7479D7DFaCF",
|
|
8
|
-
// },
|
|
9
|
-
// [polygonAmoy]: {
|
|
10
|
-
// USDC: "",
|
|
11
|
-
// USDT: "",
|
|
12
|
-
// },
|
|
13
|
-
// };
|