Skip to main content

GatewayRegistry

Reference

Contract: GatewayRegistry​

GatewayRegistry is a mapping from assets to their associated RenERC20 and Gateway contracts.

Inherits from:

  • CanReclaimTokens
  • Claimable
  • Ownable
  • Context
  • Initializable


Variables​

numGatewayContracts: uint256​



Functions​

setGateway (string _symbol, address _token, address _gatewayContract) (external)​

Params

  • _token: The address of the RenERC20 token contract.

  • _gatewayContract: The address of the Gateway contract.

Allow the owner to set the Gateway contract for a given RenERC20 token contract.


updateGateway (address _token, address _newGatewayContract) (external)​

Params

  • _token: The address of the RenERC20 contract.

  • _newGatewayContract: The updated address of the Gateway contract.

Allow the owner to update the Gateway contract for a given RenERC20 contract.


removeGateway (string _symbol) (external)​

Params

  • _symbol: The symbol of the token to deregister.

Allows the owner to remove the Gateway contract for a given RenERC20 contract.


getGateways (address _start, uint256 _count) → address[] (external)​

To get all the registered Gateway contracts use count = 0.


getRenTokens (address _start, uint256 _count) → address[] (external)​

To get all the registered RenERC20 tokens use count = 0.


getGatewayByToken (address _token) → contract IGateway (external)​

Params

  • _token: The address of the RenERC20 token contract.

Returns the Gateway contract for the given RenERC20 token address.


getGatewayBySymbol (string _tokenSymbol) → contract IGateway (external)​

Params

  • _tokenSymbol: The symbol of the RenERC20 token contract.

Returns the Gateway contract for the given RenERC20 token symbol.


getTokenBySymbol (string _tokenSymbol) → contract IERC20 (external)​

Params

  • _tokenSymbol: The symbol of the RenERC20 token contract to lookup.

Returns the RenERC20 address for the given token symbol.


symbolIsValid (string _tokenSymbol) → bool (public)​



Events​

LogGatewayRegistered (string _symbol, string _indexedSymbol, address _token, address _gatewayContract)​

The symbol is included twice because strings have to be hashed first in order to be used as a log index/topic.


LogGatewayDeregistered (string _symbol, string _indexedSymbol, address _token, address _gatewayContract)​


LogGatewayUpdated (address _token, address _currentGatewayContract, address _newGatewayContract)​