Colle Marketplace
Colle.ioWebApp (Live)WebApp (Test)
  • Contracts Overview
  • Functional Requirements
  • Contract Descriptions
  • Technical Project & Audit Details
  • Test Coverage Report
  • Static Analysis
  • Royalty Pool Explained
  • Sale State Explained
  • Sales Tax Explained
  • marketplace
    • IMarketHub
    • IMarketHubRegistrar
    • MarketHub
    • MarketHubRegistrar
    • MarketHubRegistrarUpgradeable
    • collections
      • ColleCollection
      • ColleCollectionUpgradeable
      • CollectionRegistry
      • IColleCollection
      • IColleCollectionUpgradeable
      • ICollectionRegistry
    • currencies
      • BaseCurrency
      • CurrencyRegistry
      • ICurrency
      • ICurrencyRegistry
      • USDCCurrency
    • escrow
      • EscrowUpgradeable
      • IEscrow
      • IEscrowRegistry
    • kycs
      • Account
      • IKYCRegistry
      • KYCRegistry
    • markets
      • BaseMarketUpgradeable
      • IListingMarket
      • IMarket
      • IMarketRegistry
      • IOfferMarket
      • ListingMarketUpgradeable
      • MarketRegistry
      • OfferMarketUpgradeable
    • royalties
      • BaseRoyalty
      • BlackTierRoyalty
      • GoldTierRoyalty
      • GreenTierRoyalty
      • IRoyalty
      • IRoyaltyPool
      • IRoyaltyRegistry
      • PlatinumTierRoyalty
      • RoyaltyPool
      • RoyaltyRegistry
      • v1
        • BlackTierRoyaltyV1
        • GoldTierRoyaltyV1
        • GreenTierRoyaltyV1
        • PlatinumTierRoyaltyV1
    • taxes
      • ITaxPolicyRegistry
      • Tax
      • TaxPolicyRegistry
    • upgrade-gatekeeper
      • IUpgradeGatekeeper
      • UpgradeGatekeeper
    • vaults
      • IVault
      • IVaultRegistry
      • VaultUpgradeable
  • team-smart-wallet
    • ITeamSmartWallet
    • ITeamSmartWalletHelper
    • TeamSmartWallet
    • TeamSmartWalletFactory
    • TeamSmartWalletPermitHelper
  • utils
    • MarketAccess
    • MarketAccessUpgradeable
    • Signature
    • SignatureValidator
Powered by GitBook
On this page
  • MARKET_ROLE
  • _markets
  • _marketNames
  • registerMarket
  • Parameters
  • unregisterMarket
  • Parameters
  • getMarket
  • Parameters
  • Return Values
  • getMarketNames
  • Return Values
  • isMarket
  • Parameters
  • Return Values
  1. marketplace
  2. markets

MarketRegistry

The contract manages the registration and de-registration of markets, provides info about registered markets

MARKET_ROLE

bytes32 MARKET_ROLE

_markets

mapping(bytes32 => address) _markets

A mapping that relates a market name to its contract address.

_marketNames

bytes32[] _marketNames

A dynamic array that stores the names of all registered markets.

registerMarket

function registerMarket(address _marketAddress, bytes32 _marketName) public

Register a new market

The function assigns a market role to the market, adds the market to the markets mapping and stores the market name

Parameters

Name
Type
Description

_marketAddress

address

The address of the market contract

_marketName

bytes32

The name of the market

unregisterMarket

function unregisterMarket(address _marketAddress, bytes32 _marketName) public

Unregister an existing market

The function removes a market role from the market, deletes the market from the markets mapping and removes the market name

Parameters

Name
Type
Description

_marketAddress

address

The address of the market contract

_marketName

bytes32

The name of the market

getMarket

function getMarket(bytes32 _marketName) public view returns (address)

Fetch the contract address of a registered market

Returns the contract address of a market given its name

Parameters

Name
Type
Description

_marketName

bytes32

The name of the market

Return Values

Name
Type
Description

[0]

address

The contract address of the market

getMarketNames

function getMarketNames() public view returns (bytes32[])

Fetch the names of all registered markets

Returns a dynamic array that includes the names of all registered markets

Return Values

Name
Type
Description

[0]

bytes32[]

An array of names of all registered markets

isMarket

function isMarket(address _marketAddress) public view returns (bool)

Check whether a contract is a registered market

Checks whether a contract has been assigned a market role

Parameters

Name
Type
Description

_marketAddress

address

The address of the market contract

Return Values

Name
Type
Description

[0]

bool

A boolean value indicating whether the contract is a registered market

PreviousListingMarketUpgradeableNextOfferMarketUpgradeable

Last updated 2 years ago