Skip to content

Commit

Permalink
fix rank bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabnock01 committed Nov 4, 2023
1 parent 41a6766 commit 455dbb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions script/PrintFlagToken.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ contract PrintFlagTokenScript is Script {
console.log(
flagRenderer.render({
_puzzleData: puzzleData,
_tokenId: (31 << 128) | 4,
_tokenId: (31 << 128) | 21,
_author: address(0),
_solveTime: uint40(6 hours + 23 minutes),
_solveTime: uint40(49 days),
_solveMetadata: uint56((0xABCDEF0 << 28) | 0x1122334),
_phase: 0,
_solves: 39,
_solves: 256,
_colors: 0x181E287851A927303DF0F6FC94A3B3
})
);
Expand Down
4 changes: 1 addition & 3 deletions src/FlagRenderer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ contract FlagRenderer {
image = string.concat(
image,
'}.x{width:1px;height:1px}</style><mask id="m"><rect width="20" height="20" rx="0.3'
'70370" fill="#FFF"/></mask><path d="M0 0h550v550H0z" style="fill:#',
'70370" fill="#FFF"/></mask><path d="M0 0h550v550H0z" fill="#',
uint256((_colors >> 96) & 0xFFFFFF).toHexStringNoPrefix(3), // Background
'"/><rect x="143" y="69" width="264" height="412" rx="8" fill="#',
uint256((_colors >> 48) & 0xFFFFFF).toHexStringNoPrefix(3), // Border
Expand Down Expand Up @@ -251,8 +251,6 @@ contract FlagRenderer {
image = string.concat(
image,
uint256(uint128(_tokenId)).toString(), // Rank
' </tspan><tspan class="a d i" y="435">/ ',
uint256(_solves).toString(), // Solvers
'</tspan></text><text class="b d i" x="187" y="453">Rank</text><path class="j" d="M'
'289 429v4h3m3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0z"/><text class="a c h" x="303" y="43'
'3">',
Expand Down

0 comments on commit 455dbb5

Please sign in to comment.