Environment Setup (Developers)
π§βπ» 1. Prerequisites
To work with the OmniSocial codebase locally, make sure you have the following installed:
Node.js v18+ (https://nodejs.org)
Yarn (https://yarnpkg.com) or npm
Git (https://git-scm.com)
Hardhat (for contract development)
Foundry (optional, for Solidity-based testing)
The Graph CLI (optional, for subgraph development)
Docker (optional, for running local nodes or IPFS)
π¦ 2. Clone the Repository
git clone https://github.com/OmniSocialBlockchain/dapp.git
cd dappπ 3. Install Dependencies
Install all project dependencies using Yarn (preferred) or npm:
yarn install
# or
npm installβοΈ 4. Configure Environment Variables
Copy the example environment file and fill in the required variables:
Set your PRIVATE_KEY, RPC URLs, and any API keys (e.g. IPFS, Alchemy).
For local testnets or custom deployments, you may configure a localhost network in hardhat.config.ts.
π§ 5. Compile Smart Contracts
Compile the smart contracts:
You can also test them:
π 6. Run the Local Frontend
Then open http://localhost:3000 in your browser.
The app connects to testnets or local networks based on your wallet and .env config.
π§ͺ 7. Deploy Contracts (Optional)
If you want to deploy contracts locally or to a testnet:
Supported networks are configured in hardhat.config.ts (e.g., localhost, polygonZkEvmTestnet).
π 8. Optional Tools & Features
π§ Subgraph Development: Setup The Graph locally or deploy to a hosted service to index on-chain events. Subgraph config is in
/subgraph.π§° TypeChain Support: Auto-generates TypeScript types from Solidity contracts for safer integration.
π§ͺ Simulated Transaction Testing: Use
useTransactionSimulation.tsand the security hooks infeatures/security/.
β 9. Verify Setup
After setup, you should be able to:
Connect your wallet to the app
Mint a test Persona
View contract interactions in the browser console
Run unit tests for contracts
Explore subgraph data (if enabled)
Last updated
Was this helpful?
