This repo contains the website for daostar.org as well as reference implementations, schemas, and other assets related to DAO standards, DAO Improvement Proposals (DAOIPs), including but not limited to EIP-4824: Common Interfaces for DAOs.
It is maintained by DAOstar One with support from Metagov.
These contracts are used to register on DAOstar website.
- EIP4824Index
- Contract: 0x4f2c9028fE7107d9f1A8a9CFf34aa2d3F28600fa
- TheGraph: daostar
- Version: 1.0
- EIP4824Registration
- Contract: 0x2F8E0Eb8969715BdA8bf6e9b768850A1581fB358
- Version: 1.0
- Contract: 0x58E593f2100Fa06dA34935C1B35Fd78Aaa32479a ( Deprecated )
- Version: 0.0
- EIP4824RegistrationSummoner
- Contract: 0x2Dac5DBbF1D024c1E0D9c92D3AeDa7618e15aDd7
- Version: 1.0
- Contract: 0x37dF3fC47C1c3A2acaFd2Dad9c1C00090a8655Bc ( Deprecated )
- Version: 0.0
- EIP4824Index:
- Contract: 0x18CbB356cd64193b1a0CA49911fc72CB3D02a5E4
- TheGraph: daostar-optimism
- EIP4824Registration
- Contract: 0x65D17d117C190f7A4cc784b56a17E3f7Edde5762
- Version: 1.0.0
- EIP4824RegistrationSummoner
- Contract: 0x5C0340AD34f7284f9272E784FF76638E8dDb5dE4
- Version: 1.0.0
- EIP4824Index:
- Contract: 0xA7A2948Bad8d439d714ac72Dee4A1ac879745244
- TheGraph: daostar-goerli
- EIP4824Registration
- Contract: 0xAEefc45ad77242788FEE3e615642cD9c2c1261A8
- Version: N/A
- EIP4824RegistrationSummoner
- Contract: 0x3271B3479f7485DAdB2bD5FFF43EEb4367B1a91a
- Version: N/A
- EIP4824Index:
- Contract: 0x9aff4e5e7a7ae449b89162ef4798b2bb60dc92c0
- TheGraph: daostar-optimism-goerli
- EIP4824Registration
- Contract: 0xc9cb7ecedd8a6d544348512a53ff52abf4d9d863
- Version: 1.0.0
- EIP4824RegistrationSummoner
- Contract: 0x45E81552DEC1F57c18E3cbd69549252624b96D98
- Version: 1.0.0
- EIP4824Index:
- Contract: 0x18CbB356cd64193b1a0CA49911fc72CB3D02a5E4
- TheGraph: daostar-arbitrum-goerli
- EIP4824Registration
- Contract: 0x65D17d117C190f7A4cc784b56a17E3f7Edde5762
- Version: 1.0.0
- EIP4824RegistrationSummoner
- Contract: 0x5C0340AD34f7284f9272E784FF76638E8dDb5dE4
- Version: 1.0.0
- EIP4824Index:
- Contract: 0x18CbB356cd64193b1a0CA49911fc72CB3D02a5E4
- TheGraph: daostar-bnb-bruno
- EIP4824Registration
- Contract: 0x65D17d117C190f7A4cc784b56a17E3f7Edde5762
- Version: 1.0.0
- EIP4824RegistrationSummoner
- Contract: 0x5C0340AD34f7284f9272E784FF76638E8dDb5dE4
- Version: 1.0.0
Deploy Registration.sol and get three contract addresses
Reference folder: https://github.com/metagov/daostar/tree/main/contracts/src
For example:
OP Mainnet
EIP4824Index EIP4824Registration EIP4824RegistrationSummoner
Prerequisites for this step:
- Have your The Graph Auth Token initialized
- Create a subgraph for the new netowork via The Graph Dashboard
- Add network and contract address of EIP4824Index in this file
Reference file: https://github.com/metagov/daostar/blob/main/Implementations/Subgraph/daostar/networks.json
"optimism": {
"EIP4824Index": {
"address": "0x18CbB356cd64193b1a0CA49911fc72CB3D02a5E4",
"startBlock": 109109991
}
}
- Add and run build commands
"build:optimism": "graph codegen && graph build --network optimism",
- Add and run deploy command
"deploy:optimism": "graph deploy --node https://api.thegraph.com/deploy/ crazyyuan/daostar-optimism",
- Get your https api query endpoint url
In this case,
https://api.thegraph.com/subgraphs/name/crazyyuan/daostar-optimism
- Add API URL
Reference file: https://github.com/metagov/daostar/blob/main/daostar-website/src/index.js#L36
const client = new ApolloClient({
link: ApolloLink.from([
new MultiAPILink({
endpoints: {
goerli: `https://api.thegraph.com/subgraphs/name/ipatka/daostar-goerli`,
optimismGoerli: `https://api.thegraph.com/subgraphs/name/rashmi-278/daostar-optimism-goerli`,
mainnet: `https://api.thegraph.com/subgraphs/name/ipatka/daostar`,
gnosis: `https://api.thegraph.com/subgraphs/name/rashmi-278/daostar-gnosis`,
arbitrumGoerli: `https://api.thegraph.com/subgraphs/name/crazyyuan/daostar-arbitrum-goerli`,
chapel:`https://api.thegraph.com/subgraphs/name/crazyyuan/daostar-bnb-bruno`,
optimism: `https://api.thegraph.com/subgraphs/name/crazyyuan/daostar-optimism`
},
// defaultEndpoint: 'https://api.thegraph.com/subgraphs/name/ipatka/daostar',
httpSuffix: "",
createHttpLink: createHttpLink,
}),
]),
cache: new InMemoryCache({}),
});
- Set up queries
Reference file: https://github.com/metagov/daostar/blob/main/daostar-website/src/App.js
const optimismRes = useQuery(queries.REGISTRATIONS, {
context: { apiName: "optimism" },
variables: { id: "optimism" },
});
const {
loading: optimismLoading,
error: optimismError,
data: optimismData,
} = optimismRes;
if (error || goerliError || optimismGoerliError || arbitrumGoerliError || chapelError || optimismError ) {
...
console.error("Optimism Error" + optimismError)
};
if (loading || goerliLoading || gnosisLoading || optimismGoerliLoading || arbitrumGoerliLoading || chapelLoading || optimismLoading) return "loading...";
const optimismRegistrations =
optimismData?.registrationNetwork?.registrations || [];
const allRegistrationInstances = mainnetRegistrations.concat(
...
optimismRegistrations
);
- Add RegistrationSummoner address here
Reference file: https://github.com/metagov/daostar/blob/main/daostar-website/src/components/Register/RegistrationReceived/RegistrationReceived.js
const factoryContracts = {
...
optimism: `0x5C0340AD34f7284f9272E784FF76638E8dDb5dE4`,
};
- Add network ID and labels
Reference file: https://github.com/metagov/daostar/blob/main/daostar-website/src/components/Register/RegistrationForm/RegistrationForm.js#L13
const networkIds = {
...
optimism:10
}
const EthNetworksSelect = (
<HTMLSelect
style={{ minWidth: 140 }}
iconProps={{ icon: 'caret-down', color: '#fff' }}
value={daoContractNetwork}
onChange={onChangeDaoContractNetwork}
options={[
{ label: 'Mainnet', value: 'mainnet' },
{ label: 'Optimism', value: 'optimism'},
...
]}
/>
)
- Make sure build is successful
npm run build
Now you can commit and publish the changes!
All code in this repository is licensed under the MIT License, except for published standards, which are released to the public domain under CC0.