Port libriften feb2167 + 05d3454 + a582108 (through HEAD a582108): - The ORB PoolParams NFT is gone from the spec. The IdoParams commitment field orbPoolParamsCategory (32, VM-order category) is replaced by permanentPoolPlatformNfth (32, verbatim hash) — the delegation-pool platform nfth the postlaunch bakes; run() reconstructs the permanent pool's thin main from it on-chain, so the indexer's only duties are to source it from the params NFT commitment and prove the output #7 postlaunch rebuild was baked with it (unchanged mechanism). Stored on the PreInit/Active parameters as permanentPoolPlatformNfth. - postlaunch io realignment: run() drops the PoolParams io#4 — the offering confirmation NFT is consumed exactly ONCE, at run() input#4, and is forbidden in init()/collect() (a582108). Collects no longer copy the NFT through io#4, so they are invisible to the tracked chain (they only move proceeds into the covenant storages); the POSTLAUNCH status now advances solely on the final run tx. The platform payout moved to output#4 and the altPPOut pool-deploy-failure fallback is gone (altPPOutPayout dropped from the Distributed state, matching libriften indexer-types). - Native BCH xToken: offer.xTokenCategory is now nullable (all-zero on-chain = native sentinel -> JSON null). Native IDOs take payment via the offering's XWNT path (entry flag required-iff-native, payment in the entry's value, fresh owner nft at #2) and their permanent pool is a single-UTXO tokenbch-delegation pool at run() output#0 (BCH reserve in the value; sibling slot -> OP_RETURN). The offering/postlaunch builders bake an empty push for a native category. - IDO_POSTLAUNCH_CONTRACT re-synced (1627 -> 2193 bytes, byte-matching ido.json; embeds the new delegation contracts + both native branches); initiator/preinit/offering-layer contracts verified byte-identical. - Per-network ORB constants centralized in src/db/orbconstants.rs: the IdoParams NFT category moved there next to the delegation-pool platform nfth (chipnet pins the deployed ORB v0 records, mainnet stays all-zero fail-closed). - ido.db schema version 4: no backward compatibility, delete ido.db and re-index. Verified: cargo build, test (233 passing), clippy (no new warnings) and fmt all clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .vscode | ||
| contrib | ||
| internal | ||
| linters | ||
| src | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
Riftenlabs Indexer
RiftenLabs indexer is for indexing DeFi contracts by Riften Labs. It allows for querying historical on-chain data on Bitcoin Cash.
Contributing
All contributors are required to sign a Contributor License Agreement (CLA) before their contributions can be merged into the project.
Contributions are generally welcome. If you intend to make larger changes please discuss them in an issue before MRing them to avoid duplicate work and architectural mismatches.
Installing Rust
Rust can be installed using your package manager of choice or rustup.rs. The former way is considered more secure since it typically doesn't involve trust in the CA system. But you should be aware that the version of Rust shipped by your distribution might be out of date.
Building
The library can be built and tested using cargo:
git clone https://gitlab.com/riftenlabs/riftenlabs-indexer.git
cd riftenlabs-indexer
cargo build
You can run tests with:
cargo test