Created
May 7, 2018 23:34
-
-
Save p5150j/c75f03291389cf4a7ca0b7c750df6df0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE `foo`; | |
DROP TABLE IF EXISTS `orders`; | |
-- Order object example | |
-- "exchangeContractAddress": "0x12459c951127e0c374ff9105dda097662a027093", | |
-- "maker": "0x9e56625509c2f60af937f23b7b532600390e8c8b", | |
-- "taker": "0xa2b31dacf30a9c50ca473337c01d8a201ae33e32", | |
-- "makerTokenAddress": "0x323b5d4c32345ced77393b3530b1eed0f346429d", | |
-- "takerTokenAddress": "0xef7fff64389b814a946f3e92105513705ca6b990", | |
-- "feeRecipient": "0xb046140686d052fff581f63f8136cce132e857da", | |
-- "makerTokenAmount": "10000000000000000", | |
-- "takerTokenAmount": "20000000000000000", | |
-- "makerFee": "100000000000000", | |
-- "takerFee": "200000000000000", | |
-- "expirationUnixTimestampSec": "42", | |
-- "salt": "67006738228878699843088602623665307406148487219438534730168799356281242528500", | |
-- "ecSignature": { | |
-- "v": 27, | |
-- "r": "0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33", | |
-- "s": "0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254" | |
-- } | |
-- Additional fields: | |
-- orderHash - varchar the order hash | |
-- open - int (bool eval) is the order still open | |
-- pruned - int (bool eval) is the order pruned | |
-- rate - double the makerTokenAmount/takerTokenAmount rate | |
-- invRate - double the takerTokenAmount/makerTokenAmount rate | |
CREATE TABLE `orders` ( | |
ID INT NOT NULL AUTO_INCREMENT, | |
orderHash VARCHAR(200) UNIQUE NOT NULL, | |
exchangeContractAddress VARCHAR(42) NOT NULL, | |
maker VARCHAR(42) NOT NULL, | |
taker VARCHAR(42) NOT NULL, | |
makerTokenAddress VARCHAR(42) NOT NULL, | |
takerTokenAddress VARCHAR(42) NOT NULL, | |
feeRecipient VARCHAR(42) NOT NULL, | |
makerTokenAmount VARCHAR(100) NOT NULL, | |
takerTokenAmount VARCHAR(100) NOT NULL, | |
makerFee VARCHAR(100) NOT NULL, | |
takerFee VARCHAR(100) NOT NULL, | |
expirationUnixTimestampSec BIGINT NOT NULL, | |
salt VARCHAR(100) NOT NULL, | |
ecSignatureV INT NOT NULL, | |
ecSignatureR VARCHAR(100) NOT NULL, | |
ecSignatureS VARCHAR(100) NOT NULL, | |
open INT DEFAULT 1, | |
pruned INT DEFAULT 0, | |
rate DOUBLE NOT NULL, | |
invRate DOUBLE NOT NULL, | |
createdDate timestamp NOT NULL DEFAULT current_timestamp, | |
PRIMARY KEY(ID, orderHash) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment