Last active
February 3, 2024 07:54
-
-
Save elenadimitrova/cf845f85cea05c0c257ba08437f04dd0 to your computer and use it in GitHub Desktop.
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
contract EternalStorage{ | |
mapping(bytes32 => uint) UIntStorage; | |
function getUIntValue(bytes32 record) constant returns (uint){ | |
return UIntStorage[record]; | |
} | |
function setUIntValue(bytes32 record, uint value) | |
{ | |
UIntStorage[record] = value; | |
} | |
mapping(bytes32 => string) StringStorage; | |
function getStringValue(bytes32 record) constant returns (string){ | |
return StringStorage[record]; | |
} | |
function setStringValue(bytes32 record, string value) | |
{ | |
StringStorage[record] = value; | |
} | |
mapping(bytes32 => address) AddressStorage; | |
function getAddressValue(bytes32 record) constant returns (address){ | |
return AddressStorage[record]; | |
} | |
function setAddressValue(bytes32 record, address value) | |
{ | |
AddressStorage[record] = value; | |
} | |
mapping(bytes32 => bytes) BytesStorage; | |
function getBytesValue(bytes32 record) constant returns (bytes){ | |
return BytesStorage[record]; | |
} | |
function setBytesValue(bytes32 record, bytes value) | |
{ | |
BytesStorage[record] = value; | |
} | |
mapping(bytes32 => bool) BooleanStorage; | |
function getBooleanValue(bytes32 record) constant returns (bool){ | |
return BooleanStorage[record]; | |
} | |
function setBooleanValue(bytes32 record, bool value) | |
{ | |
BooleanStorage[record] = value; | |
} | |
mapping(bytes32 => int) IntStorage; | |
function getIntValue(bytes32 record) constant returns (int){ | |
return IntStorage[record]; | |
} | |
function setIntValue(bytes32 record, int value) | |
{ | |
IntStorage[record] = value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment