Skip to content

Commit

Permalink
Merge pull request #93 from Magnify-Cash/feature/add-base-mainnet
Browse files Browse the repository at this point in the history
Add Base mainnet network with MagnifyCash Protocol contract
  • Loading branch information
halfmoonui authored Sep 13, 2024
2 parents c5867a2 + 11d6738 commit 5599a52
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If you just want to deploy the subgraph and dapp and not the contracts, you can
### frontend
- add deployed contract address in `dapp-v1/wagmi.config.ts`
- add new chain in `dapp-v1/src/wagmi.ts`
- update protocol defaults in `dapp-v1/src/helpers/constants.ts` + `dapp-v1/src/helpers/protocolDefaults`
- update protocol defaults in `dapp-v1/src/helpers/protocolDefaults`
- update alchemy networks in `dapp-v1/src/helpers/utils.ts`

### subgraph
Expand Down
4 changes: 4 additions & 0 deletions dapp-v1/src/helpers/ProtocolDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export const MAGNIFY_CASH_MUMBAI_GRAPH: string =
"https://api.studio.thegraph.com/query/44194/nftyfinance-mumbai/0.0.7";
export const MAGNIFY_CASH_BASE_SEPOLIA_GRAPH: string =
"https://api.ghostlogs.xyz/gg/pub/197bcbbb-5ad1-4bb9-a74d-bb5aeafcbd58/ghostgraph";
export const MAGNIFY_CASH_BASE_MAINNET_GRAPH: string =
"https://api.ghostlogs.xyz/gg/pub/7b5c8b27-bf54-4164-b864-ab667a657975/ghostgraph";
export const MAGNIFY_CASH_SEPOLIA_GRAPH: string =
"https://api.thegraph.com/subgraphs/name/crypto-rizzo/nftyfinance-sepolia";
export const MAGNIFY_CASH_HARDHAT_GRAPH: string =
Expand All @@ -28,6 +30,8 @@ export const getProtocolGraphUrl = (chainId: any) => {
return MAGNIFY_CASH_SEPOLIA_GRAPH;
case 84532:
return MAGNIFY_CASH_BASE_SEPOLIA_GRAPH;
case 8453:
return MAGNIFY_CASH_BASE_MAINNET_GRAPH;
default:
return "";
}
Expand Down
1 change: 1 addition & 0 deletions dapp-v1/src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const getWalletNfts = async ({
80001: Network.MATIC_MUMBAI,
11155111: Network.ETH_SEPOLIA,
84532: Network.BASE_SEPOLIA,
8453: Network.BASE_MAINNET,
};
const alchemy = new Alchemy({
apiKey: import.meta.env.VITE_ALCHEMY_API_KEY,
Expand Down
2 changes: 1 addition & 1 deletion dapp-v1/src/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { base, baseSepolia, hardhat, mainnet } from "wagmi/chains";

// Chains
// Note: First chain in list is default
const chainlist: any = [mainnet, baseSepolia];
const chainlist: any = [mainnet, base, baseSepolia];
if (import.meta.env.DEV) {
chainlist.push(hardhat);
}
Expand Down
1 change: 1 addition & 0 deletions dapp-v1/wagmi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const config = async (): Promise<Config> => {
31337: hardhatAddress, // hardhat
11155111: "0x58b9F441b5c4681e1Ab74ecdE2A01698831BF2c4", // sepolia
84532: "0x9d77E621be4aF95A83c4334e7B51e4440dC2Ed0f", // base sepolia
8453: "0x0A7B6c88Dff89e04662023780e5c9B206c3bD136", // base mainnet
1: "0xA5FE620E35A2f7459e8cb72bd567aBA8f294867a" // eth mainnet
},
},
Expand Down

0 comments on commit 5599a52

Please sign in to comment.