Skip to content

Commit

Permalink
perf(STK-203): Improve RPC usage when using multicall (#120)
Browse files Browse the repository at this point in the history
* perf(STK-203): use a provider and multicall interface instead WAGMI multicall for user balances
  • Loading branch information
ElRodrigote authored and berteotti committed Nov 9, 2023
1 parent 0abab43 commit f6c5440
Show file tree
Hide file tree
Showing 10 changed files with 246 additions and 220 deletions.
5 changes: 3 additions & 2 deletions packages/app/components/strategies/constants.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FREQUENCY_OPTIONS } from "@/models/stack";
import { gnosisTokens, mainnetTokens } from "@/models/token";
import { Strategy } from "@/contexts";
import { ChainId } from "@stackly/sdk";

type ChainStrategy = {
label: string;
Expand All @@ -19,7 +20,7 @@ export const FREQUENCY_LABEL = {
};

export const STRATEGY_CATEGORIES: { [chainId: number]: ChainStrategies } = {
1: {
[ChainId.ETHEREUM]: {
popular: {
label: "Popular Strategies",
strategies: [
Expand Down Expand Up @@ -62,7 +63,7 @@ export const STRATEGY_CATEGORIES: { [chainId: number]: ChainStrategies } = {
],
},
},
100: {
[ChainId.GNOSIS]: {
popular: {
label: "Popular Strategies",
strategies: [
Expand Down
5 changes: 3 additions & 2 deletions packages/app/components/token-picker/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ import {
mainnetTokens,
TokenFromTokenlist,
} from "@/models/token";
import { ChainId } from "@stackly/sdk";

export const TOKEN_PICKER_COMMON_TOKENS: {
[chainId: number]: TokenFromTokenlist[];
} = {
1: [
[ChainId.ETHEREUM]: [
mainnetTokens.USDC,
mainnetTokens.WETH,
mainnetTokens.WBTC,
mainnetTokens.RETH,
],
100: [
[ChainId.GNOSIS]: [
gnosisTokens.GNO,
gnosisTokens.SWAPR,
gnosisTokens.WETH,
Expand Down
9 changes: 5 additions & 4 deletions packages/app/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// RPC endpoints

export const RPC_GNOSIS =
process.env.RPC_GNOSIS ?? "https://rpc.gnosis.gateway.fm";
import { ChainId } from "@stackly/sdk";

export const RPC_MAINNET =
process.env.RPC_MAINNET ?? "https://eth.meowrpc.com/";
export const RPC_LIST: { [chainId: number]: string } = {
[ChainId.ETHEREUM]: process.env.RPC_MAINNET ?? "https://eth.meowrpc.com/",
[ChainId.GNOSIS]: process.env.RPC_GNOSIS ?? "https://rpc.gnosis.gateway.fm",
};

// App URLs

Expand Down
Loading

0 comments on commit f6c5440

Please sign in to comment.