@instadapp/avocado-base 0.0.6 → 0.0.9

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.
@@ -427,7 +427,7 @@
427
427
  </svg>
428
428
 
429
429
  <svg
430
- v-else-if="chain === 250"
430
+ v-else-if="chain == 250"
431
431
  width="24"
432
432
  height="24"
433
433
  viewBox="0 0 24 24"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instadapp/avocado-base",
3
- "version": "0.0.6",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "global.d.ts",
package/utils/network.ts CHANGED
@@ -83,7 +83,7 @@ export const networks: Network[] = [
83
83
  symbol: "ETH",
84
84
  decimals: 18,
85
85
  },
86
- rpcUrls: ["https://mainnet.optimism.io"],
86
+ rpcUrls: ["https://rpc.ankr.com/optimism"],
87
87
  },
88
88
  },
89
89
  {
@@ -169,44 +169,44 @@ export const networks: Network[] = [
169
169
  },
170
170
  },
171
171
  },
172
- {
173
- name: "Aurora",
174
- chainId: 1313161554,
175
- explorerUrl: "https://explorer.mainnet.aurora.dev",
176
- get serverRpcUrl() {
177
- return process.env?.AURORA_RPC_URL || this.params.rpcUrls[0];
178
- },
179
- usdcAddress: "0xB12BFcA5A55806AaF64E99521918A4bf0fC40802",
180
- balanceResolverAddress: "0xdF19Da523DA64bBE82eE0E4DFf00d676A8386474",
181
- params: {
182
- rpcUrls: ["https://mainnet.aurora.dev"],
183
- chainName: "Aurora",
184
- nativeCurrency: {
185
- decimals: 18,
186
- name: "Aurora ETH",
187
- symbol: "AETH",
188
- },
189
- },
190
- },
191
- {
192
- name: "Fantom Opera",
193
- chainId: 250,
194
- explorerUrl: "https://ftmscan.com",
195
- get serverRpcUrl() {
196
- return process.env?.FANTOM_RPC_URL || this.params.rpcUrls[0];
197
- },
198
- usdcAddress: "0x04068da6c83afcfa0e13ba15a6696662335d5b75",
199
- balanceResolverAddress: "0x929376c77a2fb8152375a089a4fccf84ff481479",
200
- params: {
201
- rpcUrls: ["https://rpc.ankr.com/fantom"],
202
- chainName: "Fantom Opera",
203
- nativeCurrency: {
204
- name: "Fantom",
205
- symbol: "FTM",
206
- decimals: 18,
207
- },
208
- },
209
- },
172
+ // {
173
+ // name: "Aurora",
174
+ // chainId: 1313161554,
175
+ // explorerUrl: "https://explorer.mainnet.aurora.dev",
176
+ // get serverRpcUrl() {
177
+ // return process.env?.AURORA_RPC_URL || this.params.rpcUrls[0];
178
+ // },
179
+ // usdcAddress: "0xB12BFcA5A55806AaF64E99521918A4bf0fC40802",
180
+ // balanceResolverAddress: "0xdF19Da523DA64bBE82eE0E4DFf00d676A8386474",
181
+ // params: {
182
+ // rpcUrls: ["https://mainnet.aurora.dev"],
183
+ // chainName: "Aurora",
184
+ // nativeCurrency: {
185
+ // decimals: 18,
186
+ // name: "Aurora ETH",
187
+ // symbol: "AETH",
188
+ // },
189
+ // },
190
+ // },
191
+ // {
192
+ // name: "Fantom",
193
+ // chainId: 250,
194
+ // explorerUrl: "https://ftmscan.com",
195
+ // get serverRpcUrl() {
196
+ // return process.env?.FANTOM_RPC_URL || this.params.rpcUrls[0];
197
+ // },
198
+ // usdcAddress: "0x04068da6c83afcfa0e13ba15a6696662335d5b75",
199
+ // balanceResolverAddress: "0x929376c77a2fb8152375a089a4fccf84ff481479",
200
+ // params: {
201
+ // rpcUrls: ["https://rpc.ankr.com/fantom"],
202
+ // chainName: "Fantom",
203
+ // nativeCurrency: {
204
+ // name: "Fantom",
205
+ // symbol: "FTM",
206
+ // decimals: 18,
207
+ // },
208
+ // },
209
+ // },
210
210
  {
211
211
  name: AVO_PROD_CHAIN_NAME,
212
212
  chainId: AVO_PROD_CHAIN_ID,
@@ -274,13 +274,16 @@ export const RPCMap = networks.reduce((acc, network) => {
274
274
 
275
275
  export const networkIds = networks.map((network) => network.chainId);
276
276
 
277
- const rpcInstances: Record<string, ethers.providers.JsonRpcProvider> = {};
278
- const serverRpcInstances: Record<string, ethers.providers.JsonRpcProvider> = {};
277
+ const rpcInstances: Record<string, ethers.providers.StaticJsonRpcProvider> = {};
278
+ const serverRpcInstances: Record<
279
+ string,
280
+ ethers.providers.StaticJsonRpcProvider
281
+ > = {};
279
282
 
280
283
  export const getServerRpcProvider = (chainId: number | string) => {
281
284
  if (!rpcInstances[chainId]) {
282
285
  const network = networks.find((n) => n.chainId == chainId);
283
- serverRpcInstances[chainId] = new ethers.providers.JsonRpcProvider(
286
+ serverRpcInstances[chainId] = new ethers.providers.StaticJsonRpcProvider(
284
287
  network?.serverRpcUrl
285
288
  );
286
289
  }
@@ -290,7 +293,7 @@ export const getServerRpcProvider = (chainId: number | string) => {
290
293
 
291
294
  export const getRpcProvider = (chainId: number | string) => {
292
295
  if (!rpcInstances[chainId]) {
293
- rpcInstances[chainId] = new ethers.providers.JsonRpcProvider(
296
+ rpcInstances[chainId] = new ethers.providers.StaticJsonRpcProvider(
294
297
  getRpcURLByChainId(Number(chainId))
295
298
  );
296
299
  }