Skip to content

Commit

Permalink
forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro-immunefi committed Apr 23, 2024
1 parent bc02c60 commit 984efc8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/PoC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ contract PoC is Test, Tokens, Log {
string memory fractional_part_leading_zeros;

uint256 leading_zeros = d - (log10(fractional_part) + 1);
for(uint256 i = 0; i < leading_zeros; i++) {
for (uint256 i = 0; i < leading_zeros; i++) {
fractional_part_leading_zeros = string.concat(fractional_part_leading_zeros, "0");
}

Expand Down Expand Up @@ -177,10 +177,10 @@ contract PoC is Test, Tokens, Log {
string memory fractional_part_leading_zeros;

uint256 leading_zeros = d - (log10(fractional_part) + 1);
for(uint256 i = 0; i < leading_zeros; i++) {
for (uint256 i = 0; i < leading_zeros; i++) {
fractional_part_leading_zeros = string.concat(fractional_part_leading_zeros, "0");
}

fractional_part_string = string.concat(fractional_part_leading_zeros, toString(fractional_part));
}

Expand Down Expand Up @@ -255,6 +255,7 @@ contract PoC is Test, Tokens, Log {
* @notice Pulled from OpenZeppelin 5.0.2 Strings.sol library
*/
bytes16 private constant HEX_DIGITS = "0123456789abcdef";

function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = log10(value) + 1;
Expand Down

0 comments on commit 984efc8

Please sign in to comment.