From 8f73649b5b7465995371cdc827d3720bf1ff9195 Mon Sep 17 00:00:00 2001 From: Adrien Lacombe Date: Wed, 15 Nov 2023 16:28:27 +0100 Subject: [PATCH] add 712 schema --- polygon/eip712.schema.json | 93 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 polygon/eip712.schema.json diff --git a/polygon/eip712.schema.json b/polygon/eip712.schema.json new file mode 100644 index 00000000..28abea57 --- /dev/null +++ b/polygon/eip712.schema.json @@ -0,0 +1,93 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "properties": { + "blockchainName": { + "enum": [ + "polygon" + ] + }, + "chainId": { + "enum": [ + 137 + ] + }, + "contracts": { + "items": { + "properties": { + "address": { + "pattern": "^0x[a-z0-9]{40}$", + "type": "string" + }, + "contractName": { + "type": "string" + }, + "messages": { + "items": { + "additionalProperties": false, + "properties": { + "mapper": { + "additionalProperties": false, + "properties": { + "fields": { + "items": { + "additionalProperties": false, + "properties": { + "label": { + "type": "string" + }, + "path": { + "type": "string" + } + }, + "required": [ + "path", + "label" + ], + "type": "object" + }, + "type": "array" + }, + "label": { + "type": "string" + } + }, + "required": [ + "label", + "fields" + ], + "type": "object" + }, + "schema": { + "type": "object" + } + }, + "required": [ + "schema", + "mapper" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "address", + "contractName", + "messages" + ], + "type": "object" + }, + "type": "array" + }, + "name": { + "type": "string" + } + }, + "required": [ + "blockchainName", + "contracts", + "name", + "chainId" + ], + "type": "object" +}