riftenlabs-indexer/Cargo.toml
Hossein Zoda c7a9e9bea6 ido: replace num-bigint with malachite
Migrate the ido module's arbitrary-precision math from num-bigint to
malachite (already a workspace dependency). BigInt becomes
malachite::Integer throughout; the VM-number byte codec uses
PowerOf2Digits, sign handling uses Integer::sign(), and primitive
conversions use try_from.

Add an IntegerAsStr serde adapter for string-serialized fields, since
malachite's FromStr::Err is () and does not satisfy DisplayFromStr's
Display bound. JSON output is unchanged.

Drop the now-unused num-bigint and num-traits dependencies.

Also fix all clippy warnings in the module surfaced by the migration
(unwrap-after-is_none control flow, a const->static LazyLock bug,
an oversized enum variant boxed, and assorted mechanical lints).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 10:41:39 +00:00

54 lines
1.8 KiB
TOML

[package]
name = "riftenlabs-indexer"
version = "0.2.0"
edition = "2021"
authors = ["Whiterun LLC <hello@riftenlabs.com>"]
description = "Riften Labs DeFi contract indexer on Bitcoin Cash"
license = "AGPL-3.0-or-later"
homepage = "https://gitlab.com/riftenlabs/riftenlabs-indexer"
repository = "https://gitlab.com/riftenlabs/riftenlabs-indexer"
keywords = ["bitcoincash", "bitcoin", "cauldron", "defi", "cpmm"]
readme = "README.md"
build = "build.rs"
[dependencies]
anyhow = { version = "1.0.94", features = ["backtrace"] }
bitcoincash = "0.32.2"
bitcoin_hashes = { version = "0.14.100", default-features = false } # Same version as used by bitcoincash
electrum-client-netagnostic = { version = "0.21.2", features = ["use-rustls", "use-websocket"] }
hex = { version = "0.4.3", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.133"
rocket = { version = "0.5.1", features = ["json"] }
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] }
rayon = "1.10.0"
riftenlabs-defi = "0.4.1"
rocket_cors = "0.6.0"
log = "0.4"
stderrlog = "0.6.0"
tokio = { version = "1", features = ["full"] }
rust_decimal = { version = "1.36", features = ["maths"] }
rust_decimal_macros = "1.36"
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
rand = "0.8.5"
configure_me = "0.4.0"
futures = "0.3.32"
serde_with = { version = "3.18.0", features = ["hex"] }
[build-dependencies]
configure_me_codegen = "0.4.8"
[dependencies.malachite]
version = "0.6.1"
default-features = false
features = [ "naturals_and_integers"]
[package.metadata.configure_me]
spec = "internal/config_specification.toml"
[profile.release]
debug = true
[lints.clippy]
# workaround for generated code in depdencendy configure_me
uninlined_format_args = "allow"