Update contracts to support Solidity 0.8.x (#2442)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity >=0.6.0 <0.8.0;
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
/**
|
||||
* @dev String operations.
|
||||
@ -23,10 +23,10 @@ library Strings {
|
||||
temp /= 10;
|
||||
}
|
||||
bytes memory buffer = new bytes(digits);
|
||||
uint256 index = digits - 1;
|
||||
uint256 index = digits;
|
||||
temp = value;
|
||||
while (temp != 0) {
|
||||
buffer[index--] = bytes1(uint8(48 + temp % 10));
|
||||
buffer[--index] = bytes1(uint8(48 + uint256(temp % 10)));
|
||||
temp /= 10;
|
||||
}
|
||||
return string(buffer);
|
||||
|
||||
Reference in New Issue
Block a user