ILoaNFT

Git Source

Inherits: IERC1155

Author: bull.haus

LoaNFT ERC1155 contract. Owners of LoaNFTs are (partial) lenders of loans on Lumin. LoaNFTs are transferrable.

Burning and minting of LoaNFTs is done by the LoanManager contract.

Each loan consists of 10 shares, each indicating 10% ownership of future payments of the loan.

Functions

mint

Mint LoaNFT token to given user address.

Can only be called by LoanManager.

function mint(address to, uint256 tokenId) external;

Parameters

NameTypeDescription
toaddressuser address to mint LoaNFT for
tokenIduint256LoaNFT token identifier, which is the same as the loan id

burn

Burn LoaNFT token.

Can only be called by LoanManager.

function burn(uint256 tokenId) external;

Parameters

NameTypeDescription
tokenIduint256LoaNFT token identifier, which is the same as the loan id

sharesOf

Get the owners and respective loan shares of each loan owner.

function sharesOf(uint256 tokenId) external view returns (LoanShare[] memory shares);

Parameters

NameTypeDescription
tokenIduint256LoaNFT token identifier for which to get loan ownership shares

Returns

NameTypeDescription
sharesLoanShare[]List of owners and respective loan share of each loan owner

Structs

LoanShare

Loan ownership share

owner Loan share owner.

percentage Percentage of loan owned by owner.

struct LoanShare {
    address owner;
    uint256 percentage;
}