MarketRegistry
The contract manages the registration and de-registration of markets, provides info about registered markets
MARKET_ROLE
_markets
A mapping that relates a market name to its contract address.
_marketNames
A dynamic array that stores the names of all registered markets.
registerMarket
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
_marketAddress
address
The address of the market contract
_marketName
bytes32
The name of the market
unregisterMarket
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
_marketAddress
address
The address of the market contract
_marketName
bytes32
The name of the market
getMarket
Fetch the contract address of a registered market
Returns the contract address of a market given its name
Parameters
_marketName
bytes32
The name of the market
Return Values
[0]
address
The contract address of the market
getMarketNames
Fetch the names of all registered markets
Returns a dynamic array that includes the names of all registered markets
Return Values
[0]
bytes32[]
An array of names of all registered markets
isMarket
Check whether a contract is a registered market
Checks whether a contract has been assigned a market role
Parameters
_marketAddress
address
The address of the market contract
Return Values
[0]
bool
A boolean value indicating whether the contract is a registered market
Last updated