Skip to content

Commit

Permalink
add _getUrl() and _getImageUrl()
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Sep 14, 2022
1 parent 6fef8dd commit cffcab1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions contracts/SoulName.sol
Expand Up @@ -283,6 +283,14 @@ contract SoulName is NFT, ISoulNameResolver {
return string(bytes.concat(bytes(name), bytes(extension)));
}
function _getUrl(uint256 tokenId) private view returns (string memory) {
return string(bytes.concat(bytes("https://soulname.com/"), bytes(tokenId.toString())));
}

function _getImageUrl(string memory name) private view returns (string memory) {
return string(bytes.concat(bytes("https://via.placeholder.com/500?text="), bytes(_getName(name))));
}

/* ========== MODIFIERS ========== */

/* ========== EVENTS ========== */
Expand Down

0 comments on commit cffcab1

Please sign in to comment.