Skip to content

Commit

Permalink
Merge branch 'main' into lock-transfer-sub-unsub
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds authored Oct 24, 2024
2 parents c7ad6b7 + d084d9b commit 1690237
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/positionDescriptor bytecode size.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
31074
31236
2 changes: 1 addition & 1 deletion src/libraries/Descriptor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ library Descriptor {
escapeQuotes(params.baseCurrencySymbol),
addressToString(Currency.unwrap(params.quoteCurrency)),
addressToString(Currency.unwrap(params.baseCurrency)),
addressToString(params.hooks),
params.hooks == address(0) ? "No Hook" : addressToString(params.hooks),
feeToPercentString(params.fee)
);
string memory image = Base64.encode(bytes(generateSVGImage(params)));
Expand Down
4 changes: 3 additions & 1 deletion src/libraries/SVG.sol
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ library SVG {
string memory tickLowerStr = tickToString(tickLower);
string memory tickUpperStr = tickToString(tickUpper);
uint256 str1length = bytes(tokenId).length + 4;
string memory hookSlice = string(abi.encodePacked(substring(hookStr, 0, 5), "...", substring(hookStr, 39, 42)));
string memory hookSlice = hook == address(0)
? "No Hook"
: string(abi.encodePacked(substring(hookStr, 0, 5), "...", substring(hookStr, 39, 42)));
uint256 str2length = bytes(hookSlice).length + 5;
uint256 str3length = bytes(tickLowerStr).length + 10;
uint256 str4length = bytes(tickUpperStr).length + 10;
Expand Down
2 changes: 1 addition & 1 deletion test/PositionDescriptor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ contract PositionDescriptorTest is Test, PosmTestSetup, GasSnapshot {
assertEq(token.name, "Uniswap - 0.3% - TEST/TEST - 1.0060<>1.0121");
assertEq(
token.description,
unicode"This NFT represents a liquidity position in a Uniswap v4 TEST-TEST pool. The owner of this NFT can modify or redeem the position.\n\nPool Manager Address: 0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f\nTEST Address: 0x5991a2df15a8f6a256d3ec51e99254cd3fb576a9\nTEST Address: 0x2e234dae75c793f67a35089c9d99245e1c58470b\nHook Address: 0x0000000000000000000000000000000000000000\nFee Tier: 0.3%\nToken ID: 1\n\n⚠️ DISCLAIMER: Due diligence is imperative when assessing this NFT. Make sure currency addresses match the expected currencies, as currency symbols may be imitated."
unicode"This NFT represents a liquidity position in a Uniswap v4 TEST-TEST pool. The owner of this NFT can modify or redeem the position.\n\nPool Manager Address: 0x5615deb798bb3e4dfa0139dfa1b3d433cc23b72f\nTEST Address: 0x5991a2df15a8f6a256d3ec51e99254cd3fb576a9\nTEST Address: 0x2e234dae75c793f67a35089c9d99245e1c58470b\nHook Address: No Hook\nFee Tier: 0.3%\nToken ID: 1\n\n⚠️ DISCLAIMER: Due diligence is imperative when assessing this NFT. Make sure currency addresses match the expected currencies, as currency symbols may be imitated."
);
}

Expand Down

0 comments on commit 1690237

Please sign in to comment.