MintableIncentivizedERC721
Basic ERC721 implementation
_ERC721Data
onlyPoolAdmin
Only pool admin can call functions marked by this modifier.
onlyPool
Only pool can call functions marked by this modifier.
_addressesProvider
UserState - additionalData is a flexible field. PTokens and VariableDebtTokens use this field store the index of the user's last supply/withdrawal/borrow/repayment. StableDebtTokens use this field to store the user's stable rate.
POOL
ATOMIC_PRICING
_underlyingAsset
constructor
Constructor.
Parameters
Name | Type | Description |
---|---|---|
pool | contract IPool | The reference to the main Pool contract |
name_ | string | The name of the token |
symbol_ | string | The symbol of the token |
atomic_pricing | bool |
name
Returns the token collection name.
symbol
Returns the token collection symbol.
balanceOf
getIncentivesController
Returns the address of the Incentives Controller contract
Return Values
Name | Type | Description |
---|---|---|
[0] | contract IRewardController | The address of the Incentives Controller |
setIncentivesController
Sets a new Incentives Controller
Parameters
Name | Type | Description |
---|---|---|
controller | contract IRewardController | the new Incentives controller |
setBalanceLimit
Sets new Balance Limit
Parameters
Name | Type | Description |
---|---|---|
limit | uint64 | the new Balance Limit |
_setName
Update the name of the token
Parameters
Name | Type | Description |
---|---|---|
newName | string | The new name for the token |
_setSymbol
Update the symbol for the token
Parameters
Name | Type | Description |
---|---|---|
newSymbol | string | The new symbol for the token |
ownerOf
See {IERC721-ownerOf}.
tokenURI
See {IERC721Metadata-tokenURI}.
approve
See {IERC721-approve}.
getApproved
See {IERC721-getApproved}.
setApprovalForAll
See {IERC721-setApprovalForAll}.
isApprovedForAll
See {IERC721-isApprovedForAll}.
transferFrom
See {IERC721-transferFrom}.
safeTransferFrom
See {IERC721-safeTransferFrom}.
safeTransferFrom
See {IERC721-safeTransferFrom}.
_safeTransferFrom
_safeTransfer
_Safely transfers tokenId
token from from
to to
, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked.
_data
is additional data, it has no specified format and it is sent in call to to
.
This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. implement alternative mechanisms to perform token transfer, such as signature-based.
Requirements:
from
cannot be the zero address.to
cannot be the zero address.tokenId
token must exist and be owned byfrom
.
Emits a {Transfer} event._
_exists
_Returns whether tokenId
exists.
Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
Tokens start existing when they are minted (_mint
), and stop existing when they are burned (_burn
)._
_isApprovedOrOwner
_Returns whether spender
is allowed to manage tokenId
.
Requirements:
tokenId
must exist._
_mintMultiple
_burnMultiple
_transfer
_Transfers tokenId
from from
to to
. As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
Requirements:
to
cannot be the zero address.tokenId
token must be owned byfrom
.
Emits a {Transfer} event._
_transferCollateralizable
update collateral information on transfer
collateralizedBalanceOf
get the collateralized balance of a specific user
setIsUsedAsCollateral
changes the collateral state/config of a token
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | if the state has changed |
batchSetIsUsedAsCollateral
the ids of the token want to change the collateral state
Return Values
Name | Type | Description |
---|---|---|
oldCollateralizedBalance | uint256 | uint256 (user's old collateralized balance), uint256 (user's new collateralized balance) |
newCollateralizedBalance | uint256 |
isUsedAsCollateral
get the the collateral configuration of a specific token
isAuctioned
get the auction configuration of a specific token
startAuction
start auction
endAuction
end auction
getAuctionData
get auction data
supportsInterface
See {IERC165-supportsInterface}.
tokenOfOwnerByIndex
See {IERC721Enumerable-tokenOfOwnerByIndex}.
totalSupply
See {IERC721Enumerable-totalSupply}.
tokenByIndex
See {IERC721Enumerable-tokenByIndex}.