From 7ac87add12b4bb70ca493173661c895e6be17b4d Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Sat, 2 May 2020 22:55:27 +0530 Subject: [PATCH] Refactor mock.sol --- contracts/common/interfaces.sol | 10 ++++++++++ contracts/common/stores.sol | 9 +-------- contracts/connectors/mock.sol | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 contracts/common/interfaces.sol diff --git a/contracts/common/interfaces.sol b/contracts/common/interfaces.sol new file mode 100644 index 0000000..e633a8e --- /dev/null +++ b/contracts/common/interfaces.sol @@ -0,0 +1,10 @@ +pragma solidity ^0.6.0; + +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; +} \ No newline at end of file diff --git a/contracts/common/stores.sol b/contracts/common/stores.sol index 5e47737..8914a25 100644 --- a/contracts/common/stores.sol +++ b/contracts/common/stores.sol @@ -1,13 +1,6 @@ pragma solidity ^0.6.0; -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; -} +import "./interfaces.sol"; contract Stores { diff --git a/contracts/connectors/mock.sol b/contracts/connectors/mock.sol index 9e7059f..da3c4b1 100644 --- a/contracts/connectors/mock.sol +++ b/contracts/connectors/mock.sol @@ -1,8 +1,8 @@ pragma solidity ^0.6.0; // import files from common directory -import { DSMath } from "../common/math.sol"; import { Stores } from "../common/stores.sol"; +import { DSMath } from "../common/math.sol"; contract MockProtocol is Stores, DSMath {