Gelato-automations/contracts/functions/InstaDapp/FInstaDapp.sol

14 lines
481 B
Solidity
Raw Normal View History

2020-11-02 10:51:49 +00:00
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.4;
import {MemoryInterface} from "../../interfaces/InstaDapp/IInstaDapp.sol";
import {INSTA_MEMORY} from "../../constants/CInstaDapp.sol";
2020-11-03 13:25:36 +00:00
function _setUint(uint256 setId, uint256 val) {
2020-11-02 10:51:49 +00:00
if (setId != 0) MemoryInterface(INSTA_MEMORY).setUint(setId, val);
}
2020-11-03 13:25:36 +00:00
function _getUint(uint256 getId, uint256 val) returns (uint256 returnVal) {
2020-11-02 10:51:49 +00:00
returnVal = getId == 0 ? val : MemoryInterface(INSTA_MEMORY).getUint(getId);
}