Add Prettier for linting and fix Solhint config (#2697)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
|
||||
* @dev String operations.
|
||||
*/
|
||||
library Strings {
|
||||
bytes16 private constant alphabet = "0123456789abcdef";
|
||||
bytes16 private constant _ALPHABET = "0123456789abcdef";
|
||||
|
||||
/**
|
||||
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
|
||||
@ -57,11 +57,10 @@ library Strings {
|
||||
buffer[0] = "0";
|
||||
buffer[1] = "x";
|
||||
for (uint256 i = 2 * length + 1; i > 1; --i) {
|
||||
buffer[i] = alphabet[value & 0xf];
|
||||
buffer[i] = _ALPHABET[value & 0xf];
|
||||
value >>= 4;
|
||||
}
|
||||
require(value == 0, "Strings: hex length insufficient");
|
||||
return string(buffer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user