-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60fd739
commit ace348e
Showing
10 changed files
with
687 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
{ | ||
"goerli": { | ||
"EIP4824Index": { | ||
"address": "0xd8f49391ba81942d40c26a50f8ca63cdca6fb3da", | ||
"startBlock": 8901481 | ||
"goerli": { | ||
"EIP4824Index": { | ||
"address": "0xd8f49391ba81942d40c26a50f8ca63cdca6fb3da", | ||
"startBlock": 8901481 | ||
} | ||
}, | ||
"gnosis": { | ||
"EIP4824Index": { | ||
"address": "0x8180cbfBFFe59F54BF3Ea5d7DdbaE1232e2bB298", | ||
"startBlock": 27702194 | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
{ | ||
"name": "daostar", | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"build:mainnet": "graph codegen && graph build --network mainnet", | ||
"build:goerli": "graph codegen && graph build --network goerli", | ||
"codegen": "graph codegen", | ||
"build": "graph build", | ||
"deploy:mainnet": "graph deploy --node https://api.thegraph.com/deploy/ ipatka/daostar", | ||
"deploy:goerli": "graph deploy --node https://api.thegraph.com/deploy/ ipatka/daostar-goerli", | ||
"deploy:all": "yarn build:goerli && yarn deploy:goerli && yarn build:mainnet && yarn deploy:mainnet", | ||
"create-local": "graph create --node http://localhost:8020/ ipatka/daostar", | ||
"remove-local": "graph remove --node http://localhost:8020/ ipatka/daostar", | ||
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 ipatka/daostar" | ||
}, | ||
"dependencies": { | ||
"@graphprotocol/graph-cli": "0.29.0", | ||
"@graphprotocol/graph-ts": "0.26.0" | ||
} | ||
"name": "daostar", | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"build:mainnet": "graph codegen && graph build --network mainnet", | ||
"build:goerli": "graph codegen && graph build --network goerli", | ||
"build:gnosis": "graph codegen && graph build --network gnosis", | ||
"codegen": "graph codegen", | ||
"build": "graph build", | ||
"deploy:mainnet": "graph deploy --node https://api.thegraph.com/deploy/ ipatka/daostar", | ||
"deploy:goerli": "graph deploy --node https://api.thegraph.com/deploy/ ipatka/daostar-goerli", | ||
"deploy:gnosis": "graph deploy --node https://api.thegraph.com/deploy/ mrutsavg/daostar-gnosis", | ||
"deploy:all": "yarn build:goerli && yarn deploy:goerli && yarn build:mainnet && yarn deploy:mainnet && yarn build:gnosis && yarn deploy:gnosis", | ||
"create-local": "graph create --node http://localhost:8020/ ipatka/daostar", | ||
"remove-local": "graph remove --node http://localhost:8020/ ipatka/daostar", | ||
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 ipatka/daostar" | ||
}, | ||
"dependencies": { | ||
"@graphprotocol/graph-cli": "0.29.0", | ||
"@graphprotocol/graph-ts": "0.26.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
158 changes: 158 additions & 0 deletions
158
contracts/broadcast/Deploy.s.sol/100/run-1682830367.json
Large diffs are not rendered by default.
Oops, something went wrong.
158 changes: 158 additions & 0 deletions
158
contracts/broadcast/Deploy.s.sol/100/run-1682830396.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,135 @@ | ||
import { Route, Routes } from 'react-router-dom'; | ||
import Homepage from './components/Homepage/Homepage'; | ||
import Register from './components/Register/Register'; | ||
import TopNavigation from './components/TopNavigation/TopNavigation'; | ||
import RegistrationPage from './components/RegistrationPage/RegistrationPage'; | ||
import ExplorePage from './components/ExplorePage/ExplorePage'; | ||
import { Route, Routes } from "react-router-dom"; | ||
import Homepage from "./components/Homepage/Homepage"; | ||
import Register from "./components/Register/Register"; | ||
import TopNavigation from "./components/TopNavigation/TopNavigation"; | ||
import RegistrationPage from "./components/RegistrationPage/RegistrationPage"; | ||
import ExplorePage from "./components/ExplorePage/ExplorePage"; | ||
import { WagmiConfig, createClient } from "wagmi"; | ||
import { ConnectKitProvider, getDefaultClient } from "connectkit"; | ||
import { useQuery } from '@apollo/client' | ||
import { useQuery } from "@apollo/client"; | ||
|
||
import queries from './components/ExplorePage/queries/registrations' | ||
import queries from "./components/ExplorePage/queries/registrations"; | ||
|
||
import './App.css'; | ||
import './bp4-theme.css'; | ||
import Eye from './components/Homepage/Eye/Eye'; | ||
import "./App.css"; | ||
import "./bp4-theme.css"; | ||
import Eye from "./components/Homepage/Eye/Eye"; | ||
|
||
const alchemyId = process.env.ALCHEMY_ID; | ||
|
||
const client = createClient( | ||
getDefaultClient({ | ||
appName: "Your App Name", | ||
alchemyId, | ||
}), | ||
getDefaultClient({ | ||
appName: "Your App Name", | ||
alchemyId, | ||
}) | ||
); | ||
|
||
function App() { | ||
const { loading, error, data: mainnetData } = useQuery(queries.REGISTRATIONS, { context: { apiName: 'mainnet' }, variables: { id: 'mainnet' } }) | ||
const goerliRes = useQuery(queries.REGISTRATIONS, { context: { apiName: 'goerli' }, variables: { id: 'goerli' } }) | ||
const { loading: goerliLoading, error: goerliError, data: goerliData } = goerliRes | ||
console.log({ mainnetData, goerliData }) | ||
const { | ||
loading, | ||
error, | ||
data: mainnetData, | ||
} = useQuery(queries.REGISTRATIONS, { | ||
context: { apiName: "mainnet" }, | ||
variables: { id: "mainnet" }, | ||
}); | ||
const goerliRes = useQuery(queries.REGISTRATIONS, { | ||
context: { apiName: "goerli" }, | ||
variables: { id: "goerli" }, | ||
}); | ||
const { | ||
loading: goerliLoading, | ||
error: goerliError, | ||
data: goerliData, | ||
} = goerliRes; | ||
const gnosisRes = useQuery(queries.REGISTRATIONS, { | ||
context: { apiName: "gnosis" }, | ||
variables: { id: "gnosis" }, | ||
}); | ||
const { | ||
loading: gnosisLoading, | ||
error: gnosisError, | ||
data: gnosisData, | ||
} = gnosisRes; | ||
console.log({ mainnetData, goerliData, gnosisData }); | ||
|
||
if (error || goerliError) return 'error' | ||
if (loading || goerliLoading) return 'loading...' | ||
const mainnetRegistrations = mainnetData?.registrationNetwork?.registrations || [] | ||
const goerliRegistrations = goerliData?.registrationNetwork?.registrations || [] | ||
const registrationInstances = mainnetRegistrations.concat(goerliRegistrations) | ||
if (error || goerliError || gnosisError) return "error"; | ||
if (loading || goerliLoading || gnosisLoading) return "loading..."; | ||
const mainnetRegistrations = | ||
mainnetData?.registrationNetwork?.registrations || []; | ||
const goerliRegistrations = | ||
goerliData?.registrationNetwork?.registrations || []; | ||
const gnosisRegistrations = | ||
gnosisData?.registrationNetwork?.registrations || []; | ||
const registrationInstances = mainnetRegistrations.concat( | ||
goerliRegistrations, | ||
gnosisRegistrations | ||
); | ||
|
||
console.log({ registrationInstances }) | ||
console.log({ registrationInstances }); | ||
|
||
return ( | ||
<WagmiConfig client={client}> | ||
<ConnectKitProvider | ||
mode='dark' | ||
customTheme={{ | ||
"--ck-font-family": "IBM Plex Mono, 'Roboto Condensed', 'Roboto', 'Arial', sans-serif" | ||
}} | ||
options={{ | ||
hideNoWalletCTA: true, | ||
walletConnectName: 'WalletConnect', | ||
showAvatar: false, | ||
hideQuestionMarkCTA: true | ||
}} | ||
> | ||
<div className="App"> | ||
|
||
<TopNavigation /> | ||
{/* <Homepage /> */} | ||
return ( | ||
<WagmiConfig client={client}> | ||
<ConnectKitProvider | ||
mode="dark" | ||
customTheme={{ | ||
"--ck-font-family": | ||
"IBM Plex Mono, 'Roboto Condensed', 'Roboto', 'Arial', sans-serif", | ||
}} | ||
options={{ | ||
hideNoWalletCTA: true, | ||
walletConnectName: "WalletConnect", | ||
showAvatar: false, | ||
hideQuestionMarkCTA: true, | ||
}} | ||
> | ||
<div className="App"> | ||
<TopNavigation /> | ||
{/* <Homepage /> */} | ||
|
||
<Routes> | ||
<Route path='/eye' element={<Eye />} /> | ||
<Route path='/register' element={<Register />} /> | ||
<Route path='/registration/:regID' element={<RegistrationPage />} /> | ||
<Route path='/explore' element={<ExplorePage registrationInstances={registrationInstances} />} /> | ||
<Route path='/' element={<Homepage registrationInstances={registrationInstances} />} /> | ||
<Route path='/creative-universe' component={() => { | ||
window.location.href = 'https://github.com/metagov/daostar/discussions/41'; | ||
return null; | ||
}}/> | ||
</Routes> | ||
</div> | ||
|
||
</ConnectKitProvider> | ||
</WagmiConfig> | ||
); | ||
<Routes> | ||
<Route path="/eye" element={<Eye />} /> | ||
<Route path="/register" element={<Register />} /> | ||
<Route | ||
path="/registration/:regID" | ||
element={<RegistrationPage />} | ||
/> | ||
<Route | ||
path="/explore" | ||
element={ | ||
<ExplorePage | ||
registrationInstances={ | ||
registrationInstances | ||
} | ||
/> | ||
} | ||
/> | ||
<Route | ||
path="/" | ||
element={ | ||
<Homepage | ||
registrationInstances={ | ||
registrationInstances | ||
} | ||
/> | ||
} | ||
/> | ||
<Route | ||
path="/creative-universe" | ||
component={() => { | ||
window.location.href = | ||
"https://github.com/metagov/daostar/discussions/41"; | ||
return null; | ||
}} | ||
/> | ||
</Routes> | ||
</div> | ||
</ConnectKitProvider> | ||
</WagmiConfig> | ||
); | ||
} | ||
|
||
if (window.location.path === "creative-universe"){ | ||
window.location = "https://github.com/metagov/daostar/discussions/41" | ||
if (window.location.path === "creative-universe") { | ||
window.location = "https://github.com/metagov/daostar/discussions/41"; | ||
} | ||
|
||
export default App; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters