Last active
April 5, 2019 15:03
-
-
Save daniellehrner/3edce3ab6297f5f8ca0007a68a0d1d7a to your computer and use it in GitHub Desktop.
Eternal storage for uint256
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapping(bytes32 => uint256) internal uInt256Storage; | |
function getUInt256(bytes32 _key) external view returns (uint256) { | |
return uInt256Storage[_key]; | |
} | |
function setUInt256(bytes32 _key, uint256 _value) external { | |
uInt256Storage[_key] = _value; | |
} | |
function deleteUInt256(bytes32 _key) external { | |
delete uInt256Storage[_key]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment