@kynesyslabs/demosdk 1.6.4 → 1.6.5
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/build/abstraction/EvmCoinFinder.d.ts +13 -12
- package/build/abstraction/EvmCoinFinder.js +198 -24
- package/build/abstraction/EvmCoinFinder.js.map +1 -1
- package/build/abstraction/providers/AbstractionProviders.js.map +1 -1
- package/build/abstraction/providers/CoinAddresses.d.ts +68 -11
- package/build/abstraction/providers/CoinAddresses.js +74 -20
- package/build/abstraction/providers/CoinAddresses.js.map +1 -1
- package/build/abstraction/providers/Providers.js +9 -5
- package/build/abstraction/providers/Providers.js.map +1 -1
- package/build/abstraction/providers/arbitrum.d.ts +1 -0
- package/build/abstraction/providers/arbitrum.js +23 -0
- package/build/abstraction/providers/arbitrum.js.map +1 -0
- package/build/abstraction/providers/bsc.d.ts +1 -0
- package/build/abstraction/providers/bsc.js +27 -0
- package/build/abstraction/providers/bsc.js.map +1 -0
- package/build/abstraction/providers/ethereum.d.ts +1 -0
- package/build/abstraction/providers/ethereum.js +32 -0
- package/build/abstraction/providers/ethereum.js.map +1 -0
- package/build/abstraction/providers/optimism.d.ts +1 -0
- package/build/abstraction/providers/optimism.js +27 -0
- package/build/abstraction/providers/optimism.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
* ? For each call, we should probably select a random RPC
|
|
3
|
-
* ? from the Providers singleton and use that one in a for loop
|
|
4
|
-
* ? that breaks when the call is successful.
|
|
5
|
-
* ? This is to prevent any single RPC from being overloaded and
|
|
6
|
-
* ? to be able to fail over to the next one in the list.
|
|
7
|
-
*/
|
|
1
|
+
export type SupportedChain = "ethereum" | "bsc" | "arbitrum" | "optimism";
|
|
8
2
|
export default class EvmCoinFinder {
|
|
9
|
-
|
|
10
|
-
static
|
|
11
|
-
static
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
private static isValidAddress;
|
|
4
|
+
private static getRandomProvider;
|
|
5
|
+
static findNativeEth(targetChainIds: number[]): Promise<Record<number, {
|
|
6
|
+
eth: string;
|
|
7
|
+
weth: string;
|
|
8
|
+
}>>;
|
|
9
|
+
static findNativeAssets(targetChainIds: number[]): Promise<Record<number, {
|
|
10
|
+
native: string;
|
|
11
|
+
wrapped?: string;
|
|
12
|
+
}>>;
|
|
13
|
+
static findTokenPairs(tokenAddress: string, sourceChainId: number, targetChainIds: number[]): Promise<Record<number, string | false>>;
|
|
14
|
+
static getNativeForSupportedChain(chain: SupportedChain, targetChainId: number): string;
|
|
14
15
|
}
|
|
@@ -1,35 +1,209 @@
|
|
|
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
2
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* ? that breaks when the call is successful.
|
|
8
|
-
* ? This is to prevent any single RPC from being overloaded and
|
|
9
|
-
* ? to be able to fail over to the next one in the list.
|
|
10
|
-
*/
|
|
39
|
+
const providers_1 = __importDefault(require("./providers"));
|
|
40
|
+
const CoinAddresses_1 = require("./providers/CoinAddresses");
|
|
41
|
+
const ethers = __importStar(require("ethers"));
|
|
42
|
+
const CoinAddresses_2 = require("./providers/CoinAddresses");
|
|
11
43
|
class EvmCoinFinder {
|
|
12
|
-
|
|
13
|
-
|
|
44
|
+
static isValidAddress(address) {
|
|
45
|
+
return ethers.isAddress(address);
|
|
46
|
+
}
|
|
47
|
+
static async getRandomProvider(chainId) {
|
|
48
|
+
const rpcUrls = providers_1.default.evm[chainId.toString()];
|
|
49
|
+
if (!rpcUrls || rpcUrls.length === 0) {
|
|
50
|
+
throw new Error(`No providers found for chain ${chainId}`);
|
|
51
|
+
}
|
|
52
|
+
// Shuffle RPC URLs to try them in random order
|
|
53
|
+
const shuffledUrls = [...rpcUrls].sort(() => Math.random() - 0.5);
|
|
54
|
+
// Try each RPC until one works
|
|
55
|
+
for (const rpcUrl of shuffledUrls) {
|
|
56
|
+
try {
|
|
57
|
+
// Create ethers provider
|
|
58
|
+
const provider = new ethers.JsonRpcProvider(rpcUrl);
|
|
59
|
+
// Test the connection
|
|
60
|
+
await provider.getNetwork();
|
|
61
|
+
return provider;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.warn(`Failed to connect to RPC ${rpcUrl}:`, error);
|
|
65
|
+
continue; // Try next RPC
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
throw new Error(`All RPC providers failed for chain ${chainId}`);
|
|
69
|
+
}
|
|
14
70
|
static async findNativeEth(targetChainIds) {
|
|
15
|
-
|
|
16
|
-
|
|
71
|
+
const result = {};
|
|
72
|
+
for (const chainId of targetChainIds) {
|
|
73
|
+
// First validate if chainId is supported
|
|
74
|
+
if (![
|
|
75
|
+
CoinAddresses_2.chainIds.eth.mainnet,
|
|
76
|
+
CoinAddresses_2.chainIds.bsc.mainnet,
|
|
77
|
+
CoinAddresses_2.chainIds.arbitrum.mainnet,
|
|
78
|
+
CoinAddresses_2.chainIds.optimism.mainnet,
|
|
79
|
+
].includes(chainId)) {
|
|
80
|
+
throw new Error(`Invalid chain ID: ${chainId}`);
|
|
81
|
+
}
|
|
82
|
+
let weth;
|
|
83
|
+
switch (chainId) {
|
|
84
|
+
case CoinAddresses_2.chainIds.eth.mainnet:
|
|
85
|
+
weth = CoinAddresses_1.tokenAddresses.eth.wrapped.ethereum.mainnet;
|
|
86
|
+
break;
|
|
87
|
+
case CoinAddresses_2.chainIds.bsc.mainnet:
|
|
88
|
+
weth = CoinAddresses_1.tokenAddresses.eth.wrapped.bsc.mainnet;
|
|
89
|
+
break;
|
|
90
|
+
case CoinAddresses_2.chainIds.arbitrum.mainnet:
|
|
91
|
+
weth = CoinAddresses_1.tokenAddresses.eth.wrapped.arbitrum.mainnet;
|
|
92
|
+
break;
|
|
93
|
+
case CoinAddresses_2.chainIds.optimism.mainnet:
|
|
94
|
+
weth = CoinAddresses_1.tokenAddresses.eth.wrapped.optimism.mainnet;
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
if (weth) {
|
|
98
|
+
result[chainId] = {
|
|
99
|
+
eth: CoinAddresses_1.tokenAddresses.eth.mainnet, // native ETH
|
|
100
|
+
weth: weth, // wrapped ETH
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
17
105
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
106
|
+
static async findNativeAssets(targetChainIds) {
|
|
107
|
+
const result = {};
|
|
108
|
+
for (const chainId of targetChainIds) {
|
|
109
|
+
let wrapped;
|
|
110
|
+
switch (chainId) {
|
|
111
|
+
case CoinAddresses_2.chainIds.eth.mainnet:
|
|
112
|
+
wrapped = CoinAddresses_1.tokenAddresses.eth.wrapped.ethereum.mainnet;
|
|
113
|
+
break;
|
|
114
|
+
case CoinAddresses_2.chainIds.bsc.mainnet:
|
|
115
|
+
wrapped = CoinAddresses_1.tokenAddresses.eth.wrapped.bsc.mainnet;
|
|
116
|
+
break;
|
|
117
|
+
case CoinAddresses_2.chainIds.arbitrum.mainnet:
|
|
118
|
+
wrapped = CoinAddresses_1.tokenAddresses.eth.wrapped.arbitrum.mainnet;
|
|
119
|
+
break;
|
|
120
|
+
case CoinAddresses_2.chainIds.optimism.mainnet:
|
|
121
|
+
wrapped = CoinAddresses_1.tokenAddresses.eth.wrapped.optimism.mainnet;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
// Always include native, wrapped is optional
|
|
125
|
+
result[chainId] = {
|
|
126
|
+
native: CoinAddresses_1.tokenAddresses.eth.mainnet,
|
|
127
|
+
...(wrapped && { wrapped }), // Only include wrapped if it exists
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return result;
|
|
21
131
|
}
|
|
22
|
-
// TODO Method to find token pairs on evms (from an evm to other(s) evm(s))
|
|
23
132
|
static async findTokenPairs(tokenAddress, sourceChainId, targetChainIds) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
133
|
+
if (!this.isValidAddress(tokenAddress)) {
|
|
134
|
+
throw new Error("Invalid token address");
|
|
135
|
+
}
|
|
136
|
+
const result = {};
|
|
137
|
+
// Verify token exists on source chain
|
|
138
|
+
const provider = await this.getRandomProvider(sourceChainId);
|
|
139
|
+
const code = await provider.getCode(tokenAddress);
|
|
140
|
+
if (code === "0x") {
|
|
141
|
+
throw new Error("Token contract not found on source chain");
|
|
142
|
+
}
|
|
143
|
+
// Find corresponding tokens on target chains
|
|
144
|
+
for (const chainId of targetChainIds) {
|
|
145
|
+
// If source and target chains are the same, return the same address
|
|
146
|
+
if (chainId === sourceChainId) {
|
|
147
|
+
result[chainId] = tokenAddress;
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
let mappedToken = false;
|
|
151
|
+
// Check if it's USDC
|
|
152
|
+
if (tokenAddress === CoinAddresses_1.tokenAddresses.usdc.ethereum.mainnet) {
|
|
153
|
+
if (chainId === CoinAddresses_2.chainIds.bsc.mainnet) {
|
|
154
|
+
mappedToken = CoinAddresses_1.tokenAddresses.usdc.bsc.mainnet;
|
|
155
|
+
}
|
|
156
|
+
else if (chainId === CoinAddresses_2.chainIds.arbitrum.mainnet) {
|
|
157
|
+
mappedToken = CoinAddresses_1.tokenAddresses.usdc.arbitrum.mainnet;
|
|
158
|
+
}
|
|
159
|
+
else if (chainId === CoinAddresses_2.chainIds.optimism.mainnet) {
|
|
160
|
+
mappedToken = CoinAddresses_1.tokenAddresses.usdc.optimism.mainnet;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// Check if it's USDT
|
|
164
|
+
else if (tokenAddress === CoinAddresses_1.tokenAddresses.usdt.ethereum.mainnet) {
|
|
165
|
+
if (chainId === CoinAddresses_2.chainIds.bsc.mainnet) {
|
|
166
|
+
mappedToken = CoinAddresses_1.tokenAddresses.usdt.bsc.mainnet;
|
|
167
|
+
}
|
|
168
|
+
else if (chainId === CoinAddresses_2.chainIds.arbitrum.mainnet) {
|
|
169
|
+
mappedToken = CoinAddresses_1.tokenAddresses.usdt.arbitrum.mainnet;
|
|
170
|
+
}
|
|
171
|
+
else if (chainId === CoinAddresses_2.chainIds.optimism.mainnet) {
|
|
172
|
+
mappedToken = CoinAddresses_1.tokenAddresses.usdt.optimism.mainnet;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
result[chainId] = mappedToken;
|
|
176
|
+
}
|
|
177
|
+
return result;
|
|
27
178
|
}
|
|
28
|
-
static
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
179
|
+
static getNativeForSupportedChain(chain, targetChainId) {
|
|
180
|
+
// Validate chain matches targetChainId
|
|
181
|
+
switch (chain) {
|
|
182
|
+
case "ethereum":
|
|
183
|
+
if (targetChainId !== CoinAddresses_2.chainIds.eth.mainnet) {
|
|
184
|
+
throw new Error("Chain ID doesn't match ethereum");
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
case "bsc":
|
|
188
|
+
if (targetChainId !== CoinAddresses_2.chainIds.bsc.mainnet) {
|
|
189
|
+
throw new Error("Chain ID doesn't match bsc");
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
case "arbitrum":
|
|
193
|
+
if (targetChainId !== CoinAddresses_2.chainIds.arbitrum.mainnet) {
|
|
194
|
+
throw new Error("Chain ID doesn't match arbitrum");
|
|
195
|
+
}
|
|
196
|
+
break;
|
|
197
|
+
case "optimism":
|
|
198
|
+
if (targetChainId !== CoinAddresses_2.chainIds.optimism.mainnet) {
|
|
199
|
+
throw new Error("Chain ID doesn't match optimism");
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
default:
|
|
203
|
+
throw new Error(`Unsupported chain: ${chain}`);
|
|
204
|
+
}
|
|
205
|
+
// Return native address (0x0)
|
|
206
|
+
return CoinAddresses_1.tokenAddresses.eth.mainnet;
|
|
33
207
|
}
|
|
34
208
|
}
|
|
35
209
|
exports.default = EvmCoinFinder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EvmCoinFinder.js","sourceRoot":"","sources":["../../../src/abstraction/EvmCoinFinder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EvmCoinFinder.js","sourceRoot":"","sources":["../../../src/abstraction/EvmCoinFinder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAmC;AACnC,6DAA0D;AAC1D,+CAAgC;AAChC,6DAAoD;AAGpD,MAAqB,aAAa;IACtB,MAAM,CAAC,cAAc,CAAC,OAAe;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAe;QAClD,MAAM,OAAO,GAAG,mBAAS,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;QAEjD,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,gCAAgC,OAAO,EAAE,CAAC,CAAA;QAC9D,CAAC;QAED,+CAA+C;QAC/C,MAAM,YAAY,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAA;QAEjE,+BAA+B;QAC/B,KAAK,MAAM,MAAM,IAAI,YAAY,EAAE,CAAC;YAChC,IAAI,CAAC;gBACD,yBAAyB;gBACzB,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;gBACnD,sBAAsB;gBACtB,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAA;gBAC3B,OAAO,QAAQ,CAAA;YACnB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,IAAI,CAAC,4BAA4B,MAAM,GAAG,EAAE,KAAK,CAAC,CAAA;gBAC1D,SAAQ,CAAC,eAAe;YAC5B,CAAC;QACL,CA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tD,CAAC;gBACD,MAAK;YACT,KAAK,UAAU;gBACX,IAAI,aAAa,KAAK,wBAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;oBAC9C,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;gBACtD,CAAC;gBACD,MAAK;YACT;gBACI,MAAM,IAAI,KAAK,CAAC,sBAAsB,KAAK,EAAE,CAAC,CAAA;QACtD,CAAC;QAED,8BAA8B;QAC9B,OAAO,8BAAc,CAAC,GAAG,CAAC,OAAO,CAAA;IACrC,CAAC;CACJ;AAnMD,gCAmMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractionProviders.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/AbstractionProviders.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,qBAAqB;IAGvB,0DAA0D;IAC1D;QACI,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;QACb,IAAI,CAAC,MAAM,GAAG;YACV,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;SACd,CAAA;QACD,IAAI,CAAC,UAAU,GAAG;YACd,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;SACd,CAAA;QACD,IAAI,CAAC,GAAG,GAAG;YACP,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;SACd,CAAA;QACD,IAAI,CAAC,OAAO,GAAG;YACX,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;SACd,CAAA;IACL,CAAC;
|
|
1
|
+
{"version":3,"file":"AbstractionProviders.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/AbstractionProviders.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,qBAAqB;IAGvB,0DAA0D;IAC1D;QACI,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;QACb,IAAI,CAAC,MAAM,G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A;AAEtE,kCAAkC;AAClC,kBAAe,4BAA4B,CAAA"}
|
|
@@ -1,25 +1,82 @@
|
|
|
1
|
+
export declare const chainIds: {
|
|
2
|
+
eth: {
|
|
3
|
+
mainnet: number;
|
|
4
|
+
ropsten: number;
|
|
5
|
+
rinkeby: number;
|
|
6
|
+
goerli: number;
|
|
7
|
+
sepolia: number;
|
|
8
|
+
holesky: number;
|
|
9
|
+
};
|
|
10
|
+
bsc: {
|
|
11
|
+
mainnet: number;
|
|
12
|
+
testnet: number;
|
|
13
|
+
};
|
|
14
|
+
arbitrum: {
|
|
15
|
+
mainnet: number;
|
|
16
|
+
testnet: number;
|
|
17
|
+
};
|
|
18
|
+
optimism: {
|
|
19
|
+
mainnet: number;
|
|
20
|
+
testnet: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
1
23
|
export declare const tokenAddresses: {
|
|
2
24
|
eth: {
|
|
3
25
|
mainnet: string;
|
|
4
26
|
sepolia: string;
|
|
5
|
-
holesky: string;
|
|
6
27
|
wrapped: {
|
|
7
|
-
|
|
28
|
+
ethereum: {
|
|
8
29
|
mainnet: string;
|
|
30
|
+
testnet: string;
|
|
9
31
|
};
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
btc: {
|
|
13
|
-
mainnet: string;
|
|
14
|
-
wrapped: {
|
|
15
|
-
ethereum: {
|
|
32
|
+
bsc: {
|
|
16
33
|
mainnet: string;
|
|
17
|
-
|
|
18
|
-
holesky: string;
|
|
34
|
+
testnet: string;
|
|
19
35
|
};
|
|
20
|
-
|
|
36
|
+
arbitrum: {
|
|
21
37
|
mainnet: string;
|
|
38
|
+
testnet: string;
|
|
22
39
|
};
|
|
40
|
+
optimism: {
|
|
41
|
+
mainnet: string;
|
|
42
|
+
testnet: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
usdc: {
|
|
47
|
+
ethereum: {
|
|
48
|
+
mainnet: string;
|
|
49
|
+
testnet: string;
|
|
50
|
+
};
|
|
51
|
+
bsc: {
|
|
52
|
+
mainnet: string;
|
|
53
|
+
testnet: string;
|
|
54
|
+
};
|
|
55
|
+
arbitrum: {
|
|
56
|
+
mainnet: string;
|
|
57
|
+
testnet: string;
|
|
58
|
+
};
|
|
59
|
+
optimism: {
|
|
60
|
+
mainnet: string;
|
|
61
|
+
testnet: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
usdt: {
|
|
65
|
+
ethereum: {
|
|
66
|
+
mainnet: string;
|
|
67
|
+
testnet: string;
|
|
68
|
+
};
|
|
69
|
+
bsc: {
|
|
70
|
+
mainnet: string;
|
|
71
|
+
testnet: string;
|
|
72
|
+
};
|
|
73
|
+
arbitrum: {
|
|
74
|
+
mainnet: string;
|
|
75
|
+
testnet: string;
|
|
76
|
+
};
|
|
77
|
+
optimism: {
|
|
78
|
+
mainnet: string;
|
|
79
|
+
testnet: string;
|
|
23
80
|
};
|
|
24
81
|
};
|
|
25
82
|
};
|
|
@@ -1,32 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// ! This is an absolute test and could be changed anytime
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.tokenAddresses = void 0;
|
|
3
|
+
exports.tokenAddresses = exports.chainIds = void 0;
|
|
4
|
+
exports.chainIds = {
|
|
5
|
+
eth: {
|
|
6
|
+
mainnet: 1,
|
|
7
|
+
ropsten: 3,
|
|
8
|
+
rinkeby: 4,
|
|
9
|
+
goerli: 5,
|
|
10
|
+
sepolia: 11155111,
|
|
11
|
+
holesky: 17000,
|
|
12
|
+
},
|
|
13
|
+
bsc: {
|
|
14
|
+
mainnet: 56,
|
|
15
|
+
testnet: 97,
|
|
16
|
+
},
|
|
17
|
+
arbitrum: {
|
|
18
|
+
mainnet: 42161,
|
|
19
|
+
testnet: 421614, //Sepolia
|
|
20
|
+
},
|
|
21
|
+
optimism: {
|
|
22
|
+
mainnet: 10,
|
|
23
|
+
testnet: 11155420, //Sepolia
|
|
24
|
+
},
|
|
25
|
+
};
|
|
5
26
|
exports.tokenAddresses = {
|
|
6
|
-
// ANCHOR Ethereum
|
|
7
27
|
eth: {
|
|
8
28
|
mainnet: "0x0000000000000000000000000000000000000000",
|
|
9
29
|
sepolia: "0x0000000000000000000000000000000000000000",
|
|
10
|
-
holesky: "0x0000000000000000000000000000000000000000",
|
|
11
|
-
wrapped: {
|
|
12
|
-
polygon: {
|
|
13
|
-
mainnet: "0x0000000000000000000000000000000000000000",
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
// ANCHOR Bitcoin
|
|
18
|
-
btc: {
|
|
19
|
-
mainnet: "0x0000000000000000000000000000000000000000",
|
|
20
30
|
wrapped: {
|
|
21
31
|
ethereum: {
|
|
22
|
-
mainnet: "
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
mainnet: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
33
|
+
testnet: "0xfff9976782d46cc05630d1f6ebab18b2324d6b14", // Sepolia
|
|
34
|
+
},
|
|
35
|
+
bsc: {
|
|
36
|
+
mainnet: "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
|
|
37
|
+
testnet: "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", // BSC Testnet
|
|
38
|
+
},
|
|
39
|
+
arbitrum: {
|
|
40
|
+
mainnet: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
41
|
+
testnet: "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73", // Sepolia
|
|
25
42
|
},
|
|
26
|
-
|
|
27
|
-
mainnet: "
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
optimism: {
|
|
44
|
+
mainnet: "0x4200000000000000000000000000000000000006",
|
|
45
|
+
testnet: "0x4200000000000000000000000000000000000006", // Sepolia
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
usdc: {
|
|
50
|
+
ethereum: {
|
|
51
|
+
mainnet: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
52
|
+
testnet: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238", // Sepolia
|
|
53
|
+
},
|
|
54
|
+
bsc: {
|
|
55
|
+
mainnet: "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d",
|
|
56
|
+
testnet: "0x64544969ed7EBf5f083679233325356EbE738930", // BSC Testnet
|
|
57
|
+
},
|
|
58
|
+
arbitrum: {
|
|
59
|
+
mainnet: "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",
|
|
60
|
+
testnet: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d", // Sepolia
|
|
61
|
+
},
|
|
62
|
+
optimism: {
|
|
63
|
+
mainnet: "0x7F5c764cBc14f9669B88837ca1490cCa17c31607",
|
|
64
|
+
testnet: "0x0000000000000000000000000000000000000000", //TODO: Cannot verify this address on Sepolia
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
usdt: {
|
|
68
|
+
ethereum: {
|
|
69
|
+
mainnet: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
70
|
+
testnet: "0x7169D38820dfd117C3FA1f22a697dBA58d90BA06", // Sepolia
|
|
71
|
+
},
|
|
72
|
+
bsc: {
|
|
73
|
+
mainnet: "0x55d398326f99059fF775485246999027B3197955",
|
|
74
|
+
testnet: "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd", // BSC Testnet
|
|
75
|
+
},
|
|
76
|
+
arbitrum: {
|
|
77
|
+
mainnet: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
|
|
78
|
+
testnet: "0x0000000000000000000000000000000000000000", //TODO: Cannot verify this address on Sepolia
|
|
79
|
+
},
|
|
80
|
+
optimism: {
|
|
81
|
+
mainnet: "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",
|
|
82
|
+
testnet: "0x0000000000000000000000000000000000000000", // TODO: Cannot verify this address on Sepolia
|
|
83
|
+
},
|
|
30
84
|
},
|
|
31
85
|
};
|
|
32
86
|
//# sourceMappingURL=CoinAddresses.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinAddresses.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/CoinAddresses.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CoinAddresses.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/CoinAddresses.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG;IACpB,GAAG,EAAE;QACD,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,KAAK;KACjB;IACD,GAAG,EAAE;QACD,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;KACd;IACD,QAAQ,EAAE;QACN,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,MAAM,EAAE,SAAS;KAC7B;IACD,QAAQ,EAAE;QACN,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,QAAQ,EAAE,SAAS;KAC/B;CACJ,CAAA;AAEY,QAAA,cAAc,GAAG;IAC1B,GAAG,EAAE;QACD,OAAO,EAAE,4CAA4C;QACrD,OAAO,EAAE,4CAA4C;QACrD,OAAO,EAAE;YACL,QAAQ,EAAE;gBACN,OAAO,EAAE,4CAA4C;gBACrD,OAAO,EAAE,4CAA4C,EAAE,UAAU;aACpE;YACD,GAAG,EAAE;gBACD,OAAO,EAAE,4CAA4C;gBACrD,OAAO,EAAE,4CAA4C,EAAE,cAAc;aACxE;YACD,QAAQ,EAAE;gBACN,OAAO,EAAE,4CAA4C;gBACrD,OAAO,EAAE,4CAA4C,EAAE,UAAU;aACpE;YACD,QAAQ,EAAE;gBACN,OAAO,EAAE,4CAA4C;gBACrD,OAAO,EAAE,4CAA4C,EAAE,UAAU;aACpE;SACJ;KACJ;IACD,IAAI,EAAE;QACF,QAAQ,EAAE;YACN,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,4CAA4C,EAAE,UAAU;SACpE;QACD,GAAG,EAAE;YACD,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,4CAA4C,EAAE,cAAc;SACxE;QACD,QAAQ,EAAE;YACN,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,4CAA4C,EAAE,UAAU;SACpE;QACD,QAAQ,EAAE;YACN,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,4CAA4C,EAAE,6CAA6C;SACvG;KACJ;IACD,IAAI,EAAE;QACF,QAAQ,EAAE;YACN,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,4CAA4C,EAAE,UAAU;SACpE;QACD,GAAG,EAAE;YACD,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,4CAA4C,EAAE,cAAc;SACxE;QACD,QAAQ,EAAE;YACN,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,4CAA4C,EAAE,6CAA6C;SACvG;QACD,QAAQ,EAAE;YACN,OAAO,EAAE,4CAA4C;YACrD,OAAO,EAAE,4CAA4C,EAAE,8CAA8C;SACxG;KACJ;CACJ,CAAA"}
|
|
@@ -4,11 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const AbstractionProviders_1 = __importDefault(require("./AbstractionProviders"));
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//
|
|
7
|
+
const ethereum_1 = __importDefault(require("./ethereum"));
|
|
8
|
+
const bsc_1 = __importDefault(require("./bsc"));
|
|
9
|
+
const arbitrum_1 = __importDefault(require("./arbitrum"));
|
|
10
|
+
const optimism_1 = __importDefault(require("./optimism"));
|
|
11
|
+
// Register all blockchain providers
|
|
12
|
+
(0, ethereum_1.default)();
|
|
13
|
+
(0, bsc_1.default)();
|
|
14
|
+
(0, arbitrum_1.default)();
|
|
15
|
+
(0, optimism_1.default)();
|
|
12
16
|
const Providers = (0, AbstractionProviders_1.default)();
|
|
13
17
|
exports.default = Providers;
|
|
14
18
|
//# sourceMappingURL=Providers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Providers.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/Providers.ts"],"names":[],"mappings":";;;;;AAAA,kFAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"Providers.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/Providers.ts"],"names":[],"mappings":";;;;;AAAA,kFAAiE;AACjE,0DAAkD;AAClD,gDAAwC;AACxC,0DAAkD;AAClD,0DAAkD;AAElD,oCAAoC;AACpC,IAAA,kBAAyB,GAAE,CAAA;AAC3B,IAAA,aAAoB,GAAE,CAAA;AACtB,IAAA,kBAAyB,GAAE,CAAA;AAC3B,IAAA,kBAAyB,GAAE,CAAA;AAE3B,MAAM,SAAS,GAAG,IAAA,8BAA4B,GAAE,CAAA;AAChD,kBAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function registerArbitrumProviders(): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = registerArbitrumProviders;
|
|
7
|
+
const AbstractionProviders_1 = __importDefault(require("./AbstractionProviders"));
|
|
8
|
+
function registerArbitrumProviders() {
|
|
9
|
+
//TODO: Change to private third-party service providers in production for better performance and reliability
|
|
10
|
+
// Mainnet
|
|
11
|
+
(0, AbstractionProviders_1.default)().registerEVM("arbitrum", [
|
|
12
|
+
"https://arb1.arbitrum.io/rpc",
|
|
13
|
+
"https://rpc.ankr.com/arbitrum",
|
|
14
|
+
"https://arbitrum.drpc.org",
|
|
15
|
+
"https://arbitrum.meowrpc.com",
|
|
16
|
+
"https://arb-pokt.nodies.app",
|
|
17
|
+
]);
|
|
18
|
+
// Testnet (Sepolia)
|
|
19
|
+
(0, AbstractionProviders_1.default)().registerEVM("arbitrum_testnet", [
|
|
20
|
+
"https://sepolia-rollup.arbitrum.io/rpc",
|
|
21
|
+
]);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=arbitrum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arbitrum.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/arbitrum.ts"],"names":[],"mappings":";;;;;AAEA,4CAgBC;AAlBD,kFAAiE;AAEjE,SAAwB,yBAAyB;IAC7C,4GAA4G;IAE5G,UAAU;IACV,IAAA,8BAA4B,GAAE,CAAC,WAAW,CAAC,UAAU,EAAE;QACnD,8BAA8B;QAC9B,+BAA+B;QAC/B,2BAA2B;QAC3B,8BAA8B;QAC9B,6BAA6B;KAChC,CAAC,CAAA;IAEF,oBAAoB;IACpB,IAAA,8BAA4B,GAAE,CAAC,WAAW,CAAC,kBAAkB,EAAE;QAC3D,wCAAwC;KAC3C,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function registerBscProviders(): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = registerBscProviders;
|
|
7
|
+
const AbstractionProviders_1 = __importDefault(require("./AbstractionProviders"));
|
|
8
|
+
function registerBscProviders() {
|
|
9
|
+
//TODO: Change to private third-party service providers in production for better performance and reliability
|
|
10
|
+
// Mainnet
|
|
11
|
+
(0, AbstractionProviders_1.default)().registerEVM("bsc", [
|
|
12
|
+
"https://bsc-dataseed.bnbchain.org",
|
|
13
|
+
"https://bsc-dataseed.nariox.org",
|
|
14
|
+
"https://bsc-dataseed.defibit.io",
|
|
15
|
+
"https://bsc-dataseed.ninicoin.io",
|
|
16
|
+
"https://bsc.nodereal.io",
|
|
17
|
+
"https://bsc-dataseed-public.bnbchain.org",
|
|
18
|
+
"https://bnb.rpc.subquery.network/public",
|
|
19
|
+
]);
|
|
20
|
+
// Testnet
|
|
21
|
+
(0, AbstractionProviders_1.default)().registerEVM("bsc_testnet", [
|
|
22
|
+
"https://bsc-testnet-dataseed.bnbchain.org",
|
|
23
|
+
"https://bsc-testnet.bnbchain.org",
|
|
24
|
+
"https://bsc-prebsc-dataseed.bnbchain.org",
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=bsc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bsc.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/bsc.ts"],"names":[],"mappings":";;;;;AAEA,uCAoBC;AAtBD,kFAAiE;AAEjE,SAAwB,oBAAoB;IACxC,4GAA4G;IAE5G,UAAU;IACV,IAAA,8BAA4B,GAAE,CAAC,WAAW,CAAC,KAAK,EAAE;QAC9C,mCAAmC;QACnC,iCAAiC;QACjC,iCAAiC;QACjC,kCAAkC;QAClC,yBAAyB;QACzB,0CAA0C;QAC1C,yCAAyC;KAC5C,CAAC,CAAA;IAEF,UAAU;IACV,IAAA,8BAA4B,GAAE,CAAC,WAAW,CAAC,aAAa,EAAE;QACtD,2CAA2C;QAC3C,kCAAkC;QAClC,0CAA0C;KAC7C,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function registerEthereumProviders(): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = registerEthereumProviders;
|
|
7
|
+
const AbstractionProviders_1 = __importDefault(require("./AbstractionProviders"));
|
|
8
|
+
const CoinAddresses_1 = require("./CoinAddresses");
|
|
9
|
+
function registerEthereumProviders() {
|
|
10
|
+
//TODO: Change to private third-party service providers in production for better performance and reliability
|
|
11
|
+
// Mainnet
|
|
12
|
+
(0, AbstractionProviders_1.default)().registerEVM(CoinAddresses_1.chainIds.eth.mainnet.toString(), [
|
|
13
|
+
"https://rpc.ankr.com/eth",
|
|
14
|
+
"https://eth.drpc.org",
|
|
15
|
+
"https://eth.llamarpc.com",
|
|
16
|
+
"https://ethereum.publicnode.com",
|
|
17
|
+
"https://rpc.flashbots.net",
|
|
18
|
+
"https://rpc.payload.de",
|
|
19
|
+
"https://singapore.rpc.blxrbdn.com",
|
|
20
|
+
"https://uk.rpc.blxrbdn.com",
|
|
21
|
+
"https://virginia.rpc.blxrbdn.com",
|
|
22
|
+
]);
|
|
23
|
+
// Testnet (Sepolia)
|
|
24
|
+
(0, AbstractionProviders_1.default)().registerEVM(CoinAddresses_1.chainIds.eth.sepolia.toString(), [
|
|
25
|
+
"https://rpc.ankr.com/eth_sepolia",
|
|
26
|
+
"https://eth-sepolia.public.blastapi.io",
|
|
27
|
+
"https://endpoints.omniatech.io/v1/eth/sepolia/public",
|
|
28
|
+
"https://1rpc.io/sepolia",
|
|
29
|
+
"https://ethereum-sepolia.blockpi.network/v1/rpc/private",
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ethereum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/ethereum.ts"],"names":[],"mappings":";;;;;AAGA,4CA8BC;AAjCD,kFAAiE;AACjE,mDAA0C;AAE1C,SAAwB,yBAAyB;IAC7C,4GAA4G;IAE5G,UAAU;IACV,IAAA,8BAA4B,GAAE,CAAC,WAAW,CACtC,wBAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAC/B;QACI,0BAA0B;QAC1B,sBAAsB;QACtB,0BAA0B;QAC1B,iCAAiC;QACjC,2BAA2B;QAC3B,wBAAwB;QACxB,mCAAmC;QACnC,4BAA4B;QAC5B,kCAAkC;KACrC,CACJ,CAAA;IAED,oBAAoB;IACpB,IAAA,8BAA4B,GAAE,CAAC,WAAW,CACtC,wBAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAC/B;QACI,kCAAkC;QAClC,wCAAwC;QACxC,sDAAsD;QACtD,yBAAyB;QACzB,yDAAyD;KAC5D,CACJ,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function registerOptimismProviders(): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = registerOptimismProviders;
|
|
7
|
+
const AbstractionProviders_1 = __importDefault(require("./AbstractionProviders"));
|
|
8
|
+
function registerOptimismProviders() {
|
|
9
|
+
//TODO: Change to private third-party service providers in production for better performance and reliability
|
|
10
|
+
// Mainnet
|
|
11
|
+
(0, AbstractionProviders_1.default)().registerEVM("optimism", [
|
|
12
|
+
"https://mainnet.optimism.io",
|
|
13
|
+
"https://rpc.ankr.com/optimism",
|
|
14
|
+
"https://endpoints.omniatech.io/v1/op/mainnet/public",
|
|
15
|
+
"https://optimism-rpc.publicnode.com",
|
|
16
|
+
"https://optimism.drpc.org",
|
|
17
|
+
"https://optimism.meowrpc.com",
|
|
18
|
+
]);
|
|
19
|
+
// Testnet (Sepolia)
|
|
20
|
+
(0, AbstractionProviders_1.default)().registerEVM("optimism-sepolia", [
|
|
21
|
+
"https://api.zan.top/opt-sepolia",
|
|
22
|
+
"https://optimism-sepolia.gateway.tenderly.co",
|
|
23
|
+
"https://endpoints.omniatech.io/v1/op/sepolia/public",
|
|
24
|
+
"https://optimism-sepolia.drpc.org",
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=optimism.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optimism.js","sourceRoot":"","sources":["../../../../src/abstraction/providers/optimism.ts"],"names":[],"mappings":";;;;;AAEA,4CAoBC;AAtBD,kFAAiE;AAEjE,SAAwB,yBAAyB;IAC7C,4GAA4G;IAE5G,UAAU;IACV,IAAA,8BAA4B,GAAE,CAAC,WAAW,CAAC,UAAU,EAAE;QACnD,6BAA6B;QAC7B,+BAA+B;QAC/B,qDAAqD;QACrD,qCAAqC;QACrC,2BAA2B;QAC3B,8BAA8B;KACjC,CAAC,CAAA;IAEF,oBAAoB;IACpB,IAAA,8BAA4B,GAAE,CAAC,WAAW,CAAC,kBAAkB,EAAE;QAC3D,iCAAiC;QACjC,8CAA8C;QAC9C,qDAAqD;QACrD,mCAAmC;KACtC,CAAC,CAAA;AACN,CAAC"}
|