Reads the settlement-accounting deployment contract from the environment.
The accounting sidecar (a read-only container that books each Xochi settlement
into Raxol.Payments.SettlementLedger) is configured entirely through env vars.
Two deployments read the same contract: the main raxol release (root
config/runtime.exs) and the slim raxol_acp sidecar release
(packages/raxol_acp/config/runtime.exs). Both call env_config/0 so the
contract lives in one place and the two config files cannot drift.
Contract
| Env var | Meaning | Default |
|---|---|---|
RAXOL_ACCOUNTING_ENABLED | Start the ledger/accountant/monitor tree | false |
RPC_ETH .. RPC_ROBINHOOD | Per-chain public RPC URL (read-only) | (unset) |
XOCHI_SOLVER_ADDRESS | Solver wallet to read balances for | (unset) |
RAXOL_REBALANCE_INTERVAL_MS | RebalanceMonitor sweep interval | 300000 |
RAXOL_PRICE_SOURCE | USD price source for margin | coingecko |
Read-only by construction: no wallet key is read here and none of the started
processes move funds (the Riddler auto-rebalancer executes; the monitor only
recommends). Omitting XOCHI_SOLVER_ADDRESS yields ledger-only mode -- the
RebalanceMonitor is not started (see Raxol.ACP.Supervisor).
Summary
Functions
True when RAXOL_ACCOUNTING_ENABLED is exactly "true".
Reads the accounting contract into the two config values a deployment sets.
Functions
@spec enabled?() :: boolean()
True when RAXOL_ACCOUNTING_ENABLED is exactly "true".
Reads the accounting contract into the two config values a deployment sets.
Returns {accounting_opts, accounting_enabled?} where accounting_opts is the
keyword list for config :raxol_payments, :accounting and accounting_enabled?
is the boolean for config :raxol_acp, accounting_enabled:.