@instadapp/avocado-base 0.0.47 → 0.0.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",
package/utils/network.ts CHANGED
@@ -175,7 +175,6 @@ export const networks: Network[] = [
175
175
  params: {
176
176
  chainName: "polygon zkEVM",
177
177
  rpcUrls: ["https://zkevm-rpc.com"],
178
-
179
178
  nativeCurrency: {
180
179
  name: "Ethereum",
181
180
  symbol: "ETH",
@@ -225,6 +224,26 @@ export const networks: Network[] = [
225
224
  decimals: 18,
226
225
  },
227
226
  },
227
+ },
228
+ {
229
+ name: 'Base',
230
+ chainId: 8453,
231
+ color: '#1E2024',
232
+ explorerUrl: 'https://basescan.org',
233
+ get serverRpcUrl() {
234
+ return process.env?.BASE_RPC_URL || this.params.rpcUrls[0];
235
+ },
236
+ usdcAddress: '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA',
237
+ balanceResolverAddress: '0x23c8EAb8a4373dD16b0947Ebe8bf76Ff7A49d13C',
238
+ params: {
239
+ rpcUrls: ['https://rpc.ankr.com/base'],
240
+ chainName: "Base",
241
+ nativeCurrency: {
242
+ name: "Ethereum",
243
+ symbol: "ETH",
244
+ decimals: 18,
245
+ },
246
+ }
228
247
  },
229
248
  {
230
249
  name: AVO_PROD_CHAIN_NAME,
@@ -281,6 +300,7 @@ export const chainUsdcAddresses = [
281
300
  { chainId: 43114, address: '0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664' },
282
301
  { chainId: 1101, address: '0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035' },
283
302
  { chainId: 1313161554, address: '0xB12BFcA5A55806AaF64E99521918A4bf0fC40802' },
303
+ { chainId: 8453, address: '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA'}
284
304
  ];
285
305
 
286
306
  export const getNetworkByChainId = (
package/utils/services.ts CHANGED
@@ -6,7 +6,7 @@ export const fetchTokenByAddress = async (
6
6
  if (!address || !chainId) return null;
7
7
 
8
8
  if (tokens?.length) {
9
- const token = tokens.find((token) => token.address?.toLocaleLowerCase() === address?.toLocaleLowerCase() && (token.chain_id || token?.chainId) == chainId);
9
+ const token = tokens.find((token) => token.address?.toLocaleLowerCase() === address?.toLocaleLowerCase() && token.chain_id == chainId);
10
10
  if (token) return token;
11
11
  }
12
12
 
package/utils/utils.d.ts CHANGED
@@ -11,6 +11,7 @@ declare global {
11
11
  | 250
12
12
  | 634
13
13
  | 1313161554
14
+ | 8453
14
15
  | 63400;
15
16
 
16
17
  type ISlackMessageType = "danger" | "error" | "success" | "banner";