From 6aa8f17ed580cdbef9ea365a71244fea8fda93c5 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Wed, 19 Aug 2020 11:39:49 -0400 Subject: [PATCH] `@0x/json-schemas`: Add `exchangeProxyMetaTransactionSchema`. --- packages/json-schemas/CHANGELOG.json | 9 ++++++ ...xchange_proxy_meta_transaction_schema.json | 30 +++++++++++++++++++ packages/json-schemas/src/schemas.ts | 2 ++ packages/json-schemas/tsconfig.json | 3 +- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 packages/json-schemas/schemas/exchange_proxy_meta_transaction_schema.json diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index 3c908e1336..c8c72da14d 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "5.2.0", + "changes": [ + { + "note": "Add `exchangeProxyMetaTransactionSchema`", + "pr": 2657 + } + ] + }, { "version": "5.1.0", "changes": [ diff --git a/packages/json-schemas/schemas/exchange_proxy_meta_transaction_schema.json b/packages/json-schemas/schemas/exchange_proxy_meta_transaction_schema.json new file mode 100644 index 0000000000..7c9a5a7d98 --- /dev/null +++ b/packages/json-schemas/schemas/exchange_proxy_meta_transaction_schema.json @@ -0,0 +1,30 @@ +{ + "id": "/exchangeProxyMetaTransactionSchema", + "properties": { + "signer": { "$ref": "/addressSchema" }, + "sender": { "$ref": "/addressSchema" }, + "minGasPrice": { "$ref": "/wholeNumberSchema" }, + "maxGasPrice": { "$ref": "/wholeNumberSchema" }, + "expirationTimeSeconds": { "$ref": "/wholeNumberSchema" }, + "salt": { "$ref": "/wholeNumberSchema" }, + "callData": { "$ref": "/hexSchema" }, + "value": { "$ref": "/wholeNumberSchema" }, + "feeToken": { "$ref": "/addressSchema" }, + "feeAmount": { "$ref": "/wholeNumberSchema" }, + "domain": { "$ref": "/eip712DomainSchema" } + }, + "required": [ + "signer", + "sender", + "minGasPrice", + "maxGasPrice", + "expirationTimeSeconds", + "salt", + "callData", + "value", + "feeToken", + "feeAmount", + "domain" + ], + "type": "object" +} diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts index 23836257b1..2e306e5939 100644 --- a/packages/json-schemas/src/schemas.ts +++ b/packages/json-schemas/src/schemas.ts @@ -7,6 +7,7 @@ import * as ecSignatureParameterSchema from '../schemas/ec_signature_parameter_s import * as ecSignatureSchema from '../schemas/ec_signature_schema.json'; import * as eip712DomainSchema from '../schemas/eip712_domain_schema.json'; import * as eip712TypedDataSchema from '../schemas/eip712_typed_data_schema.json'; +import * as exchangeProxyMetaTransactionSchema from '../schemas/exchange_proxy_meta_transaction_schema.json'; import * as hexSchema from '../schemas/hex_schema.json'; import * as indexFilterValuesSchema from '../schemas/index_filter_values_schema.json'; import * as jsNumber from '../schemas/js_number_schema.json'; @@ -87,5 +88,6 @@ export const schemas = { relayerApiOrdersResponseSchema, relayerApiAssetDataPairsSchema, zeroExTransactionSchema, + exchangeProxyMetaTransactionSchema, wholeNumberSchema, }; diff --git a/packages/json-schemas/tsconfig.json b/packages/json-schemas/tsconfig.json index 75fe2277af..430d3155d9 100644 --- a/packages/json-schemas/tsconfig.json +++ b/packages/json-schemas/tsconfig.json @@ -50,6 +50,7 @@ "./schemas/orderbook_request_schema.json", "./schemas/orders_request_opts_schema.json", "./schemas/paged_request_opts_schema.json", - "./schemas/order_config_request_schema.json" + "./schemas/order_config_request_schema.json", + "./schemas/exchange_proxy_meta_transaction_schema.json" ] }