Skip to content

Commit

Permalink
chore: use internal instead of private
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Oct 22, 2024
1 parent ced305c commit 25771e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/MorphoTokenOptimism.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract MorphoTokenOptimism is Token {
string internal constant SYMBOL = "MORPHO";

// keccak256(abi.encode(uint256(keccak256("morpho.storage.OptimismMintableERC20")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant OptimismMintableERC20StorageLocation =
bytes32 internal constant OptimismMintableERC20StorageLocation =
0x6fd4c0a11d0843c68c809f0a5f29b102d54bc08a251c384d9ad17600bfa05d00;

/* STORAGE LAYOUT */
Expand Down Expand Up @@ -111,10 +111,10 @@ contract MorphoTokenOptimism is Token {
return $._bridge;
}

/* PRIVATE */
/* INTERNAL */

/// @dev Returns the OptimismMintableERC20Storage struct.
function _getOptimismMintableERC20Storage() private pure returns (OptimismMintableERC20Storage storage $) {
function _getOptimismMintableERC20Storage() internal pure returns (OptimismMintableERC20Storage storage $) {
assembly {
$.slot := OptimismMintableERC20StorageLocation
}
Expand Down
4 changes: 2 additions & 2 deletions src/Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ abstract contract Token is
{
/* CONSTANTS */

bytes32 private constant DELEGATION_TYPEHASH =
bytes32 internal constant DELEGATION_TYPEHASH =
keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

// keccak256(abi.encode(uint256(keccak256("morpho.storage.ERC20Delegates")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ERC20DelegatesStorageLocation =
bytes32 internal constant ERC20DelegatesStorageLocation =
0x1dc92b2c6e971ab6e08dfd7dcec0e9496d223ced663ba2a06543451548549500;

/* STORAGE LAYOUT */
Expand Down
8 changes: 3 additions & 5 deletions test/helpers/SigUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ library SigUtils {
uint256 deadline;
}

bytes32 private constant DELEGATION_TYPEHASH =
bytes32 internal constant DELEGATION_TYPEHASH =
keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

bytes32 private constant PERMIT_TYPEHASH =
bytes32 internal constant PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

bytes32 private constant TYPE_HASH =
bytes32 internal constant TYPE_HASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

// bytes32 private constant DOMAIN_SEPARATOR = 0xebe7cdc854ed987c1fb2e9e58acbe8b1afdc4375c51e160b9a8de75014baa36b;

/// @dev Computes the hash of the EIP-712 encoded data.
function getDelegationTypedDataHash(Delegation memory delegation, address contractAddress)
internal
Expand Down

0 comments on commit 25771e9

Please sign in to comment.