Skip to content

Placeholder repository for developing Poster as a monorepo with all dependencies as submodules.

License

Notifications You must be signed in to change notification settings

onPoster/app-monorepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

██████╗  ██████╗ ███████╗████████╗███████╗██████╗
██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗
██████╔╝██║   ██║███████╗   ██║   █████╗  ██████╔╝
██╔═══╝ ██║   ██║╚════██║   ██║   ██╔══╝  ██╔══██╗
██║     ╚██████╔╝███████║   ██║   ███████╗██║  ██║
╚═╝      ╚═════╝ ╚══════╝   ╚═╝   ╚══════╝╚═╝  ╚═╝
    ___              
   /   |  ____  ____ 
  / /| | / __ \/ __ \
 / ___ |/ /_/ / /_/ /
/_/  |_/ .___/ .___/ 
      /_/   /_/      

An app for showcasing ERC-3722 – Poster. This is a monorepo fetching all components as git submodules, which can be found in our organization.

  1. Poster - An EVM-compatible append-only general purpose smart contract.
  2. Subgraph - An indexer and content parser for Poster powered by TheGraph.
  3. App - A sample UI to showcase ERC-3722 usage as a protocol for social apps.

Setup (cloud)

Launch with Gitpod

The easiest way to setup Poster App is by running it via Gitpod.io. It will automatically spin a cloud instance with all the required commands and dependencies ready to go.

Open in Gitpod

Please wait until all services have started. Afterwards, you will be able to connect to the application via MetaMask in the next step.

Connect to Gitpod's hardhat node with MetaMask

  1. Make sure you have downloaded MetaMask browser extension.
  2. Create a new wallet1 and import the following private key:
ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
  1. Add the hardhat in your MetaMask “Networks” section:
Network Name: Gitpod Hardhat
New RPC URL: <at the bottom of the website, should be something like https://8545-onposter-...3cs.ws-eu27.gitpod.io
Chain Id: 31337

Your balance should be around 9999.95 ETH or so. If you restart the project, you might need to reset your MetaMask account so the transactions come from the first block again, which you can do by going to "Advanced > Reset Account”. IMPORTANT: Only do this on a wallet that has the Hardhat test mnemonic imported, as this will affect ALL your accounts and not the only one the imported one.

Setup (locally)

Clone repository with all submodules

git clone [email protected]:onPoster/app-monorepo.git --recurse-submodules

Install dependencies and run all services

  1. yarn
  2. yarn run:local:node
  3. (In new terminal) yarn deploy:local:contracts
  4. yarn run:local:subgraph
  5. (In new terminal) yarn config:local:subgraph
  6. yarn build:local:subgraph
  7. yarn deploy:local:subgraph
  8. yarn run:local:app

Connect to localhost

  1. Follow the first 2 steps in Connect to Gitpod’s hardhat node with MetaMask section
  2. Add the hardhat in your MetaMask “Networks” section instead of Gitpod's Hardhat:
Network Name: Hardhat
New RPC URL: http://localhost:8545
Chain Id: 31337

Using the application

With the application up and running, go to localhost:3000 or browse the automatic preview pane opened by Gitpod, and connect your wallet with the “Connect wallet” option. This will allow you to submit transactions to your local hardhat node.

Write anything in the text field, and submit the transaction. You will be able to see how the posts are loaded and shortly after your post will show.


Footnotes

  1. You can always simply import Hardhat's demo mnemonic test test test test test test test test test test test junk. Make sure to not send any real digital assets to any of these accounts, as all their private keys are publicly known.

About

Placeholder repository for developing Poster as a monorepo with all dependencies as submodules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published