Skip to main content

Registry

Registry

This contract stores mappings of useful "protocol config state", giving a central place for all other contracts to access it. These config vars are enumerated in the Configuration library, and can only be changed by admins of the protocol.

contractAddresses

mapping(uint8 => address) contractAddresses

whiteListToAddresses

mapping(address => bool) whiteListToAddresses

whiteListFromAddresses

mapping(address => bool) whiteListFromAddresses

AddressUpdated

event AddressUpdated(address owner, uint8 index, address oldValue, address newValue)

initialize

function initialize() public

getAddress

function getAddress(uint8 index) public view returns (address)

Returns the address of a registered contract.

The contracts are stored in an array and can be accessed by their index.

Parameters

NameTypeDescription
indexuint8The index of the contract to return.

Return Values

NameTypeDescription
[0]addressThe address of the contract at the given index.

isValidNoteTokenTransfer

function isValidNoteTokenTransfer(address from, address to) external view returns (bool)

Checks whether a note token transfer from the given address 'from' or to the given address 'to' is valid. A transfer is considered valid if it originates from or goes to an address in either of the whitelists.

Parameters

NameTypeDescription
fromaddressThe sender of the tokens.
toaddressThe recipient of the tokens.

Return Values

NameTypeDescription
[0]boolbool Returns true if the transfer is valid, false otherwise.

setWhiteListAddresses

function setWhiteListAddresses(address[] addresses, bool[] boolFroms, bool[] boolTos) public

This function sets addresses in whitelist for both from and to transfers.

Parameters

NameTypeDescription
addressesaddress[]The list of addresses to be added to the whiteList.
boolFromsbool[]A boolean array indicating whether each address should be allowed to send tokens or not.
boolTosbool[]A boolean array indicating whether each address should be allowed to receive tokens or not.

setSecuritizationManager

function setSecuritizationManager(address newAddress) public

Sets the address of the securitization manager contract. Only callable by admin. The function is paused during emergency shutdowns to prevent any misuse.

Parameters

NameTypeDescription
newAddressaddressAddress of the new Securitization Manager Contract.

setSecuritizationPool

function setSecuritizationPool(address newAddress) public

This function sets the address of SecuritizationPool contract.

Parameters

NameTypeDescription
newAddressaddressThe address of the new Securitization Pool contract

setNoteTokenFactory

function setNoteTokenFactory(address newAddress) public

This function sets the address of NoteTokenFactory contract.

Parameters

NameTypeDescription
newAddressaddressThe address to set as the Note Token Factory

setTokenGenerationEventFactory

function setTokenGenerationEventFactory(address newAddress) public

This function sets the address of TokenGenerationEventFactory contract.

Parameters

NameTypeDescription
newAddressaddressThe address of the new TokenGenerationEventFactory contract.

setLoanAssetToken

function setLoanAssetToken(address newAddress) public

This function sets the address of LoanAssetToken contract.

Parameters

NameTypeDescription
newAddressaddressThe address of the new loan asset token.

setSecuritizationPoolValueService

function setSecuritizationPoolValueService(address newAddress) public

This function sets the address of SecuritizationPoolValueService contract.

Parameters

NameTypeDescription
newAddressaddressThe new address of the SecuritizationPoolValueService.

setLoanKernel

function setLoanKernel(address newAddress) public

This function sets the address of LoanKernel contract.

Parameters

NameTypeDescription
newAddressaddressThe new address of the LoanKernel.

setGo

function setGo(address newAddress) public

This function sets the address of Go contract.

Parameters

NameTypeDescription
newAddressaddressThe new address of the Go.

setNoteTokenVault

function setNoteTokenVault(address newAddress) public

Sets the address of NoteTokenVault.

This function should only be called by an admin. It also updates the whitelist status for old and new addresses.

Parameters

NameTypeDescription
newAddressaddressThe new address of NoteTokenVault.