From 0d0f8199fa50391a4ccd149f7116e63b2b0bfd4f Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Thu, 22 Jun 2023 17:17:32 +0200 Subject: [PATCH] Update cyberpunk schemas --- contracts/cyberpunk/schema/cyberpunk.json | 186 ++++++++++++++++++ contracts/cyberpunk/schema/raw/query.json | 36 ++++ .../schema/raw/response_to_denom.json | 72 +++++++ .../schema/raw/response_to_denoms.json | 78 ++++++++ 4 files changed, 372 insertions(+) create mode 100644 contracts/cyberpunk/schema/raw/response_to_denom.json create mode 100644 contracts/cyberpunk/schema/raw/response_to_denoms.json diff --git a/contracts/cyberpunk/schema/cyberpunk.json b/contracts/cyberpunk/schema/cyberpunk.json index dcce96d609..ccb550b1ad 100644 --- a/contracts/cyberpunk/schema/cyberpunk.json +++ b/contracts/cyberpunk/schema/cyberpunk.json @@ -199,12 +199,198 @@ } }, "additionalProperties": false + }, + { + "description": "Queries `AllDenomMetadata` from the bank module repeatedly and returns all entries", + "type": "object", + "required": [ + "denoms" + ], + "properties": { + "denoms": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Queries `DenomMetadata` from the bank module and returns the result", + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ] }, "migrate": null, "sudo": null, "responses": { + "denom": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "DenomMetadata", + "description": "Replicates the cosmos-sdk bank module Metadata type", + "type": "object", + "required": [ + "base", + "denom_units", + "description", + "display", + "name", + "symbol", + "uri", + "uri_hash" + ], + "properties": { + "base": { + "type": "string" + }, + "denom_units": { + "type": "array", + "items": { + "$ref": "#/definitions/DenomUnit" + } + }, + "description": { + "type": "string" + }, + "display": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "uri_hash": { + "type": "string" + } + }, + "definitions": { + "DenomUnit": { + "description": "Replicates the cosmos-sdk bank module DenomUnit type", + "type": "object", + "required": [ + "aliases", + "denom", + "exponent" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "denom": { + "type": "string" + }, + "exponent": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + } + } + }, + "denoms": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Array_of_DenomMetadata", + "type": "array", + "items": { + "$ref": "#/definitions/DenomMetadata" + }, + "definitions": { + "DenomMetadata": { + "description": "Replicates the cosmos-sdk bank module Metadata type", + "type": "object", + "required": [ + "base", + "denom_units", + "description", + "display", + "name", + "symbol", + "uri", + "uri_hash" + ], + "properties": { + "base": { + "type": "string" + }, + "denom_units": { + "type": "array", + "items": { + "$ref": "#/definitions/DenomUnit" + } + }, + "description": { + "type": "string" + }, + "display": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "uri_hash": { + "type": "string" + } + } + }, + "DenomUnit": { + "description": "Replicates the cosmos-sdk bank module DenomUnit type", + "type": "object", + "required": [ + "aliases", + "denom", + "exponent" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "denom": { + "type": "string" + }, + "exponent": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + } + } + }, "mirror_env": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Env", diff --git a/contracts/cyberpunk/schema/raw/query.json b/contracts/cyberpunk/schema/raw/query.json index 18c07a5622..47b493442f 100644 --- a/contracts/cyberpunk/schema/raw/query.json +++ b/contracts/cyberpunk/schema/raw/query.json @@ -15,6 +15,42 @@ } }, "additionalProperties": false + }, + { + "description": "Queries `AllDenomMetadata` from the bank module repeatedly and returns all entries", + "type": "object", + "required": [ + "denoms" + ], + "properties": { + "denoms": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "description": "Queries `DenomMetadata` from the bank module and returns the result", + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ] } diff --git a/contracts/cyberpunk/schema/raw/response_to_denom.json b/contracts/cyberpunk/schema/raw/response_to_denom.json new file mode 100644 index 0000000000..b541da804b --- /dev/null +++ b/contracts/cyberpunk/schema/raw/response_to_denom.json @@ -0,0 +1,72 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "DenomMetadata", + "description": "Replicates the cosmos-sdk bank module Metadata type", + "type": "object", + "required": [ + "base", + "denom_units", + "description", + "display", + "name", + "symbol", + "uri", + "uri_hash" + ], + "properties": { + "base": { + "type": "string" + }, + "denom_units": { + "type": "array", + "items": { + "$ref": "#/definitions/DenomUnit" + } + }, + "description": { + "type": "string" + }, + "display": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "uri_hash": { + "type": "string" + } + }, + "definitions": { + "DenomUnit": { + "description": "Replicates the cosmos-sdk bank module DenomUnit type", + "type": "object", + "required": [ + "aliases", + "denom", + "exponent" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "denom": { + "type": "string" + }, + "exponent": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + } + } +} diff --git a/contracts/cyberpunk/schema/raw/response_to_denoms.json b/contracts/cyberpunk/schema/raw/response_to_denoms.json new file mode 100644 index 0000000000..e8fcd9a16e --- /dev/null +++ b/contracts/cyberpunk/schema/raw/response_to_denoms.json @@ -0,0 +1,78 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Array_of_DenomMetadata", + "type": "array", + "items": { + "$ref": "#/definitions/DenomMetadata" + }, + "definitions": { + "DenomMetadata": { + "description": "Replicates the cosmos-sdk bank module Metadata type", + "type": "object", + "required": [ + "base", + "denom_units", + "description", + "display", + "name", + "symbol", + "uri", + "uri_hash" + ], + "properties": { + "base": { + "type": "string" + }, + "denom_units": { + "type": "array", + "items": { + "$ref": "#/definitions/DenomUnit" + } + }, + "description": { + "type": "string" + }, + "display": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "uri_hash": { + "type": "string" + } + } + }, + "DenomUnit": { + "description": "Replicates the cosmos-sdk bank module DenomUnit type", + "type": "object", + "required": [ + "aliases", + "denom", + "exponent" + ], + "properties": { + "aliases": { + "type": "array", + "items": { + "type": "string" + } + }, + "denom": { + "type": "string" + }, + "exponent": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + } + } +}