Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize toString #3573

Merged
merged 18 commits into from
Aug 31, 2022
Prev Previous commit
Next Next commit
prettier
  • Loading branch information
CodeSandwich committed Aug 26, 2022
commit 8e955af1243e02a298f0b7f9889060b04f27d0e9
4 changes: 2 additions & 2 deletions contracts/utils/Strings.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ library Strings {
// now, length is log10(value) + 1

string memory buffer = new string(length);
uint ptr;
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while(true) {
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
Expand Down