aboutsummaryrefslogtreecommitdiffstats
path: root/src/schemas
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-06-09 00:31:21 +0800
committerGitHub <noreply@github.com>2017-06-09 00:31:21 +0800
commit743ba29918715e21c7891b3c7426dcb5fdc14e17 (patch)
tree6053e4d717a0d0f5dcc96124b27fffaec072421c /src/schemas
parent31cc75bd6d2651466ebf50e9374d5cd19de6dd5e (diff)
parentb1b879e217f383fa694214e731969647f9f6fd78 (diff)
downloaddexon-sol-tools-743ba29918715e21c7891b3c7426dcb5fdc14e17.tar
dexon-sol-tools-743ba29918715e21c7891b3c7426dcb5fdc14e17.tar.gz
dexon-sol-tools-743ba29918715e21c7891b3c7426dcb5fdc14e17.tar.bz2
dexon-sol-tools-743ba29918715e21c7891b3c7426dcb5fdc14e17.tar.lz
dexon-sol-tools-743ba29918715e21c7891b3c7426dcb5fdc14e17.tar.xz
dexon-sol-tools-743ba29918715e21c7891b3c7426dcb5fdc14e17.tar.zst
dexon-sol-tools-743ba29918715e21c7891b3c7426dcb5fdc14e17.zip
Merge pull request #44 from 0xProject/batchFillOrKill
Implement BatchFillOrKill and tests
Diffstat (limited to 'src/schemas')
-rw-r--r--src/schemas/basic_type_schemas.ts11
-rw-r--r--src/schemas/order_fill_or_kill_requests_schema.ts12
-rw-r--r--src/schemas/order_schemas.ts12
3 files changed, 23 insertions, 12 deletions
diff --git a/src/schemas/basic_type_schemas.ts b/src/schemas/basic_type_schemas.ts
new file mode 100644
index 000000000..c3b81185d
--- /dev/null
+++ b/src/schemas/basic_type_schemas.ts
@@ -0,0 +1,11 @@
+export const addressSchema = {
+ id: '/addressSchema',
+ type: 'string',
+ pattern: '^0[xX][0-9A-Fa-f]{40}$',
+};
+
+export const numberSchema = {
+ id: '/numberSchema',
+ type: 'string',
+ pattern: '^\\d+(\\.\\d+)?$',
+};
diff --git a/src/schemas/order_fill_or_kill_requests_schema.ts b/src/schemas/order_fill_or_kill_requests_schema.ts
new file mode 100644
index 000000000..4db7113de
--- /dev/null
+++ b/src/schemas/order_fill_or_kill_requests_schema.ts
@@ -0,0 +1,12 @@
+export const orderFillOrKillRequestsSchema = {
+ id: '/OrderFillOrKillRequests',
+ type: 'array',
+ items: {
+ properties: {
+ signedOrder: {$ref: '/signedOrderSchema'},
+ fillTakerAmount: {type: '/numberSchema'},
+ },
+ required: ['signedOrder', 'fillTakerAmount'],
+ type: 'object',
+ },
+};
diff --git a/src/schemas/order_schemas.ts b/src/schemas/order_schemas.ts
index 4999f3e9d..133736b3d 100644
--- a/src/schemas/order_schemas.ts
+++ b/src/schemas/order_schemas.ts
@@ -1,15 +1,3 @@
-export const addressSchema = {
- id: '/addressSchema',
- type: 'string',
- pattern: '^0[xX][0-9A-Fa-f]{40}$',
-};
-
-export const numberSchema = {
- id: '/numberSchema',
- type: 'string',
- pattern: '^\\d+(\\.\\d+)?$',
-};
-
export const orderSchema = {
id: '/orderSchema',
properties: {