forked from cerc-io/laconicd-deprecated
tests: reorganize packages (#7)
* tests: reorganize testing packages * gitignore and minor changes
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
library UnstructuredStorage {
|
||||
function getStorageBool(bytes32 position) internal view returns (bool data) {
|
||||
assembly { data := sload(position) }
|
||||
}
|
||||
|
||||
function getStorageAddress(bytes32 position) internal view returns (address data) {
|
||||
assembly { data := sload(position) }
|
||||
}
|
||||
|
||||
function getStorageBytes32(bytes32 position) internal view returns (bytes32 data) {
|
||||
assembly { data := sload(position) }
|
||||
}
|
||||
|
||||
function getStorageUint256(bytes32 position) internal view returns (uint256 data) {
|
||||
assembly { data := sload(position) }
|
||||
}
|
||||
|
||||
function setStorageBool(bytes32 position, bool data) internal {
|
||||
assembly { sstore(position, data) }
|
||||
}
|
||||
|
||||
function setStorageAddress(bytes32 position, address data) internal {
|
||||
assembly { sstore(position, data) }
|
||||
}
|
||||
|
||||
function setStorageBytes32(bytes32 position, bytes32 data) internal {
|
||||
assembly { sstore(position, data) }
|
||||
}
|
||||
|
||||
function setStorageUint256(bytes32 position, uint256 data) internal {
|
||||
assembly { sstore(position, data) }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user