FollowNFT now returns token ID

This commit is contained in:
donosonaumczuk
2022-03-31 20:27:39 +01:00
parent 00b0a99ef3
commit 88d4320b14
2 changed files with 5 additions and 3 deletions

View File

@@ -63,10 +63,11 @@ contract FollowNFT is LensNFTBase, IFollowNFT {
}
/// @inheritdoc IFollowNFT
function mint(address to) external override {
function mint(address to) external override returns (uint256) {
if (msg.sender != HUB) revert Errors.NotHub();
uint256 tokenId = ++_tokenIdCounter;
_mint(to, tokenId);
return tokenId;
}
/// @inheritdoc IFollowNFT

View File

@@ -30,8 +30,10 @@ interface IFollowNFT {
* upon follow.
*
* @param to The address to mint the NFT to.
*
* @return An interger representing the minted token ID.
*/
function mint(address to) external;
function mint(address to) external returns (uint256);
/**
* @notice Delegates the caller's governance power to the given delegatee address.
@@ -68,5 +70,4 @@ interface IFollowNFT {
* @param blockNumber The block number to query the delegated supply at.
*/
function getDelegatedSupplyByBlockNumber(uint256 blockNumber) external returns (uint256);
}