2022-03-22 14:47:37 +00:00
|
|
|
//SPDX-License-Identifier: MIT
|
2021-09-20 03:53:16 +00:00
|
|
|
pragma solidity ^0.7.0;
|
|
|
|
|
|
|
|
import { MemoryInterface, InstaMapping } from "./interfaces.sol";
|
|
|
|
|
|
|
|
|
|
|
|
abstract contract Stores {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return ethereum address
|
|
|
|
*/
|
|
|
|
address constant internal ethAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return Wrapped ETH address
|
|
|
|
*/
|
|
|
|
address constant internal wethAddr = 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return memory variable address
|
|
|
|
*/
|
|
|
|
MemoryInterface constant internal instaMemory = MemoryInterface(0xc109f7Ef06152c3a63dc7254fD861E612d3Ac571);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @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);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|