Initial commit from Create Eth App

This commit is contained in:
StockiP
2022-10-26 07:52:17 +02:00
commit 7f3291b602
33 changed files with 17728 additions and 0 deletions

37
packages/react-app/src/index.js vendored Normal file
View File

@@ -0,0 +1,37 @@
import "./index.css";
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
import { DAppProvider, Mainnet } from "@usedapp/core";
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
// IMPORTANT, PLEASE READ
// To avoid disruptions in your app, change this to your own Infura project id.
// https://infura.io/register
const INFURA_PROJECT_ID = "529670718fd74cd2a041466303daecd7";
const config = {
readOnlyChainId: Mainnet.chainId,
readOnlyUrls: {
[Mainnet.chainId]: "https://mainnet.infura.io/v3/" + INFURA_PROJECT_ID,
},
}
// You should replace this url with your own and put it into a .env file
// See all subgraphs: https://thegraph.com/explorer/
const client = new ApolloClient({
cache: new InMemoryCache(),
uri: "https://api.thegraph.com/subgraphs/name/paulrberg/create-eth-app",
});
ReactDOM.render(
<React.StrictMode>
<DAppProvider config={config}>
<ApolloProvider client={client}>
<App />
</ApolloProvider>
</DAppProvider>
</React.StrictMode>,
document.getElementById("root"),
);