uNFTs

UNFT.sol

The uNFTs are the collateral receipt and the proof of borrow. The NFTs will be stored in this contract.

View Methods

function tokenURI(uint256 tokenId) public view virtual returns (string)

Will return the tokenURI, for a specific tokenId. This is a copy of the real NFT.

Call Params

NameTypeDescription

tokenId

uint256

Nft Id

Return Values

TypeDescription

string

Uri of the NFT

minterOf

function minterOf(uint256 tokenId) external view returns (address)

Returns the owner of the tokenId token.

Call Params

NameTypeDescription

tokenId

uint256

the tokenId that we want to know hows the ower of.

Return Values

TypeDescription

address

the address of the owner

Write Methods

mint

function mint(address to, uint256 tokenId) external

Mints the uNFT token to the user that added his allowed NFT as collateral.

the minted NFT will be a copy, a wrapped version of the real NFT.

Call Params

NameTypeDescription

to

address

The owner address receive the uNFT token;

tokenId

uint256

token id of the underlying asset of NFT

burn

function burn(uint256 tokenId) external

Will burn the uNFT held by the user. This will happen when the user repays or is liquidated.

Call Params

NameTypeDescription

tokenId

uint256

token id of the underlying asset of NFT

approve

function approve(address to, uint256 tokenId) public virtual

This method is not supported. It will revert the transaction

setApprovalForAll

function setApprovalForAll(address operator, bool approved) public virtual

This method is not supported. It will revert the transaction

safeTransferFrom

function safeTransferFrom(address from, address to, uint256 tokenId) public virtual

This method is not supported. It will revert the transaction

safeTransferFrom

function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) public virtual

This method is not supported. It will revert the transaction

flashLoan

function flashLoan(address receiverAddress, uint256[] nftTokenIds, bytes params) external

Last updated