From 10d171dd9bdc02eb3cd4affb77dbb3302ea0b484 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 16 Dec 2024 22:46:34 -0800 Subject: [PATCH] feat: remove uint2str Unused and doesn't work great according to the audit --- src/libraries/JsmnSolLib.sol | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/libraries/JsmnSolLib.sol b/src/libraries/JsmnSolLib.sol index 8752e3b0..d0de9229 100644 --- a/src/libraries/JsmnSolLib.sol +++ b/src/libraries/JsmnSolLib.sol @@ -334,23 +334,6 @@ library JsmnSolLib { return mint; } - function uint2str(uint i) internal pure returns (string memory) { - if (i == 0) return "0"; - uint j = i; - uint len; - while (j != 0) { - len++; - j /= 10; - } - bytes memory bstr = new bytes(len); - uint k = len - 1; - while (i != 0) { - bstr[k--] = bytes1(uint8(48 + (i % 10))); - i /= 10; - } - return string(bstr); - } - function parseBool(string memory _a) internal pure returns (bool) { if (strCompare(_a, "true") == 0) { return true;