Note
The project is under active development.
A native Ethereum protocol for following and tagging Ethereum accounts.
This repo demonstrates how to build state from contract history according to Ethereum Follow Protocol rules.
Set values for base, optimism and etherum rpc urls and the address to recover history for. You can use a local rpc or a provider like Alchemy or Infura.
To install the project using Bun, follow these steps:
-
Install Bun: If you haven't already, install Bun by running:
curl -fsSL https://bun.sh/install | bash
-
Clone the Repository: Clone the project repository to your local machine:
git clone https://github.com/ethereumfollowprotocol/onchain.git cd onchain
-
Install Dependencies: Use Bun to install the project dependencies:
bun install
-
Setup Environment Variables: Copy the .env-example file to .env and enter rpc urls and user address
cp .env-example .env
-
Build EFP State: fetch, parse and store EFP onchain events:
bun run build-state
-
Get Following By Contract Calls: Get following data using contract calls:
bun run following-contract
-
Get Following using built state: Get following data using locally recovered historical state:
bun run following-history
-
Get Followers using built state: Get follower data using locally recovered historical state:
bun run followers-history