Add CallData schema to json-schemas
This commit is contained in:
parent
75babed693
commit
2a7b3aecc3
@ -5,6 +5,10 @@
|
|||||||
{
|
{
|
||||||
"note": "Update schemas for V2",
|
"note": "Update schemas for V2",
|
||||||
"pr": 615
|
"pr": 615
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "Added CallData schema",
|
||||||
|
"pr": 821
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
27
packages/json-schemas/schemas/call_data_schema.ts
Normal file
27
packages/json-schemas/schemas/call_data_schema.ts
Normal file
@ -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,
|
||||||
|
};
|
@ -1,5 +1,6 @@
|
|||||||
import { addressSchema, hexSchema, numberSchema } from '../schemas/basic_type_schemas';
|
import { addressSchema, hexSchema, numberSchema } from '../schemas/basic_type_schemas';
|
||||||
import { blockParamSchema, blockRangeSchema } from '../schemas/block_range_schema';
|
import { blockParamSchema, blockRangeSchema } from '../schemas/block_range_schema';
|
||||||
|
import { callDataSchema } from '../schemas/call_data_schema';
|
||||||
import { ecSignatureSchema } from '../schemas/ec_signature_schema';
|
import { ecSignatureSchema } from '../schemas/ec_signature_schema';
|
||||||
import { indexFilterValuesSchema } from '../schemas/index_filter_values_schema';
|
import { indexFilterValuesSchema } from '../schemas/index_filter_values_schema';
|
||||||
import { orderCancellationRequestsSchema } from '../schemas/order_cancel_schema';
|
import { orderCancellationRequestsSchema } from '../schemas/order_cancel_schema';
|
||||||
@ -31,6 +32,7 @@ import { jsNumber, txDataSchema } from '../schemas/tx_data_schema';
|
|||||||
export const schemas = {
|
export const schemas = {
|
||||||
numberSchema,
|
numberSchema,
|
||||||
addressSchema,
|
addressSchema,
|
||||||
|
callDataSchema,
|
||||||
hexSchema,
|
hexSchema,
|
||||||
ecSignatureSchema,
|
ecSignatureSchema,
|
||||||
indexFilterValuesSchema,
|
indexFilterValuesSchema,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user