• Resolve the MUSD address map for a chain. Values come from @mezo-org/musd-contracts (decision O10) and are cross-checked against docs/01-ground-truth.md ยง4 in tests.

    Overrides are validated and checksummed (MK-009). A partial override on a supported chain replaces one contract inside an otherwise trusted map, which is the case worth understanding: nothing here can tell whether the replacement belongs to the same deployment. What catches that is MusdClient.verifyDeployment, which asserts the cross wiring pointers between the contracts and runs before the first write on every path (MK-008). Override sortedTroves with a foreign address and TroveManager.sortedTroves() will not equal it, so verification fails before anything is sent.

    Parameters

    • chainId: number
    • Optionaloverride: Partial<MusdAddresses>

      per-contract overrides; also the escape hatch for a chainId with no bundled deployment, supplying every contract avoids UnsupportedChain.

    Returns MusdAddresses

    for an unknown key, a non-address value, or zero.

    for an unsupported chainId when overrides do not cover it.