2021-09-29 14:16:30 +00:00
|
|
|
pragma solidity ^0.7.0;
|
|
|
|
|
2021-10-08 07:21:31 +00:00
|
|
|
import { MemoryInterface } from "./interfaces.sol";
|
2021-09-29 14:16:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
abstract contract Stores {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return avax address
|
|
|
|
*/
|
|
|
|
address constant internal avaxAddr = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return Wrapped AVAX address
|
|
|
|
*/
|
2021-09-30 07:17:17 +00:00
|
|
|
address constant internal wavaxAddr = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7;
|
2021-09-29 14:16:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Return memory variable address
|
|
|
|
*/
|
2021-10-08 07:21:31 +00:00
|
|
|
MemoryInterface constant internal instaMemory = MemoryInterface(0x3254Ce8f5b1c82431B8f21Df01918342215825C2);
|
2021-09-29 14:16:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|