ICurrencyRegistry

This is the interface for the Currency Registry contract.

RegisteredCurrency

event RegisteredCurrency(address currency, address erc20)

Emitted when a currency is registered.

UnregisteredCurrency

event UnregisteredCurrency(address currency, address erc20)

Emitted when a currency is unregistered.

registerERC20

function registerERC20(address _currency) external

Registers an ERC20 token as a base currency.

Parameters

Name
Type
Description

_currency

address

The address of the BaseCurrency contract associated with the ERC20 token.

unregisterERC20

Unregisters an ERC20 token from being a base currency.

Parameters

Name
Type
Description

_currency

address

The address of the BaseCurrency contract associated with the ERC20 token.

getCurrencyByERC20

Retrieves the BaseCurrency contract associated with a specific ERC20 token.

Parameters

Name
Type
Description

_erc20

address

The address of the ERC20 token.

Return Values

Name
Type
Description

[0]

contract BaseCurrency

The BaseCurrency contract associated with the ERC20 token.

getERC20ByCurrency

Retrieves the ERC20 token associated with a specific BaseCurrency contract.

Parameters

Name
Type
Description

_currency

address

The address of the BaseCurrency contract.

Return Values

Name
Type
Description

[0]

contract IERC20

The ERC20 token associated with the BaseCurrency contract.

isERC20Registered

Checks if an ERC20 token is registered as a base currency.

Parameters

Name
Type
Description

_erc20

address

The address of the ERC20 token.

Return Values

Name
Type
Description

[0]

bool

true if the ERC20 token is registered, false otherwise.

getERC20s

Gets all registered ERC20 tokens.

Return Values

Name
Type
Description

[0]

address[]

An array of addresses of the registered ERC20 tokens.

Last updated