Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
oracle
command
Command oracle runs once: fetch the HASH price, compute the flatfees conversion factor, and (unless DRY_RUN) submit an on-chain update if it changed.
|
Command oracle runs once: fetch the HASH price, compute the flatfees conversion factor, and (unless DRY_RUN) submit an on-chain update if it changed. |
|
internal
|
|
|
chain
Package chain talks to a Provenance node's x/flatfees module: it reads the current conversion factor (and oracle list), maps a computed factor into the module's types, estimates gas/fees via CalculateTxFees, and submits a MsgUpdateConversionFactorRequest signed by the oracle key.
|
Package chain talks to a Provenance node's x/flatfees module: it reads the current conversion factor (and oracle list), maps a computed factor into the module's types, estimates gas/fees via CalculateTxFees, and submits a MsgUpdateConversionFactorRequest signed by the oracle key. |
|
config
Package config loads runtime configuration from the environment.
|
Package config loads runtime configuration from the environment. |
|
convert
Package convert turns a HASH price (USD per HASH) into the flatfees module's ConversionFactor, using a price-tiered scale for the nhash converted_amount so the musd definition_amount stays a healthy integer at every price.
|
Package convert turns a HASH price (USD per HASH) into the flatfees module's ConversionFactor, using a price-tiered scale for the nhash converted_amount so the musd definition_amount stays a healthy integer at every price. |
|
guard
Package guard applies sanity checks against the computed price before the oracle submits an update.
|
Package guard applies sanity checks against the computed price before the oracle submits an update. |
|
logging
Package logging configures structured JSON logging to stdout.
|
Package logging configures structured JSON logging to stdout. |
|
price
Package price fetches HASH-USD trades from the internal Figure Markets exchange API and aggregates them into a single volume-weighted average price (VWAP) over a trailing 7-day window (ending midnight Eastern).
|
Package price fetches HASH-USD trades from the internal Figure Markets exchange API and aggregates them into a single volume-weighted average price (VWAP) over a trailing 7-day window (ending midnight Eastern). |
|
retry
Package retry provides a small helper for retrying gRPC calls on transient server errors.
|
Package retry provides a small helper for retrying gRPC calls on transient server errors. |
Click to show internal directories.
Click to hide internal directories.