Replace some uses of abi.encodePacked with more explicit alternatives (#4296)

Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
Hadrien Croubois
2023-06-14 21:11:12 +02:00
committed by GitHub
parent 5cc1ea0a39
commit ef103f37e4
8 changed files with 15 additions and 11 deletions

View File

@ -47,7 +47,7 @@ library Strings {
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
}
/**