Skip to main content

NetworkRegistry

Git Source

Methods

entity

function entity(uint256 index) external view returns (address)

Get an entity given its index.

Parameters

NameTypeDescription
indexuint256index of the entity to get

Returns

NameTypeDescription
addressaddress of the entity

isEntity

function isEntity(address entity) external view returns (bool)

Get if a given address is an entity.

Parameters

NameTypeDescription
entityaddressaddress to check

Returns

NameTypeDescription
boolif the given address is an entity

registerNetwork

function registerNetwork() external nonpayable

Register the caller as a network.

totalEntities

function totalEntities() external view returns (uint256)

Get a total number of entities.

Returns

NameTypeDescription
uint256total number of entities added

Events

AddEntity

event AddEntity(address indexed entity)

Emitted when an entity is added.

Parameters

NameTypeDescription
entity indexedaddressaddress of the added entity