Refactored mock contract

This commit is contained in:
Thrilok Kumar 2020-05-04 02:48:00 +05:30
parent b7f16e6c86
commit d2c26192ca
3 changed files with 11 additions and 8 deletions

View File

@ -7,4 +7,13 @@ interface ERC20 {
function deposit() external payable;
function withdraw(uint) external;
function balanceOf(address) external view returns (uint);
}
interface MemoryInterface {
function getUint(uint id) external returns (uint num);
function setUint(uint id, uint val) external;
}
interface EventInterface {
function emitEvent(uint connectorType, uint connectorID, bytes32 eventCode, bytes calldata eventData) external;
}

View File

@ -1,13 +1,7 @@
pragma solidity ^0.6.0;
interface MemoryInterface {
function getUint(uint id) external returns (uint num);
function setUint(uint id, uint val) external;
}
import { MemoryInterface, EventInterface} from "./interfaces.sol";
interface EventInterface {
function emitEvent(uint connectorType, uint connectorID, bytes32 eventCode, bytes calldata eventData) external;
}
contract Stores {

View File

@ -1,7 +1,7 @@
pragma solidity ^0.6.0;
// import files from common directory
import { ERC20 } from "../common/ERC20.sol";
import { ERC20 , MemoryInterface, EventInterface} from "../common/interfaces.sol";
import { Stores } from "../common/stores.sol";
import { DSMath } from "../common/math.sol";