# IRelayRegistrar

The RelayRegistrar Interface

The on-chain registrar for all registered Relay Managers.

The client can use an implementation of a RelayRegistrar to find relay registration info.

# Functions

# registerRelayServer(address relayHub, bytes32[3] url)

(external)

This function is called by Relay Servers in order to register or to update their registration.

relayHub: The address of the RelayHub contract for which this action is performed.

url: The URL of the Relay Server that is listening to the clients' requests.


# getCreationBlock()

→ uint256 (external)

# Return values

block number in which the contract has been deployed.


# getRelayRegistrationMaxAge()

→ uint256 (external)

# Return values

maximum age the relay is considered registered by default by this RelayRegistrar, in seconds.


# setRelayRegistrationMaxAge(uint256)

(external)

Change the maximum relay registration age.


# getRelayInfo(address relayHub, address relayManager)

→ struct IRelayRegistrar.RelayInfo info (external)

relayManager: An address of a Relay Manager.

relayHub: The address of the RelayHub contract for which this action is performed.

# Return values

All the details of the given Relay Manager's registration. Throws if relay not found for RelayHub.


# readRelayInfos(address relayHub)

→ struct IRelayRegistrar.RelayInfo[] info (external)

Read relay info of registered Relay Server from an on-chain storage.

relayHub: The address of the RelayHub contract for which this action is performed.

# Return values

The list of RelayInfos of registered Relay Servers


# readRelayInfosInRange(address relayHub, uint256 oldestBlockNumber, uint256 oldestBlockTimestamp, uint256 maxCount)

→ struct IRelayRegistrar.RelayInfo[] info (external)

Read relay info of registered Relay Server from an on-chain storage.

relayHub: The address of the RelayHub contract for which this action is performed.

maxCount: The maximum amount of relays to be returned by this function.

oldestBlockNumber: The latest block number in which a Relay Server may be registered.

oldestBlockTimestamp: The latest block timestamp in which a Relay Server may be registered.

# Return values

The list of RelayInfos of registered Relay Servers


# Events

# RelayServerRegistered(address relayManager, address relayHub, bytes32[3] relayUrl)

Emitted when a relay server registers or updates its details. Looking up these events allows a client to discover registered Relay Servers.


# Structs

# RelayInfo

uint32 lastSeenBlockNumber

uint40 lastSeenTimestamp

uint32 firstSeenBlockNumber

uint40 firstSeenTimestamp

bytes32[3] urlParts

address relayManager