From 2a7b3aecc3886bb4b699df17a0efef984e633d1f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 5 Jul 2018 12:33:48 +0200 Subject: Add CallData schema to json-schemas --- packages/json-schemas/schemas/call_data_schema.ts | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packages/json-schemas/schemas/call_data_schema.ts (limited to 'packages/json-schemas/schemas') diff --git a/packages/json-schemas/schemas/call_data_schema.ts b/packages/json-schemas/schemas/call_data_schema.ts new file mode 100644 index 000000000..e8fcc7512 --- /dev/null +++ b/packages/json-schemas/schemas/call_data_schema.ts @@ -0,0 +1,27 @@ +export const callDataSchema = { + id: '/TxData', + properties: { + from: { $ref: '/Address' }, + to: { $ref: '/Address' }, + value: { + oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], + }, + gas: { + oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], + }, + gasPrice: { + oneOf: [{ $ref: '/Number' }, { $ref: '/JsNumber' }], + }, + data: { + type: 'string', + pattern: '^0x[0-9a-f]*$', + }, + nonce: { + type: 'number', + minimum: 0, + }, + }, + required: [], + type: 'object', + additionalProperties: false, +}; -- cgit v1.2.3