Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SWA-203][PERF] - Improve RPC usage when using multicall #120

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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