MarketRegistry

Register uToken and UserManager contracts to their tokens

userManagers

mapping(address => address) userManagers

Token address mapped to userManager

Assumption there will only ever be one UserManager per token

uTokens

mapping(address => address) uTokens

Token address mapped to uToken

Assumption there will only ever be one UToken per token

LogAddUToken

event LogAddUToken(address tokenAddress, address contractAddress)

New UToken contract registered

Parameters

Name
Type
Description

tokenAddress

address

The address of the underlying token

contractAddress

address

The contract address

LogAddUserManager

event LogAddUserManager(address tokenAddress, address contractAddress)

New UserManager contract registered

Parameters

Name
Type
Description

tokenAddress

address

The address of the underlying token

contractAddress

address

The contract address

__MarketRegistry_init

function __MarketRegistry_init() public

@dev Initialization function

hasUToken

function hasUToken(address token) external view returns (bool)

hasUserManager

function hasUserManager(address token) external view returns (bool)

setUToken

function setUToken(address token, address uToken) external

Register a new UToken contract

Parameters

Name
Type
Description

token

address

The underlying token e.g DAI

uToken

address

the address of the uToken contract

setUserManager

function setUserManager(address token, address userManager) external

Register a new UToken contract

Parameters

Name
Type
Description

token

address

The underlying token e.g DAI

userManager

address

the address of the UserManager contract

Last updated