A decentralized social network service (SNS) where data is stored on the blockchain
Build a blockchain locally and deploy the contract to it. In addition, launch a web application that will be the client.
make init
make start-local-blockchain
make deploy-local
make migrate-client-web
Create .env file in the client-web directory
cd client/web
touch .env
Set the address of the deployed contract on the localhost
REACT_APP_LOCAL_CONTRACT_ADDRESS=<deployed-contract-address-on-localhost>
make start-client-web
You can use dSNS on localhost:3000!!
Create .env file
cd blockchain
touch .env
Set environmental variables
MUMBAI_URL=https://polygon-mumbai.g.alchemy.com/v2/<YOUR ALCHEMY KEY>
PRIVATE_KEY=abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
- MUMBAI_URL: api endpoints of the infrastructure you are deploying to (e.g. Alchemy, infura, etc.)
If you have not created it yet, click here. - PRIVATE_KEY: your private key of the wallet (Never disclose this information to the public!!)
Deployment costs gas, so you need to have some amount of MATIC in advance. mumbai's MATIC is distributed here
make deploy-mumbai