eth-scriptionssm.mov
This repository contains the EthScriptions Indexer, a tool designed to index Ethereum transactions specifically for 'ethscriptions', using the Squid SDK. It features functionality to decode transaction inputs, verify Data URIs for correctness and uniqueness, and efficiently manage and query indexed data.
-
Transaction Decoding:
- Decodes Ethereum transaction inputs to extract relevant data.
-
Data URI Verification:
- Validates the format and uniqueness of Data URIs in the transactions.
-
Uniqueness Check:
- Ensures that each inscription is unique within the blockchain context.
# 0. Install @subsquid/cli a.k.a. the sqd command globally
npm i -g @subsquid/cli
# 1. Retrieve the template
git clone https://github.com/[your-username]/eth-scriptions.git
cd eth-scriptions
# 2. Install dependencies
npm ci
# 3. Start a Postgres database container and detach
sqd up
# 4. Build the squid
sqd build
# 5. Start both the squid processor and the GraphQL server
sqd run .
A GraphiQL playground will be available at localhost:4350/graphql.
You can also start squid services one by one:
sqd process
sqd serve
Squid tools assume a certain project layout:
- All compiled js files must reside in
lib
and all TypeScript sources insrc
. The layout oflib
must reflectsrc
. - All TypeORM classes must be exported by
src/model/index.ts
(lib/model
module). - Database schema must be defined in
schema.graphql
. - Database migrations must reside in
db/migrations
and must be plain js files. sqd(1)
andsquid-*(1)
executables consult.env
file for environment variables.