diff --git a/contracts/replier/schema/hackatom.json b/contracts/replier/schema/hackatom.json deleted file mode 100644 index 307c89871f..0000000000 --- a/contracts/replier/schema/hackatom.json +++ /dev/null @@ -1,406 +0,0 @@ -{ - "contract_name": "hackatom", - "contract_version": "0.0.0", - "idl_version": "1.0.0", - "instantiate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "beneficiary", - "verifier" - ], - "properties": { - "beneficiary": { - "type": "string" - }, - "verifier": { - "type": "string" - } - }, - "additionalProperties": false - }, - "execute": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Releasing all funds in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.", - "type": "object", - "required": [ - "release" - ], - "properties": { - "release": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop to burn cpu cycles (only run when metering is enabled)", - "type": "object", - "required": [ - "cpu_loop" - ], - "properties": { - "cpu_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop making storage calls (to test when their limit hits)", - "type": "object", - "required": [ - "storage_loop" - ], - "properties": { - "storage_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop reading and writing memory", - "type": "object", - "required": [ - "memory_loop" - ], - "properties": { - "memory_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Infinite loop sending message to itself", - "type": "object", - "required": [ - "message_loop" - ], - "properties": { - "message_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Allocate large amounts of memory without consuming much gas", - "type": "object", - "required": [ - "allocate_large_memory" - ], - "properties": { - "allocate_large_memory": { - "type": "object", - "required": [ - "pages" - ], - "properties": { - "pages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Trigger a panic to ensure framework handles gracefully", - "type": "object", - "required": [ - "panic" - ], - "properties": { - "panic": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.", - "type": "object", - "required": [ - "user_errors_in_api_calls" - ], - "properties": { - "user_errors_in_api_calls": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "query": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "QueryMsg", - "oneOf": [ - { - "description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", - "type": "object", - "required": [ - "other_balance" - ], - "properties": { - "other_balance": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", - "type": "object", - "required": [ - "recurse" - ], - "properties": { - "recurse": { - "type": "object", - "required": [ - "depth", - "work" - ], - "properties": { - "depth": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "work": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "GetInt returns a hardcoded u32 value", - "type": "object", - "required": [ - "get_int" - ], - "properties": { - "get_int": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "migrate": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "MigrateMsg", - "description": "MigrateMsg allows a privileged contract administrator to run a migration on the contract. In this (demo) case it is just migrating from one hackatom code to the same code, but taking advantage of the migration step to set a new validator.\n\nNote that the contract doesn't enforce permissions here, this is done by blockchain logic (in the future by blockchain governance)", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - }, - "additionalProperties": false - }, - "sudo": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "SudoMsg", - "description": "SudoMsg is only exposed for internal Cosmos SDK modules to call. This is showing how we can expose \"admin\" functionality than can not be called by external users or contracts, but only trusted (native/Go) code in the blockchain", - "oneOf": [ - { - "type": "object", - "required": [ - "steal_funds" - ], - "properties": { - "steal_funds": { - "type": "object", - "required": [ - "amount", - "recipient" - ], - "properties": { - "amount": { - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - }, - "recipient": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ], - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "responses": { - "get_int": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "IntResponse", - "type": "object", - "required": [ - "int" - ], - "properties": { - "int": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - }, - "other_balance": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "AllBalanceResponse", - "type": "object", - "required": [ - "amount" - ], - "properties": { - "amount": { - "description": "Returns all non-zero coins held by this account.", - "type": "array", - "items": { - "$ref": "#/definitions/Coin" - } - } - }, - "additionalProperties": false, - "definitions": { - "Coin": { - "type": "object", - "required": [ - "amount", - "denom" - ], - "properties": { - "amount": { - "$ref": "#/definitions/Uint128" - }, - "denom": { - "type": "string" - } - }, - "additionalProperties": false - }, - "Uint128": { - "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", - "type": "string" - } - } - }, - "recurse": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "RecurseResponse", - "type": "object", - "required": [ - "hashed" - ], - "properties": { - "hashed": { - "description": "hashed is the result of running sha256 \"work+1\" times on the contract's human address", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - } - }, - "additionalProperties": false, - "definitions": { - "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", - "type": "string" - } - } - }, - "verifier": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "VerifierResponse", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "string" - } - }, - "additionalProperties": false - } - } -} diff --git a/contracts/replier/schema/raw/execute.json b/contracts/replier/schema/raw/execute.json index a82fdeef2d..70cc2b9774 100644 --- a/contracts/replier/schema/raw/execute.json +++ b/contracts/replier/schema/raw/execute.json @@ -1,128 +1,86 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", - "oneOf": [ - { - "description": "Releasing all funds in the contract to the beneficiary. This is the only \"proper\" action of this demo contract.", - "type": "object", - "required": [ - "release" - ], - "properties": { - "release": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false + "type": "object", + "required": [ + "exec_error", + "messages", + "msg_id", + "reply_error", + "reply_on_never", + "return_order_in_reply", + "set_data_in_exec_and_reply" + ], + "properties": { + "exec_error": { + "type": "boolean" }, - { - "description": "Infinite loop to burn cpu cycles (only run when metering is enabled)", - "type": "object", - "required": [ - "cpu_loop" - ], - "properties": { - "cpu_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/ExecuteMsg" + } }, - { - "description": "Infinite loop making storage calls (to test when their limit hits)", - "type": "object", - "required": [ - "storage_loop" - ], - "properties": { - "storage_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false + "msg_id": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 }, - { - "description": "Infinite loop reading and writing memory", - "type": "object", - "required": [ - "memory_loop" - ], - "properties": { - "memory_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false + "reply_error": { + "type": "boolean" }, - { - "description": "Infinite loop sending message to itself", - "type": "object", - "required": [ - "message_loop" - ], - "properties": { - "message_loop": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false + "reply_on_never": { + "type": "boolean" }, - { - "description": "Allocate large amounts of memory without consuming much gas", - "type": "object", - "required": [ - "allocate_large_memory" - ], - "properties": { - "allocate_large_memory": { - "type": "object", - "required": [ - "pages" - ], - "properties": { - "pages": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Trigger a panic to ensure framework handles gracefully", - "type": "object", - "required": [ - "panic" - ], - "properties": { - "panic": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false + "return_order_in_reply": { + "type": "boolean" }, - { - "description": "Starting with CosmWasm 0.10, some API calls return user errors back to the contract. This triggers such user errors, ensuring the transaction does not fail in the backend.", + "set_data_in_exec_and_reply": { + "type": "boolean" + } + }, + "additionalProperties": false, + "definitions": { + "ExecuteMsg": { "type": "object", "required": [ - "user_errors_in_api_calls" + "exec_error", + "messages", + "msg_id", + "reply_error", + "reply_on_never", + "return_order_in_reply", + "set_data_in_exec_and_reply" ], "properties": { - "user_errors_in_api_calls": { - "type": "object", - "additionalProperties": false + "exec_error": { + "type": "boolean" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/ExecuteMsg" + } + }, + "msg_id": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, + "reply_error": { + "type": "boolean" + }, + "reply_on_never": { + "type": "boolean" + }, + "return_order_in_reply": { + "type": "boolean" + }, + "set_data_in_exec_and_reply": { + "type": "boolean" } }, "additionalProperties": false } - ] + } } diff --git a/contracts/replier/schema/raw/instantiate.json b/contracts/replier/schema/raw/instantiate.json index 8639103d34..1352613d57 100644 --- a/contracts/replier/schema/raw/instantiate.json +++ b/contracts/replier/schema/raw/instantiate.json @@ -2,17 +2,5 @@ "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "type": "object", - "required": [ - "beneficiary", - "verifier" - ], - "properties": { - "beneficiary": { - "type": "string" - }, - "verifier": { - "type": "string" - } - }, "additionalProperties": false } diff --git a/contracts/replier/schema/raw/query.json b/contracts/replier/schema/raw/query.json index dfd58202b2..0f592a1af0 100644 --- a/contracts/replier/schema/raw/query.json +++ b/contracts/replier/schema/raw/query.json @@ -1,86 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", - "oneOf": [ - { - "description": "returns a human-readable representation of the verifier use to ensure query path works in integration tests", - "type": "object", - "required": [ - "verifier" - ], - "properties": { - "verifier": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "This returns cosmwasm_std::AllBalanceResponse to demo use of the querier", - "type": "object", - "required": [ - "other_balance" - ], - "properties": { - "other_balance": { - "type": "object", - "required": [ - "address" - ], - "properties": { - "address": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "Recurse will execute a query into itself up to depth-times and return Each step of the recursion may perform some extra work to test gas metering (`work` rounds of sha256 on contract). Now that we have Env, we can auto-calculate the address to recurse into", - "type": "object", - "required": [ - "recurse" - ], - "properties": { - "recurse": { - "type": "object", - "required": [ - "depth", - "work" - ], - "properties": { - "depth": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "work": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - { - "description": "GetInt returns a hardcoded u32 value", - "type": "object", - "required": [ - "get_int" - ], - "properties": { - "get_int": { - "type": "object", - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] + "type": "string", + "enum": [] } diff --git a/contracts/replier/schema/replier.json b/contracts/replier/schema/replier.json new file mode 100644 index 0000000000..9d7459ea61 --- /dev/null +++ b/contracts/replier/schema/replier.json @@ -0,0 +1,106 @@ +{ + "contract_name": "replier", + "contract_version": "0.0.0", + "idl_version": "1.0.0", + "instantiate": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "additionalProperties": false + }, + "execute": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "type": "object", + "required": [ + "exec_error", + "messages", + "msg_id", + "reply_error", + "reply_on_never", + "return_order_in_reply", + "set_data_in_exec_and_reply" + ], + "properties": { + "exec_error": { + "type": "boolean" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/ExecuteMsg" + } + }, + "msg_id": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, + "reply_error": { + "type": "boolean" + }, + "reply_on_never": { + "type": "boolean" + }, + "return_order_in_reply": { + "type": "boolean" + }, + "set_data_in_exec_and_reply": { + "type": "boolean" + } + }, + "additionalProperties": false, + "definitions": { + "ExecuteMsg": { + "type": "object", + "required": [ + "exec_error", + "messages", + "msg_id", + "reply_error", + "reply_on_never", + "return_order_in_reply", + "set_data_in_exec_and_reply" + ], + "properties": { + "exec_error": { + "type": "boolean" + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/definitions/ExecuteMsg" + } + }, + "msg_id": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + }, + "reply_error": { + "type": "boolean" + }, + "reply_on_never": { + "type": "boolean" + }, + "return_order_in_reply": { + "type": "boolean" + }, + "set_data_in_exec_and_reply": { + "type": "boolean" + } + }, + "additionalProperties": false + } + } + }, + "query": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "type": "string", + "enum": [] + }, + "migrate": null, + "sudo": null, + "responses": {} +}