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

Improve naming of internal variables #2721

Merged
merged 1 commit into from Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/utils/Strings.sol
Expand Up @@ -6,7 +6,7 @@ pragma solidity ^0.8.0;
* @dev String operations.
*/
library Strings {
bytes16 private constant _ALPHABET = "0123456789abcdef";
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
Expand Down Expand Up @@ -57,7 +57,7 @@ library Strings {
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _ALPHABET[value & 0xf];
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
Expand Down
6 changes: 3 additions & 3 deletions contracts/utils/cryptography/draft-EIP712.sol
Expand Up @@ -74,10 +74,10 @@ abstract contract EIP712 {

function _buildDomainSeparator(
bytes32 typeHash,
bytes32 name,
bytes32 version
bytes32 nameHash,
bytes32 versionHash
) 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)));
}

/**
Expand Down