❓ To know what this project aims to be, read the about page.
📥 If you wanna collaborate, here are the pending development tasks on this Trello board
PunkSociety's builds:
- PunkSociety (social media)
- BasedShop (ecommerce)
⚙️ Currently built using Scaffold-ETH 2, Foundry, Pinata, Vercel, NextJS, RainbowKit, Wagmi, Viem, and Typescript.
🏦 Considering using protocols: Circle USDC, The Graph, Chainlink.
📜 Considering using contracts: ERC721, Ownable and Upgradeable from Solady for contract ownership.
🔗 To be deployed on EVM compatible chains.
- Node (>= v18.17)
- Yarn (v1 or v2+)
- Git
- Foundry
To get started follow the steps below:
- Open a terminal and run this commands to clone this repo and install dependencies:
git clone https://github.com/luloxi/PunkSociety.git
cd PunkSociety
yarn install
-
Rename the
.env.exampleto.envin thepackages/nextjsfolder. For each variable, follow the instructions above the variable. -
Run this command to start your NextJS app:
yarn start
Visit your app on: http://localhost:3000.
NOTE: You can interact with your smart contracts on
http://localhost:3000/debugand see a local block explorer onhttp://localhost:3000/blockexplorer
- Open a second terminal, navigate to
PunkSocietyand run this command to start a local chain:
yarn chain
NOTE: To test using your own Avalanche L1, follow this instructions.
- Duplicate and rename
packages/foundry/.env.exampletopackages/foundry/.env. Fill theDEPLOYER_PRIVATE_KEYwith the private key of the account you want to use to deploy the contracts. Remember to append0xat the beginning of the private key.
NOTE:
ETHERSCAN_API_KEYandALCHEMY_API_KEYare not required until you deploy to a live EVM like Avalanche, Base, Ethereum, etc.
- Open a terminal, navigate to
PunkSocietyand run this command to deploy the contracts:
yarn deploy
NOTE: Contracts are located in
packages/foundry/contractsand can be modified to suit your needs. Theyarn deploycommand uses the deploy script located inpackages/foundry/script/Deploy.s.solto deploy the contract to the network. You can also customize the deploy script.
NOTE 2: To deploy to a different network, you can run
yarn deploy --network <network-name>. For example, to deploy to the Ethereum network, you can runyarn deploy --network ethereum.
- Go to
packages/nextjs/scaffold.config.tsand change thetargetNetworksto[chains.foundry].