Skip to main content

Metadata Contract

Metadata is a chain-singleton contract that stores branding and display information for each Monolith instance: social URLs, logos, project name, coin denomination, description, and an optional collateral USD price feed. It holds no funds and performs no protocol logic — it exists purely so that UIs can render consistent information for every deployed stablecoin. Contract source

Access control

All setters are guarded by the onlyOperatorOrManager(address _lender) modifier. A caller must equal ILender(_lender).operator() or ILender(_lender).manager() to set metadata for that Lender. Each Lender’s operator and manager therefore manage its own metadata independently; there is no global admin.

Types

Storage

Per-Lender mappings (all public, so each has an auto-generated getter):
  • websiteUrl, xUrl, discordUrl, telegramUrl, otherUrl
  • coinLogoUrl, vaultLogoUrl, projectLogoUrl
  • projectName, coinDenomination, description
  • coinType (CoinType enum)
  • collateralUsdPriceFeed (address)

Functions

setMetadata

Batch setter that writes every metadata field for _lender in one call. Emits MetadataUpdated(_lender, m). Requirements:
  • msg.sender == ILender(_lender).operator() or msg.sender == ILender(_lender).manager()

getMetadata

Reads all metadata fields for _lender as a single MetadataValues struct.

Individual setters

Each of the following sets one field and emits the corresponding *Updated event. All require msg.sender == ILender(_lender).operator() or msg.sender == ILender(_lender).manager().

Events

  • MetadataUpdated(address indexed lender, MetadataValues values) — emitted by setMetadata.
  • WebsiteUrlUpdated(address indexed lender, string websiteUrl)
  • XUrlUpdated(address indexed lender, string xUrl)
  • DiscordUrlUpdated(address indexed lender, string discordUrl)
  • TelegramUrlUpdated(address indexed lender, string telegramUrl)
  • OtherUrlUpdated(address indexed lender, string otherUrl)
  • CoinLogoUrlUpdated(address indexed lender, string coinLogoUrl)
  • VaultLogoUrlUpdated(address indexed lender, string vaultLogoUrl)
  • ProjectNameUpdated(address indexed lender, string projectName)
  • ProjectLogoUrlUpdated(address indexed lender, string projectLogoUrl)
  • CoinTypeUpdated(address indexed lender, CoinType coinType)
  • CoinDenominationUpdated(address indexed lender, string coinDenomination)
  • DescriptionUpdated(address indexed lender, string description)
  • CollateralUsdPriceFeedUpdated(address indexed lender, address collateralUsdPriceFeed)