@b3dotfun/sdk 0.0.51-alpha.2 → 0.0.51
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/cjs/anyspend/types/chain.d.ts +0 -1
- package/dist/cjs/anyspend/utils/chain.js +47 -56
- package/dist/cjs/shared/utils/simplehash.d.ts +1 -1
- package/dist/esm/anyspend/types/chain.d.ts +0 -1
- package/dist/esm/anyspend/utils/chain.js +48 -57
- package/dist/esm/shared/utils/simplehash.d.ts +1 -1
- package/dist/types/anyspend/types/chain.d.ts +0 -1
- package/dist/types/shared/utils/simplehash.d.ts +1 -1
- package/package.json +1 -1
- package/src/anyspend/types/chain.ts +0 -1
- package/src/anyspend/utils/chain.ts +53 -49
|
@@ -52,7 +52,6 @@ exports.EVM_MAINNET = {
|
|
|
52
52
|
pollingInterval: 4000, // 4 seconds for Ethereum mainnet
|
|
53
53
|
zapperEnum: "ETHEREUM_MAINNET",
|
|
54
54
|
coingeckoName: "eth",
|
|
55
|
-
wethAddress: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
56
55
|
},
|
|
57
56
|
[chains_1.arbitrum.id]: {
|
|
58
57
|
id: chains_1.arbitrum.id,
|
|
@@ -67,7 +66,6 @@ exports.EVM_MAINNET = {
|
|
|
67
66
|
pollingInterval: 500, // 500ms for Arbitrum's fast blocks
|
|
68
67
|
zapperEnum: "ARBITRUM_MAINNET",
|
|
69
68
|
coingeckoName: "arbitrum",
|
|
70
|
-
wethAddress: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
|
|
71
69
|
},
|
|
72
70
|
[chains_1.base.id]: {
|
|
73
71
|
id: chains_1.base.id,
|
|
@@ -82,7 +80,6 @@ exports.EVM_MAINNET = {
|
|
|
82
80
|
pollingInterval: 1000, // 1 second for Base
|
|
83
81
|
zapperEnum: "BASE_MAINNET",
|
|
84
82
|
coingeckoName: "base",
|
|
85
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
86
83
|
},
|
|
87
84
|
[chains_1.optimism.id]: {
|
|
88
85
|
id: chains_1.optimism.id,
|
|
@@ -97,7 +94,6 @@ exports.EVM_MAINNET = {
|
|
|
97
94
|
pollingInterval: 1000, // 1 second for Optimism
|
|
98
95
|
zapperEnum: "OPTIMISM_MAINNET",
|
|
99
96
|
coingeckoName: "optimism",
|
|
100
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
101
97
|
},
|
|
102
98
|
[chains_1.polygon.id]: {
|
|
103
99
|
id: chains_1.polygon.id,
|
|
@@ -112,7 +108,6 @@ exports.EVM_MAINNET = {
|
|
|
112
108
|
pollingInterval: 1000, // 1 second for Polygon
|
|
113
109
|
zapperEnum: "POLYGON_MAINNET",
|
|
114
110
|
coingeckoName: "polygon_pos",
|
|
115
|
-
wethAddress: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
|
|
116
111
|
},
|
|
117
112
|
[chains_1.avalanche.id]: {
|
|
118
113
|
id: chains_1.avalanche.id,
|
|
@@ -127,7 +122,6 @@ exports.EVM_MAINNET = {
|
|
|
127
122
|
pollingInterval: 1000, // 1 second for Avalanche
|
|
128
123
|
zapperEnum: "AVALANCHE_MAINNET",
|
|
129
124
|
coingeckoName: "avax",
|
|
130
|
-
wethAddress: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7",
|
|
131
125
|
},
|
|
132
126
|
[chains_1.bsc.id]: {
|
|
133
127
|
id: chains_1.bsc.id,
|
|
@@ -142,7 +136,6 @@ exports.EVM_MAINNET = {
|
|
|
142
136
|
pollingInterval: 1000, // 1 second for BSC
|
|
143
137
|
zapperEnum: "BSC_MAINNET",
|
|
144
138
|
coingeckoName: "bsc",
|
|
145
|
-
wethAddress: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
|
|
146
139
|
},
|
|
147
140
|
[chains_1.b3.id]: {
|
|
148
141
|
id: chains_1.b3.id,
|
|
@@ -157,7 +150,6 @@ exports.EVM_MAINNET = {
|
|
|
157
150
|
pollingInterval: 1000, // 1 second for B3
|
|
158
151
|
zapperEnum: "B3_MAINNET",
|
|
159
152
|
coingeckoName: "b3",
|
|
160
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
161
153
|
},
|
|
162
154
|
[chains_1.abstract.id]: {
|
|
163
155
|
id: chains_1.abstract.id,
|
|
@@ -172,57 +164,56 @@ exports.EVM_MAINNET = {
|
|
|
172
164
|
pollingInterval: 3000, // 3 seconds for Abstract
|
|
173
165
|
zapperEnum: "ABSTRACT_MAINNET",
|
|
174
166
|
coingeckoName: "abstract",
|
|
175
|
-
wethAddress: "0x3439153eb7af838ad19d56e1571fbd09333c2809",
|
|
176
167
|
},
|
|
177
168
|
};
|
|
178
169
|
exports.EVM_TESTNET = {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
// [b4testnet.id]: {
|
|
219
|
-
// id: b4testnet.id,
|
|
220
|
-
// logoUrl: "https://cdn.b3.fun/b4-logo.png",
|
|
221
|
-
// type: ChainType.EVM,
|
|
222
|
-
// viem: b4testnet,
|
|
223
|
-
// requireNativeBalance: parseEther("0.00001"),
|
|
224
|
-
// supportDepositNative: true,
|
|
225
|
-
// },
|
|
170
|
+
[chains_1.sepolia.id]: {
|
|
171
|
+
id: chains_1.sepolia.id,
|
|
172
|
+
name: chains_1.sepolia.name,
|
|
173
|
+
logoUrl: "https://assets.relay.link/icons/square/1/light.png",
|
|
174
|
+
type: chain_1.ChainType.EVM,
|
|
175
|
+
nativeRequired: (0, viem_1.parseEther)("0.00001"),
|
|
176
|
+
canDepositNative: true,
|
|
177
|
+
defaultToken: (0, token_1.getEthToken)(chains_1.sepolia.id),
|
|
178
|
+
nativeToken: (0, token_1.getEthToken)(chains_1.sepolia.id),
|
|
179
|
+
viem: chains_1.sepolia,
|
|
180
|
+
pollingInterval: 1000, // 1 second for Sepolia
|
|
181
|
+
coingeckoName: "sepolia-testnet",
|
|
182
|
+
},
|
|
183
|
+
[chains_1.baseSepolia.id]: {
|
|
184
|
+
id: chains_1.baseSepolia.id,
|
|
185
|
+
name: chains_1.baseSepolia.name,
|
|
186
|
+
logoUrl: "https://assets.relay.link/icons/square/8453/light.png",
|
|
187
|
+
type: chain_1.ChainType.EVM,
|
|
188
|
+
nativeRequired: (0, viem_1.parseEther)("0.00001"),
|
|
189
|
+
canDepositNative: true,
|
|
190
|
+
defaultToken: (0, token_1.getEthToken)(chains_1.baseSepolia.id),
|
|
191
|
+
nativeToken: (0, token_1.getEthToken)(chains_1.baseSepolia.id),
|
|
192
|
+
viem: chains_1.baseSepolia,
|
|
193
|
+
pollingInterval: 1000, // 1 second for Base Sepolia
|
|
194
|
+
coingeckoName: null,
|
|
195
|
+
},
|
|
196
|
+
[chains_1.b3Sepolia.id]: {
|
|
197
|
+
id: chains_1.b3Sepolia.id,
|
|
198
|
+
name: chains_1.b3Sepolia.name,
|
|
199
|
+
logoUrl: "https://assets.relay.link/icons/square/8333/light.png",
|
|
200
|
+
type: chain_1.ChainType.EVM,
|
|
201
|
+
nativeRequired: (0, viem_1.parseEther)("0.00001"),
|
|
202
|
+
canDepositNative: true,
|
|
203
|
+
defaultToken: (0, token_1.getEthToken)(chains_1.b3Sepolia.id),
|
|
204
|
+
nativeToken: (0, token_1.getEthToken)(chains_1.b3Sepolia.id),
|
|
205
|
+
viem: chains_1.b3Sepolia,
|
|
206
|
+
pollingInterval: 1000, // 1 second for B3 Sepolia
|
|
207
|
+
coingeckoName: null,
|
|
208
|
+
},
|
|
209
|
+
// [b4testnet.id]: {
|
|
210
|
+
// id: b4testnet.id,
|
|
211
|
+
// logoUrl: "https://cdn.b3.fun/b4-logo.png",
|
|
212
|
+
// type: ChainType.EVM,
|
|
213
|
+
// viem: b4testnet,
|
|
214
|
+
// requireNativeBalance: parseEther("0.00001"),
|
|
215
|
+
// supportDepositNative: true,
|
|
216
|
+
// },
|
|
226
217
|
};
|
|
227
218
|
exports.SOLANA_MAINNET = {
|
|
228
219
|
id: constants_1.RELAY_SOLANA_MAINNET_CHAIN_ID,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as SimpleHashTypes from "../../global-account/types/simplehash.types";
|
|
2
2
|
export * from "../../global-account/types/simplehash.types";
|
|
3
|
-
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 |
|
|
3
|
+
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 | 84532 | 1993 | null;
|
|
4
4
|
export declare const simpleHashChainToChainName: (chain: number) => "base" | "b3" | "b3-sepolia" | "base-sepolia" | null;
|
|
5
5
|
type SimpleHashRoute = `/v0/nfts/${string}/${string}/${string}` | `/v0/nfts/${string}` | `/v0/nfts/collections/${string}/${string}` | `/v0/nfts/transfers/${string}/${string}` | `/v0/fungibles/assets` | `/v0/native_tokens/balances` | string;
|
|
6
6
|
type RouteReturnType<T extends SimpleHashRoute> = T extends `/v0/nfts/collections/${string}/${string}` ? SimpleHashTypes.SimpleHashNFTResponse : T extends `/v0/nfts/transfers/${string}/${string}` ? {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RELAY_SOLANA_MAINNET_CHAIN_ID } from "../../anyspend/constants/index.js";
|
|
2
2
|
import invariant from "invariant";
|
|
3
3
|
import { createPublicClient, createWalletClient, defineChain, http, parseEther, } from "viem";
|
|
4
|
-
import { abstract, arbitrum, avalanche, b3, base, bsc, mainnet, optimism, polygon } from "viem/chains";
|
|
4
|
+
import { abstract, arbitrum, avalanche, b3, b3Sepolia, base, baseSepolia, bsc, mainnet, optimism, polygon, sepolia, } from "viem/chains";
|
|
5
5
|
import { ChainType } from "../types/chain.js";
|
|
6
6
|
import { getAvaxToken, getBnbToken, getEthToken, getPolToken, getSolanaToken } from "./token.js";
|
|
7
7
|
function getCustomEvmChain(chain, rpcUrl) {
|
|
@@ -28,7 +28,6 @@ export const EVM_MAINNET = {
|
|
|
28
28
|
pollingInterval: 4000, // 4 seconds for Ethereum mainnet
|
|
29
29
|
zapperEnum: "ETHEREUM_MAINNET",
|
|
30
30
|
coingeckoName: "eth",
|
|
31
|
-
wethAddress: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
32
31
|
},
|
|
33
32
|
[arbitrum.id]: {
|
|
34
33
|
id: arbitrum.id,
|
|
@@ -43,7 +42,6 @@ export const EVM_MAINNET = {
|
|
|
43
42
|
pollingInterval: 500, // 500ms for Arbitrum's fast blocks
|
|
44
43
|
zapperEnum: "ARBITRUM_MAINNET",
|
|
45
44
|
coingeckoName: "arbitrum",
|
|
46
|
-
wethAddress: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
|
|
47
45
|
},
|
|
48
46
|
[base.id]: {
|
|
49
47
|
id: base.id,
|
|
@@ -58,7 +56,6 @@ export const EVM_MAINNET = {
|
|
|
58
56
|
pollingInterval: 1000, // 1 second for Base
|
|
59
57
|
zapperEnum: "BASE_MAINNET",
|
|
60
58
|
coingeckoName: "base",
|
|
61
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
62
59
|
},
|
|
63
60
|
[optimism.id]: {
|
|
64
61
|
id: optimism.id,
|
|
@@ -73,7 +70,6 @@ export const EVM_MAINNET = {
|
|
|
73
70
|
pollingInterval: 1000, // 1 second for Optimism
|
|
74
71
|
zapperEnum: "OPTIMISM_MAINNET",
|
|
75
72
|
coingeckoName: "optimism",
|
|
76
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
77
73
|
},
|
|
78
74
|
[polygon.id]: {
|
|
79
75
|
id: polygon.id,
|
|
@@ -88,7 +84,6 @@ export const EVM_MAINNET = {
|
|
|
88
84
|
pollingInterval: 1000, // 1 second for Polygon
|
|
89
85
|
zapperEnum: "POLYGON_MAINNET",
|
|
90
86
|
coingeckoName: "polygon_pos",
|
|
91
|
-
wethAddress: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
|
|
92
87
|
},
|
|
93
88
|
[avalanche.id]: {
|
|
94
89
|
id: avalanche.id,
|
|
@@ -103,7 +98,6 @@ export const EVM_MAINNET = {
|
|
|
103
98
|
pollingInterval: 1000, // 1 second for Avalanche
|
|
104
99
|
zapperEnum: "AVALANCHE_MAINNET",
|
|
105
100
|
coingeckoName: "avax",
|
|
106
|
-
wethAddress: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7",
|
|
107
101
|
},
|
|
108
102
|
[bsc.id]: {
|
|
109
103
|
id: bsc.id,
|
|
@@ -118,7 +112,6 @@ export const EVM_MAINNET = {
|
|
|
118
112
|
pollingInterval: 1000, // 1 second for BSC
|
|
119
113
|
zapperEnum: "BSC_MAINNET",
|
|
120
114
|
coingeckoName: "bsc",
|
|
121
|
-
wethAddress: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
|
|
122
115
|
},
|
|
123
116
|
[b3.id]: {
|
|
124
117
|
id: b3.id,
|
|
@@ -133,7 +126,6 @@ export const EVM_MAINNET = {
|
|
|
133
126
|
pollingInterval: 1000, // 1 second for B3
|
|
134
127
|
zapperEnum: "B3_MAINNET",
|
|
135
128
|
coingeckoName: "b3",
|
|
136
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
137
129
|
},
|
|
138
130
|
[abstract.id]: {
|
|
139
131
|
id: abstract.id,
|
|
@@ -148,57 +140,56 @@ export const EVM_MAINNET = {
|
|
|
148
140
|
pollingInterval: 3000, // 3 seconds for Abstract
|
|
149
141
|
zapperEnum: "ABSTRACT_MAINNET",
|
|
150
142
|
coingeckoName: "abstract",
|
|
151
|
-
wethAddress: "0x3439153eb7af838ad19d56e1571fbd09333c2809",
|
|
152
143
|
},
|
|
153
144
|
};
|
|
154
145
|
export const EVM_TESTNET = {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
// [b4testnet.id]: {
|
|
195
|
-
// id: b4testnet.id,
|
|
196
|
-
// logoUrl: "https://cdn.b3.fun/b4-logo.png",
|
|
197
|
-
// type: ChainType.EVM,
|
|
198
|
-
// viem: b4testnet,
|
|
199
|
-
// requireNativeBalance: parseEther("0.00001"),
|
|
200
|
-
// supportDepositNative: true,
|
|
201
|
-
// },
|
|
146
|
+
[sepolia.id]: {
|
|
147
|
+
id: sepolia.id,
|
|
148
|
+
name: sepolia.name,
|
|
149
|
+
logoUrl: "https://assets.relay.link/icons/square/1/light.png",
|
|
150
|
+
type: ChainType.EVM,
|
|
151
|
+
nativeRequired: parseEther("0.00001"),
|
|
152
|
+
canDepositNative: true,
|
|
153
|
+
defaultToken: getEthToken(sepolia.id),
|
|
154
|
+
nativeToken: getEthToken(sepolia.id),
|
|
155
|
+
viem: sepolia,
|
|
156
|
+
pollingInterval: 1000, // 1 second for Sepolia
|
|
157
|
+
coingeckoName: "sepolia-testnet",
|
|
158
|
+
},
|
|
159
|
+
[baseSepolia.id]: {
|
|
160
|
+
id: baseSepolia.id,
|
|
161
|
+
name: baseSepolia.name,
|
|
162
|
+
logoUrl: "https://assets.relay.link/icons/square/8453/light.png",
|
|
163
|
+
type: ChainType.EVM,
|
|
164
|
+
nativeRequired: parseEther("0.00001"),
|
|
165
|
+
canDepositNative: true,
|
|
166
|
+
defaultToken: getEthToken(baseSepolia.id),
|
|
167
|
+
nativeToken: getEthToken(baseSepolia.id),
|
|
168
|
+
viem: baseSepolia,
|
|
169
|
+
pollingInterval: 1000, // 1 second for Base Sepolia
|
|
170
|
+
coingeckoName: null,
|
|
171
|
+
},
|
|
172
|
+
[b3Sepolia.id]: {
|
|
173
|
+
id: b3Sepolia.id,
|
|
174
|
+
name: b3Sepolia.name,
|
|
175
|
+
logoUrl: "https://assets.relay.link/icons/square/8333/light.png",
|
|
176
|
+
type: ChainType.EVM,
|
|
177
|
+
nativeRequired: parseEther("0.00001"),
|
|
178
|
+
canDepositNative: true,
|
|
179
|
+
defaultToken: getEthToken(b3Sepolia.id),
|
|
180
|
+
nativeToken: getEthToken(b3Sepolia.id),
|
|
181
|
+
viem: b3Sepolia,
|
|
182
|
+
pollingInterval: 1000, // 1 second for B3 Sepolia
|
|
183
|
+
coingeckoName: null,
|
|
184
|
+
},
|
|
185
|
+
// [b4testnet.id]: {
|
|
186
|
+
// id: b4testnet.id,
|
|
187
|
+
// logoUrl: "https://cdn.b3.fun/b4-logo.png",
|
|
188
|
+
// type: ChainType.EVM,
|
|
189
|
+
// viem: b4testnet,
|
|
190
|
+
// requireNativeBalance: parseEther("0.00001"),
|
|
191
|
+
// supportDepositNative: true,
|
|
192
|
+
// },
|
|
202
193
|
};
|
|
203
194
|
export const SOLANA_MAINNET = {
|
|
204
195
|
id: RELAY_SOLANA_MAINNET_CHAIN_ID,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as SimpleHashTypes from "../../global-account/types/simplehash.types";
|
|
2
2
|
export * from "../../global-account/types/simplehash.types";
|
|
3
|
-
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 |
|
|
3
|
+
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 | 84532 | 1993 | null;
|
|
4
4
|
export declare const simpleHashChainToChainName: (chain: number) => "base" | "b3" | "b3-sepolia" | "base-sepolia" | null;
|
|
5
5
|
type SimpleHashRoute = `/v0/nfts/${string}/${string}/${string}` | `/v0/nfts/${string}` | `/v0/nfts/collections/${string}/${string}` | `/v0/nfts/transfers/${string}/${string}` | `/v0/fungibles/assets` | `/v0/native_tokens/balances` | string;
|
|
6
6
|
type RouteReturnType<T extends SimpleHashRoute> = T extends `/v0/nfts/collections/${string}/${string}` ? SimpleHashTypes.SimpleHashNFTResponse : T extends `/v0/nfts/transfers/${string}/${string}` ? {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as SimpleHashTypes from "@b3dotfun/sdk/global-account/types/simplehash.types";
|
|
2
2
|
export * from "@b3dotfun/sdk/global-account/types/simplehash.types";
|
|
3
|
-
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 |
|
|
3
|
+
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 | 84532 | 1993 | null;
|
|
4
4
|
export declare const simpleHashChainToChainName: (chain: number) => "base" | "b3" | "b3-sepolia" | "base-sepolia" | null;
|
|
5
5
|
type SimpleHashRoute = `/v0/nfts/${string}/${string}/${string}` | `/v0/nfts/${string}` | `/v0/nfts/collections/${string}/${string}` | `/v0/nfts/transfers/${string}/${string}` | `/v0/fungibles/assets` | `/v0/native_tokens/balances` | string;
|
|
6
6
|
type RouteReturnType<T extends SimpleHashRoute> = T extends `/v0/nfts/collections/${string}/${string}` ? SimpleHashTypes.SimpleHashNFTResponse : T extends `/v0/nfts/transfers/${string}/${string}` ? {
|
package/package.json
CHANGED
|
@@ -13,7 +13,20 @@ import {
|
|
|
13
13
|
Transport,
|
|
14
14
|
WalletClient,
|
|
15
15
|
} from "viem";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
abstract,
|
|
18
|
+
arbitrum,
|
|
19
|
+
avalanche,
|
|
20
|
+
b3,
|
|
21
|
+
b3Sepolia,
|
|
22
|
+
base,
|
|
23
|
+
baseSepolia,
|
|
24
|
+
bsc,
|
|
25
|
+
mainnet,
|
|
26
|
+
optimism,
|
|
27
|
+
polygon,
|
|
28
|
+
sepolia,
|
|
29
|
+
} from "viem/chains";
|
|
17
30
|
import { ChainType, IBaseChain, IEVMChain, ISolanaChain } from "../types/chain";
|
|
18
31
|
import { getAvaxToken, getBnbToken, getEthToken, getPolToken, getSolanaToken } from "./token";
|
|
19
32
|
|
|
@@ -46,7 +59,6 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
46
59
|
pollingInterval: 4000, // 4 seconds for Ethereum mainnet
|
|
47
60
|
zapperEnum: "ETHEREUM_MAINNET",
|
|
48
61
|
coingeckoName: "eth",
|
|
49
|
-
wethAddress: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
50
62
|
},
|
|
51
63
|
[arbitrum.id]: {
|
|
52
64
|
id: arbitrum.id,
|
|
@@ -64,7 +76,6 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
64
76
|
pollingInterval: 500, // 500ms for Arbitrum's fast blocks
|
|
65
77
|
zapperEnum: "ARBITRUM_MAINNET",
|
|
66
78
|
coingeckoName: "arbitrum",
|
|
67
|
-
wethAddress: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
|
|
68
79
|
},
|
|
69
80
|
[base.id]: {
|
|
70
81
|
id: base.id,
|
|
@@ -82,7 +93,6 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
82
93
|
pollingInterval: 1000, // 1 second for Base
|
|
83
94
|
zapperEnum: "BASE_MAINNET",
|
|
84
95
|
coingeckoName: "base",
|
|
85
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
86
96
|
},
|
|
87
97
|
[optimism.id]: {
|
|
88
98
|
id: optimism.id,
|
|
@@ -100,7 +110,6 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
100
110
|
pollingInterval: 1000, // 1 second for Optimism
|
|
101
111
|
zapperEnum: "OPTIMISM_MAINNET",
|
|
102
112
|
coingeckoName: "optimism",
|
|
103
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
104
113
|
},
|
|
105
114
|
[polygon.id]: {
|
|
106
115
|
id: polygon.id,
|
|
@@ -118,7 +127,6 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
118
127
|
pollingInterval: 1000, // 1 second for Polygon
|
|
119
128
|
zapperEnum: "POLYGON_MAINNET",
|
|
120
129
|
coingeckoName: "polygon_pos",
|
|
121
|
-
wethAddress: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
|
|
122
130
|
},
|
|
123
131
|
[avalanche.id]: {
|
|
124
132
|
id: avalanche.id,
|
|
@@ -133,7 +141,6 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
133
141
|
pollingInterval: 1000, // 1 second for Avalanche
|
|
134
142
|
zapperEnum: "AVALANCHE_MAINNET",
|
|
135
143
|
coingeckoName: "avax",
|
|
136
|
-
wethAddress: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7",
|
|
137
144
|
},
|
|
138
145
|
[bsc.id]: {
|
|
139
146
|
id: bsc.id,
|
|
@@ -148,7 +155,6 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
148
155
|
pollingInterval: 1000, // 1 second for BSC
|
|
149
156
|
zapperEnum: "BSC_MAINNET",
|
|
150
157
|
coingeckoName: "bsc",
|
|
151
|
-
wethAddress: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
|
|
152
158
|
},
|
|
153
159
|
[b3.id]: {
|
|
154
160
|
id: b3.id,
|
|
@@ -166,7 +172,6 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
166
172
|
pollingInterval: 1000, // 1 second for B3
|
|
167
173
|
zapperEnum: "B3_MAINNET",
|
|
168
174
|
coingeckoName: "b3",
|
|
169
|
-
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
170
175
|
},
|
|
171
176
|
[abstract.id]: {
|
|
172
177
|
id: abstract.id,
|
|
@@ -184,50 +189,49 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
|
|
|
184
189
|
pollingInterval: 3000, // 3 seconds for Abstract
|
|
185
190
|
zapperEnum: "ABSTRACT_MAINNET",
|
|
186
191
|
coingeckoName: "abstract",
|
|
187
|
-
wethAddress: "0x3439153eb7af838ad19d56e1571fbd09333c2809",
|
|
188
192
|
},
|
|
189
193
|
};
|
|
190
194
|
|
|
191
195
|
export const EVM_TESTNET: Record<number, IEVMChain> = {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
196
|
+
[sepolia.id]: {
|
|
197
|
+
id: sepolia.id,
|
|
198
|
+
name: sepolia.name,
|
|
199
|
+
logoUrl: "https://assets.relay.link/icons/square/1/light.png",
|
|
200
|
+
type: ChainType.EVM,
|
|
201
|
+
nativeRequired: parseEther("0.00001"),
|
|
202
|
+
canDepositNative: true,
|
|
203
|
+
defaultToken: getEthToken(sepolia.id),
|
|
204
|
+
nativeToken: getEthToken(sepolia.id),
|
|
205
|
+
viem: sepolia,
|
|
206
|
+
pollingInterval: 1000, // 1 second for Sepolia
|
|
207
|
+
coingeckoName: "sepolia-testnet",
|
|
208
|
+
},
|
|
209
|
+
[baseSepolia.id]: {
|
|
210
|
+
id: baseSepolia.id,
|
|
211
|
+
name: baseSepolia.name,
|
|
212
|
+
logoUrl: "https://assets.relay.link/icons/square/8453/light.png",
|
|
213
|
+
type: ChainType.EVM,
|
|
214
|
+
nativeRequired: parseEther("0.00001"),
|
|
215
|
+
canDepositNative: true,
|
|
216
|
+
defaultToken: getEthToken(baseSepolia.id),
|
|
217
|
+
nativeToken: getEthToken(baseSepolia.id),
|
|
218
|
+
viem: baseSepolia,
|
|
219
|
+
pollingInterval: 1000, // 1 second for Base Sepolia
|
|
220
|
+
coingeckoName: null,
|
|
221
|
+
},
|
|
222
|
+
[b3Sepolia.id]: {
|
|
223
|
+
id: b3Sepolia.id,
|
|
224
|
+
name: b3Sepolia.name,
|
|
225
|
+
logoUrl: "https://assets.relay.link/icons/square/8333/light.png",
|
|
226
|
+
type: ChainType.EVM,
|
|
227
|
+
nativeRequired: parseEther("0.00001"),
|
|
228
|
+
canDepositNative: true,
|
|
229
|
+
defaultToken: getEthToken(b3Sepolia.id),
|
|
230
|
+
nativeToken: getEthToken(b3Sepolia.id),
|
|
231
|
+
viem: b3Sepolia,
|
|
232
|
+
pollingInterval: 1000, // 1 second for B3 Sepolia
|
|
233
|
+
coingeckoName: null,
|
|
234
|
+
},
|
|
231
235
|
// [b4testnet.id]: {
|
|
232
236
|
// id: b4testnet.id,
|
|
233
237
|
// logoUrl: "https://cdn.b3.fun/b4-logo.png",
|