GithubHelp home page GithubHelp logo

adshao / ordinals-indexer Goto Github PK

View Code? Open in Web Editor NEW
51.0 2.0 15.0 329 KB

API server and index synchronizer for ordinals inscriptions

License: MIT License

Dockerfile 0.24% Makefile 2.11% Go 97.65%
brc-20 brc-721 ordinals

ordinals-indexer's Introduction

Ordinals Indexer

Ordinals Indexer is an API server and index synchronizer for ordinals inscriptions. It provides a robust and efficient way to interact with and manage ordinals inscriptions data.

Features

  • Implements the BRC-721 protocol.
  • Easily parse inscription content for other protocols, including ordinals domains and BRC NFTs.
  • Provides a robust and efficient way to interact with and manage ordinals inscriptions data.

Requirements

  • It's recommended to run your own ordinals server before using this indexer.
  • Create a database for the indexer to store data.

Getting Started

Here are the steps to setup and run Ordinals Indexer:

Init

Initialize the project:

make init

Configuration

Copy the configs/config_example.yaml to configs/config.yaml and modify the configuration file as needed.

Migrate Database

Use atlas to apply the database schema to your database.

atlas migrate apply --dir 'file://internal/data/ent/migrate/migrations' --url 'postgres://test:test@localhost:5432/test'

Note: replace the database URL with your own. You should migrate the database every time there is a new migration.

Generate Code

Generate code for APIs, configs and database:

make all

Build Binary

Build the binaries for the API server and syncer:

make build

API Server

Run API server to start the indexer:

./bin/server -conf configs/config.yaml

Syncer

Run syncer to start syncing data with the ordinals server:

./bin/sync -conf configs/config.yaml

Documentation

You can find the complete API documentation here.

Contributing

We welcome contributions from the community! Please check out our Contributing Guide for more details.

Support

If you encounter any issues or have questions, please open an issue on this GitHub.

License

Ordinals Indexer is licensed under the MIT License.


Let me know if you'd like me to fill in more specific details, or if there's any additional information you'd like me to include.

ordinals-indexer's People

Contributors

adshao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ordinals-indexer's Issues

make all error

If i run make all i get the following error:

╰─ make all                                                                                                                                                     ─╯
make api
make[1]: Entering directory '/home/user/Projects/ordinals/OrdinalsIndexer'
protoc --proto_path=./api \
       --proto_path=./third_party \
 	       --go_out=paths=source_relative:./api \
 	       --go-http_out=paths=source_relative:./api \
 	       --go-grpc_out=paths=source_relative:./api \
       --openapi_out=fq_schema_naming=true,default_response=false,naming=proto:. \
	   --experimental_allow_proto3_optional \
       api/token/v1/token.proto api/token/v1/error_reason.proto api/collection/v1/collection.proto api/collection/v1/error_reason.proto api/inscription/v1/inscription.proto api/inscription/v1/error_reason.proto
make[1]: Leaving directory '/home/user/Projects/ordinals/OrdinalsIndexer'
make errors
make[1]: Entering directory '/home/user/Projects/ordinals/OrdinalsIndexer'
protoc --proto_path=. \
         --proto_path=./third_party \
         --go_out=paths=source_relative:. \
         --go-errors_out=paths=source_relative:. \
	 --experimental_allow_proto3_optional \
         api/token/v1/token.proto api/token/v1/error_reason.proto api/collection/v1/collection.proto api/collection/v1/error_reason.proto api/inscription/v1/inscription.proto api/inscription/v1/error_reason.proto
make[1]: Leaving directory '/home/user/Projects/ordinals/OrdinalsIndexer'
make config
make[1]: Entering directory '/home/user/Projects/ordinals/OrdinalsIndexer'
protoc --proto_path=./internal \
       --proto_path=./third_party \
 	       --go_out=paths=source_relative:./internal \
       internal/conf/conf.proto
make[1]: Leaving directory '/home/user/Projects/ordinals/OrdinalsIndexer'
make db
make[1]: Entering directory '/home/user/Projects/ordinals/OrdinalsIndexer'
go run -mod=mod entgo.io/ent/cmd/ent generate --feature sql/upsert --target ./internal/data/ent ./internal/data/ent/schema
panic: template: decode.tmpl:19: unexpected " " in in {{continue}}

goroutine 1 [running]:
entgo.io/ent/entc/gen.MustParse(...)
	/home/user/go/pkg/mod/entgo.io/[email protected]/entc/gen/template.go:339
entgo.io/ent/entc/gen.initTemplates()
	/home/user/go/pkg/mod/entgo.io/[email protected]/entc/gen/template.go:225 +0x73b
entgo.io/ent/entc/gen.(*Graph).templates(0xc0006ec580)
	/home/user/go/pkg/mod/entgo.io/[email protected]/entc/gen/graph.go:879 +0x36
entgo.io/ent/entc/gen.generate(0xc0006ec580)
	/home/user/go/pkg/mod/entgo.io/[email protected]/entc/gen/graph.go:225 +0x3f
entgo.io/ent/entc/gen.GenerateFunc.Generate(0x3?, 0x4?)
	/home/user/go/pkg/mod/entgo.io/[email protected]/entc/gen/graph.go:143 +0x1f
entgo.io/ent/entc/gen.(*Graph).Gen(0xc0006ec580)
	/home/user/go/pkg/mod/entgo.io/[email protected]/entc/gen/graph.go:216 +0x96
entgo.io/ent/entc.generate({0x7fff090790d3, 0x1a}, 0x50?)
	/home/user/go/pkg/mod/entgo.io/[email protected]/entc/entc.go:389 +0x92
entgo.io/ent/entc.Generate({0x7fff090790d3, 0x1a}, 0xc000158900, {0xc000375cd0, 0x2, 0x0?})
	/home/user/go/pkg/mod/entgo.io/[email protected]/entc/entc.go:86 +0x21f
entgo.io/ent/cmd/internal/base.GenerateCmd.func1(0xc0001f5500?, {0xc0001351d0, 0x1, 0x5?})
	/home/user/go/pkg/mod/entgo.io/[email protected]/cmd/internal/base/base.go:190 +0x2af
github.com/spf13/cobra.(*Command).execute(0xc0001f5500, {0xc000135180, 0x5, 0x5})
	/home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001f4c00)
	/home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
	/home/user/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
main.main()
	/home/user/go/pkg/mod/entgo.io/[email protected]/cmd/ent/ent.go:24 +0xc5
exit status 2
make[1]: *** [Makefile:89: db] Error 1
make[1]: Leaving directory '/home/user/Projects/ordinals/OrdinalsIndexer'
make: *** [Makefile:97: all] Error 2

Thanks in advance :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.