The DAO dashboard README is reserved for tech savvy users who want to learn more about how is the DAO dashboard implemented and its security. All developer oriented instructions can be found here.
pnpm install- to install dependencies and generate TypeScript typespnpm eth:node- to start hardhat networkpnpm eth:prepare-dao-contracts-for-hardhat- to download the DAO contract sources locally. You need to run this only when running for the first time. The installation of contract dependencies is fragile, it's recommended to use node@16.- (Optional) Modify the pool contract
EPOCH_LENGTHvariable from1 weeksto1 minutesto speed up testing. You can find this constant insidedao-contracts/packages/pool/contracts/StateUtils.sol pnpm eth:deploy-dao-contracts-on-hardhat- to deploy the contracts locally- Copy the
.env.exampleto.env. Make sure thatREACT_APP_NODE_ENVis set todevelopment pnpm start- to start the application on localhost on port 3000pnpm send-to-account <address> --ether 5 --tokens 100to send some ETH and tokens to your account
MetaMask doesn't handle localhost development ideally. Particularly, that the chain is reset after on every
pnpm eth:nodecommand. In case you have problems making a transaction, try to reset the account.
Currently, only hardhat and mainnet networks are supported. If you want to test the application on a different
network, adapt the configuration to your needs.
We use Pinata to deploy the application on IPFS.
Currently, there are no preview builds.
All you need to do is push the code to the production branch. The simplest way is to open a PR from the main branch
and merge. Afterwards, proceed to create a manual IPFS deployment. Full process:
- Open a PR from
maintoproduction, wait for CI to pass and merge - Run
git checkout productionto check out the production branch locally - Run
git pullto pull the latest changes - Populate
.env.production.localwith production secrets - Run
pnpm installto install the latest dependencies - Run
pnpm buildto create the production build - Run
PINATA_JWT=<JWT> pnpm upload-build-to-pinatato upload the build folder to Pinata - Run
docker run --rm -v "$(pwd)/build:/build" ipfs/kubo add --only-hash --recursive /buildto verify the CID hash of the build folder with the deployed hash on Pinata - Verify the uploaded page by clicking on the uploaded "build" row on the UI (differentiated by CID if there are multiple) and make sure it loads - the fonts may look strange, but that's only because of security policies defined by the Pinata preview site and they will work without issues when used via ENS
- Refer to the "Updating the name servers" section below to update the ENS name
The primary way to access the DAO dashboard is through the api3.eth ENS name, which points directly to the IPFS hash.
Then, the user can either use https://api3.eth.limo or connect to mainnet on their MetaMask (or use a browser which
supports resolving .eth domains) and visit api3.eth/. How this works is
documented on IPFS.
Assuming you have a v1 CID (ipfs://bafy...) and access to the api3.eth owner wallet, you can update the api3.eth to
the new version by following these steps:
- Connect to the ENS application with the owner wallet of the api3.eth domain.
- Go to api3.eth "Records" page and edit the "Content Hash".
- Change the value to the new CID. Note, that the ENS app will also handle CID v0 and convert under the hood, but it's better to use the CID v1 directly.
- Execute the TX. Note that it may take a bit of time until
https://api3.eth.limois updated.