Skip to content

toregua/ord-luckycoin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Luckycoin Ord

ℹ️ This project is a fork based on verydogelabs/wonky-ord-dogecoin.

You can see a running version here: LUCKY-ORD.COM - Credits to @DogepayDRC20.

API Documentation

Find the API documentation here. You can view it conveniently in the Swagger Editor by importing the openapi.yaml file via URL: https://raw.githubusercontent.com/toregua/ord-luckycoin/main/openapi.yaml.


Installation Guide

Prerequisites

Install required dependencies:

sudo apt-get update
sudo apt-get install -y build-essential libssl-dev pkg-config curl git

Install Rust and Cargo

ord-luckycoin requires Rust to build from source. Install Rust and Cargo with:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

Verify the Rust installation:

cargo --version

Clone and Build ord-luckycoin

Clone the ord-luckycoin repository and build the project:

git clone https://github.com/toregua/ord-luckycoin.git
cd ord-luckycoin
cargo build --release

The compiled binary will be located in the target/release directory.

Start Luckycoin Node

Ensure your Luckycoin Core node is running and fully synced. You can install and run it manually or use Docker. Here’s a Docker guide to set up and sync a Luckycoin node: run a luckycoin node inside a docker container.

Make sure txindex=1 is set in luckycoin.conf to enable transaction indexing, as ord-luckycoin requires this.


Running ord-luckycoin Indexer and Server

Command Line Options

  • --index-transactions: Enables storing transaction data, required for --index-lky20 and enhances API performance.
  • --index-lky20: Tracks luckyscriptions with user balances, tick list, and tick holders.
  • --index-lunes: Enables tracking of lunes (analogous to BTC RUNE or Dogecoin DUNE).
  • --nr-parallel-requests: Sets the number of parallel RPC requests. 16 is recommended for standard setups.

Environment Variables

Set up a .env file (copy from .env.example) with the following:

  • FIRST_INSCRIPTION_HEIGHT: Set to 0 to handle all inscriptions, or use a specific height for faster indexing.
  • FIRST_LUNE_HEIGHT: Set to 0 initially; update if LUNE data is deployed on Luckycoin.
  • RPC_URL: Provide your node RPC URL (e.g., http://user:[email protected]:9918).

Start the ord-luckycoin Indexer and Server

To start the ord-luckycoin indexer and server in the foreground:

./target/release/ord \
    --first-inscription-height=0 \
    --rpc-url=http://127.0.0.1:9918/ \
    --data-dir=/root/.local/share/ord \
    server --http-port=8080

This command:

  • Starts the indexer from block 0 and connects to the Luckycoin node at 127.0.0.1:9918.
  • Specifies the data directory at /root/.local/share/ord.
  • Runs the server on HTTP port 8080.

This will keep the process running in the foreground so that you can monitor it directly.


Accessing Logs (Optional)

If you prefer to capture logs, you can redirect the output to a log file:

./target/release/ord \
    --first-inscription-height=0 \
    --rpc-url=http://127.0.0.1:9918/ \
    --data-dir=/root/.local/share/ord \
    server --http-port=8080 > ~/ord-luckycoin.log 2>&1

To view the log output in real-time, open a new terminal and use:

tail -f ~/ord-luckycoin.log

Running ord-luckycoin in Docker

Using Docker to run the ord-luckycoin indexer/server is recommended.

Docker Setup

  1. System Requirements: Ubuntu or a similar Linux distribution.
  2. Luckycoin Node: Install and sync a Luckycoin node (recommended via Docker guide).
  3. Install Docker and Docker-Compose: Docker installation guide.
  4. Clone Repository: Clone this repository and navigate to the cloned directory.

Build and Start Docker Image

To build and run the ord-luckycoin Docker container:

# Build Docker image
docker-compose build

# Start ord-luckycoin in background
docker-compose up -d

# View logs
docker-compose logs -f --tail 200

Stop Docker Container

When stopping the container, add a timeout to avoid database issues.

docker-compose stop -t 600
docker-compose down

Releases

No releases published

Packages

No packages published

Languages

  • Rust 95.4%
  • HTML 1.8%
  • CSS 1.0%
  • Shell 0.8%
  • Just 0.6%
  • JavaScript 0.2%
  • Other 0.2%