Remove code in preparation for v5.0 (#4258)
Co-authored-by: Ernesto García <ernestognw@gmail.com> Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
@ -153,22 +153,6 @@ function get(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Same as {get}, with a custom error message when \`key\` is not in the map.
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {tryGet}.
|
||||
*/
|
||||
function get(
|
||||
Bytes32ToBytes32Map storage map,
|
||||
bytes32 key,
|
||||
string memory errorMessage
|
||||
) internal view returns (bytes32) {
|
||||
bytes32 value = map._values[key];
|
||||
require(value != 0 || contains(map, key), errorMessage);
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Return the an array containing all the keys
|
||||
*
|
||||
@ -261,20 +245,6 @@ function get(${name} storage map, ${keyType} key) internal view returns (${value
|
||||
return ${fromBytes32(valueType, `get(map._inner, ${toBytes32(keyType, 'key')})`)};
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Same as {get}, with a custom error message when \`key\` is not in the map.
|
||||
*
|
||||
* CAUTION: This function is deprecated because it requires allocating memory for the error
|
||||
* message unnecessarily. For custom revert reasons use {tryGet}.
|
||||
*/
|
||||
function get(
|
||||
${name} storage map,
|
||||
${keyType} key,
|
||||
string memory errorMessage
|
||||
) internal view returns (${valueType}) {
|
||||
return ${fromBytes32(valueType, `get(map._inner, ${toBytes32(keyType, 'key')}, errorMessage)`)};
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Return the an array containing all the keys
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user