Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions contracts/src/NFTMetadata/MetadataNFT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ contract MetadataNFT is IMetadataNFT {
function uri(TroveData memory _troveData) public view returns (string memory) {
string memory attr = attributes(_troveData);
return json.formattedMetadata(
string.concat("Liquity V2 - ", IERC20Metadata(_troveData._collToken).name()),
string.concat("Mento Liquity V2 - ", IERC20Metadata(_troveData._collToken).name()),
string.concat(
"Liquity V2 is a collateralized debt platform. Users can lock up ",
"Mento Liquity V2 is a collateralized debt platform. Users can lock up ",
IERC20Metadata(_troveData._collToken).symbol(),
" to issue stablecoin tokens (BOLD) to their own Ethereum address. The individual collateralized debt positions are called Troves, and are represented as NFTs."
" to issue ",
IERC20Metadata(_troveData._boldToken).symbol(),
" to their own address. The individual collateralized debt positions are called Troves, and are represented as NFTs."
),
renderSVGImage(_troveData),
attr
Expand Down
11 changes: 2 additions & 9 deletions contracts/src/NFTMetadata/utils/bauhaus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,8 @@ library bauhaus {
function _bauhaus(string memory _collName, uint256 _troveId) internal pure returns (string memory) {
bytes32 collSig = keccak256(bytes(_collName));
uint256 variant = _troveId % 4;

if (collSig == keccak256("WETH")) {
return _img1(variant);
} else if (collSig == keccak256("wstETH")) {
return _img2(variant);
} else {
// assume rETH
return _img3(variant);
}
// Always use _img1 because in MentoV3 we only have one collateral token
return _img1(variant);
}

function _colorCode2Hex(colorCode _color) private pure returns (string memory) {
Expand Down
4 changes: 2 additions & 2 deletions contracts/test/troveNFT.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ contract troveNFTTest is DevTestSetup {
string memory decodedUri = string(Base64.decode(uriSplit));

// Check for expected attributes
assertTrue(LibString.contains(decodedUri, '"name": "Liquity V2 - '), "NFT Name attribute missing");
assertTrue(LibString.contains(decodedUri, '"name": "Mento Liquity V2 - '), "NFT Name attribute missing");

assertTrue(
LibString.contains(
decodedUri, '"description": "Liquity V2 is a collateralized debt platform. Users can lock up'
decodedUri, '"description": "Mento Liquity V2 is a collateralized debt platform. Users can lock up'
),
"NFT description attribute missing"
);
Expand Down