Developed at DAO Hacks 2022
Live Demo
This project let Punk Cities' players have governance interactions based on the in-real-life places minted as NFTs on the game. Punk Cities' players can join Solapunk DAO and create proposals on their NFTs and get Energy on Chips deposited by the treasury to upgrade other places.
This project uses Punk Cities ERC1155 contract to mint automatically energy and chips once a proposal is approved on the Solapunk Governance contract, it uses Punk Cities NFTs to match proposals to IRL places, we have used LearnWeb3 DAO contract as a template, we used Lens API components on Solarpunks repo for the frontend, we used IPFS to upload the profile and proposal image into IPFS and we have deployed the governance contract on Polygon Mumbai Testnet
📚 Solarpunk DAO / Contract code
- Lens-API latest
- NodeJs >= 14.x
- NextJs 12.x
- Tailwindcss v3.x
- Solidity latest
- Moralis SDK
- EthersJs v5.x
- Apollo client v3.x
- Metamask
Working with Polygon Mumbai testnet contracts (further update to deploy your own contracts)
-
Install Metamask
-
Register accounts in Moralis and NFT.storage
-
Make
.env.local
touch .env.local
add environment variable
NEXT_PUBLIC_NFT_TOKEN="eyJhbGciOi........"
- Install dependencies
yarn install
- Start developmment
yarn dev
- 📱 Open http://localhost:3000 to see the app
Live deployment is made via Github / Vercel integration, as a vercel.app; from master branch.
- Apollo Client
We adapt the Apollo provider to call LensAPI, source.
- React hooks
We develop 2 react hooks for orchreshration, when submitting transaction.