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