aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2019-03-11 14:21:04 +0800
committerHsuan Lee <boczeratul@gmail.com>2019-03-11 14:23:45 +0800
commite4308a3a78ec9f806a28cc89771a751f6dfeac41 (patch)
tree9c0c06e9054bad52383a6ec5ffe486af9e3a38f2
parent35703539d0f2b4ddb3b11d0de8c9634af59ab71f (diff)
downloaddexon-0x-contracts-e4308a3a78ec9f806a28cc89771a751f6dfeac41.tar.gz
dexon-0x-contracts-e4308a3a78ec9f806a28cc89771a751f6dfeac41.tar.zst
dexon-0x-contracts-e4308a3a78ec9f806a28cc89771a751f6dfeac41.zip
Add Orderbook structure
-rw-r--r--contracts/exchange/contracts/src/Exchange.sol7
-rw-r--r--contracts/exchange/contracts/src/MixinOrderbook.sol29
-rw-r--r--contracts/exchange/contracts/src/interfaces/IOrderbook.sol22
-rw-r--r--contracts/exchange/contracts/src/mixins/MOrderbook.sol26
4 files changed, 82 insertions, 2 deletions
diff --git a/contracts/exchange/contracts/src/Exchange.sol b/contracts/exchange/contracts/src/Exchange.sol
index 541750518..e78e58cf5 100644
--- a/contracts/exchange/contracts/src/Exchange.sol
+++ b/contracts/exchange/contracts/src/Exchange.sol
@@ -26,6 +26,7 @@ import "./MixinWrapperFunctions.sol";
import "./MixinAssetProxyDispatcher.sol";
import "./MixinTransactions.sol";
import "./MixinMatchOrders.sol";
+import "./MixinOrderbook.sol";
// solhint-disable no-empty-blocks
@@ -35,9 +36,10 @@ contract Exchange is
MixinSignatureValidator,
MixinTransactions,
MixinAssetProxyDispatcher,
- MixinWrapperFunctions
+ MixinWrapperFunctions,
+ MixinOrderbook
{
- string constant public VERSION = "2.0.1-alpha";
+ string constant public VERSION = "2.1.0-alpha";
// Mixins are instantiated in the order they are inherited
constructor (bytes memory _zrxAssetData)
@@ -49,5 +51,6 @@ contract Exchange is
MixinTransactions()
MixinAssetProxyDispatcher()
MixinWrapperFunctions()
+ MixinOrderbook()
{}
}
diff --git a/contracts/exchange/contracts/src/MixinOrderbook.sol b/contracts/exchange/contracts/src/MixinOrderbook.sol
new file mode 100644
index 000000000..271f28da2
--- /dev/null
+++ b/contracts/exchange/contracts/src/MixinOrderbook.sol
@@ -0,0 +1,29 @@
+/*
+
+ Copyright 2019 DEXON Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+
+pragma solidity ^0.4.24;
+pragma experimental ABIEncoderV2;
+
+import "./mixins/MOrderbook.sol";
+
+
+contract MixinOrderbook is
+ MOrderbook
+{
+
+}
diff --git a/contracts/exchange/contracts/src/interfaces/IOrderbook.sol b/contracts/exchange/contracts/src/interfaces/IOrderbook.sol
new file mode 100644
index 000000000..f42517087
--- /dev/null
+++ b/contracts/exchange/contracts/src/interfaces/IOrderbook.sol
@@ -0,0 +1,22 @@
+/*
+
+ Copyright 2019 DEXON Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+pragma solidity ^0.4.24;
+
+
+contract IOrderbook {
+}
diff --git a/contracts/exchange/contracts/src/mixins/MOrderbook.sol b/contracts/exchange/contracts/src/mixins/MOrderbook.sol
new file mode 100644
index 000000000..bb2886cd4
--- /dev/null
+++ b/contracts/exchange/contracts/src/mixins/MOrderbook.sol
@@ -0,0 +1,26 @@
+/*
+
+ Copyright 2019 DEXON Foundation.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/
+pragma solidity ^0.4.24;
+
+import "../interfaces/IOrderbook.sol";
+
+
+contract MOrderbook is
+ IOrderbook
+{
+}