Improve naming of internal variables (#2721)
This commit is contained in:
@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
|
|||||||
* @dev String operations.
|
* @dev String operations.
|
||||||
*/
|
*/
|
||||||
library Strings {
|
library Strings {
|
||||||
bytes16 private constant _ALPHABET = "0123456789abcdef";
|
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
|
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
|
||||||
@ -57,7 +57,7 @@ library Strings {
|
|||||||
buffer[0] = "0";
|
buffer[0] = "0";
|
||||||
buffer[1] = "x";
|
buffer[1] = "x";
|
||||||
for (uint256 i = 2 * length + 1; i > 1; --i) {
|
for (uint256 i = 2 * length + 1; i > 1; --i) {
|
||||||
buffer[i] = _ALPHABET[value & 0xf];
|
buffer[i] = _HEX_SYMBOLS[value & 0xf];
|
||||||
value >>= 4;
|
value >>= 4;
|
||||||
}
|
}
|
||||||
require(value == 0, "Strings: hex length insufficient");
|
require(value == 0, "Strings: hex length insufficient");
|
||||||
|
|||||||
@ -74,10 +74,10 @@ abstract contract EIP712 {
|
|||||||
|
|
||||||
function _buildDomainSeparator(
|
function _buildDomainSeparator(
|
||||||
bytes32 typeHash,
|
bytes32 typeHash,
|
||||||
bytes32 name,
|
bytes32 nameHash,
|
||||||
bytes32 version
|
bytes32 versionHash
|
||||||
) private view returns (bytes32) {
|
) private view returns (bytes32) {
|
||||||
return keccak256(abi.encode(typeHash, name, version, block.chainid, address(this)));
|
return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user