2022-01-13 19:47:26 +00:00
|
|
|
pragma solidity ^0.7.0;
|
|
|
|
|
2022-01-14 18:34:24 +00:00
|
|
|
import { MemoryInterface } from "./interfaces.sol";
|
2022-01-13 19:47:26 +00:00
|
|
|
|
|
|
|
abstract contract Stores {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return ethereum address
|
|
|
|
*/
|
|
|
|
address constant internal ethAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return Wrapped ETH address
|
|
|
|
*/
|
|
|
|
address constant internal wethAddr = 0x4200000000000000000000000000000000000006;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return memory variable address
|
|
|
|
*/
|
|
|
|
MemoryInterface constant internal instaMemory = MemoryInterface(0x3254Ce8f5b1c82431B8f21Df01918342215825C2);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Get Uint value from InstaMemory Contract.
|
|
|
|
*/
|
|
|
|
function getUint(uint getId, uint val) internal returns (uint returnVal) {
|
|
|
|
returnVal = getId == 0 ? val : instaMemory.getUint(getId);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Set Uint value in InstaMemory Contract.
|
|
|
|
*/
|
|
|
|
function setUint(uint setId, uint val) virtual internal {
|
|
|
|
if (setId != 0) instaMemory.setUint(setId, val);
|
|
|
|
}
|
|
|
|
}
|