IMarketRegistry

An interface that defines the methods for the Market Registry

RegisteredMarket

event RegisteredMarket(address market, bytes32 name)

Emitted when a market is registered.

UnregisteredMarket

event UnregisteredMarket(address market, bytes32 name)

Emitted when a market is unregistered.

registerMarket

function registerMarket(address _marketAddress, bytes32 _marketName) external

Registers a new market

Adds the market to the registry

Parameters

Name
Type
Description

_marketAddress

address

The address of the market to register

_marketName

bytes32

The name of the market

unregisterMarket

Unregisters a market

Removes the market from the registry

Parameters

Name
Type
Description

_marketAddress

address

The address of the market to unregister

_marketName

bytes32

The name of the market

getMarket

Retrieves the address of a market

Finds the market in the registry by its name

Parameters

Name
Type
Description

_marketName

bytes32

The name of the market

Return Values

Name
Type
Description

[0]

address

The address of the market

getMarketNames

Retrieves the names of all markets

Gets a list of all market names in the registry

Return Values

Name
Type
Description

[0]

bytes32[]

An array of market names

isMarket

Checks if an address is a registered market

Looks up if a market is in the registry by its address

Parameters

Name
Type
Description

_marketAddress

address

The address of the market

Return Values

Name
Type
Description

[0]

bool

A boolean indicating if the market is registered

Last updated