diff --git a/.size-limit.json b/.size-limit.json index 2d237fa2..57a6689b 100644 --- a/.size-limit.json +++ b/.size-limit.json @@ -16,5 +16,11 @@ "running": false, "brotli": false, "gzip": false + }, + { + "path": "target/wasm32-unknown-unknown/release/cw_law_stone.wasm", + "running": false, + "brotli": false, + "gzip": false } ] diff --git a/Cargo.lock b/Cargo.lock index e7330fb7..b6b9984e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -200,6 +200,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cw-law-stone" +version = "0.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "cw-multi-test", + "cw-storage-plus", + "cw2", + "logic-bindings", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "cw-logic-sample" version = "0.2.0" diff --git a/contracts/cw-law-stone/Cargo.toml b/contracts/cw-law-stone/Cargo.toml new file mode 100644 index 00000000..bce7c596 --- /dev/null +++ b/contracts/cw-law-stone/Cargo.toml @@ -0,0 +1,54 @@ +[package] +authors = ["OKP4"] +edition = "2021" +name = "cw-law-stone" +version = "0.2.0" + +exclude = [ + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", +] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib", "rlib"] + +[profile.release] +codegen-units = 1 +debug = false +debug-assertions = false +incremental = false +lto = true +opt-level = 3 +overflow-checks = true +panic = 'abort' +rpath = false + +[dependencies] +cosmwasm-schema.workspace = true +cosmwasm-std.workspace = true +cosmwasm-storage.workspace = true +cw-storage-plus.workspace = true +cw2.workspace = true +schemars.workspace = true +serde.workspace = true +thiserror.workspace = true +logic-bindings = { version = "0.2", path = "../../packages/logic-bindings" } + +[dev-dependencies] +cw-multi-test.workspace = true + +[features] +# for more explicit tests, cargo test --features=backtraces +backtraces = ["cosmwasm-std/backtraces"] +# use library feature to disable all instantiate/execute/query exports +library = [] + +[package.metadata.scripts] +optimize = """docker run --rm -v "$(pwd)":/code \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + cosmwasm/rust-optimizer:0.12.10 +""" diff --git a/contracts/cw-law-stone/Makefile.toml b/contracts/cw-law-stone/Makefile.toml new file mode 100644 index 00000000..944012e8 --- /dev/null +++ b/contracts/cw-law-stone/Makefile.toml @@ -0,0 +1,12 @@ +[tasks.generate_schema] +args = ["run", "--bin", "schema"] +command = "cargo" + +[tasks.schema] +dependencies = ["generate_schema"] +script = ''' +SCHEMA=$(find schema -type f -maxdepth 1 -name '*.json' -print0) +TITLE=$(jq -r .contract_name $SCHEMA) +jq --arg description "$(cat README.md)" '. + {description: $description}' $SCHEMA > $SCHEMA.tmp && mv $SCHEMA.tmp $SCHEMA +jq --arg title $TITLE '. + {title: $title}' $SCHEMA > $SCHEMA.tmp && mv $SCHEMA.tmp $SCHEMA +''' diff --git a/contracts/cw-law-stone/README.md b/contracts/cw-law-stone/README.md new file mode 100644 index 00000000..de9c0ee8 --- /dev/null +++ b/contracts/cw-law-stone/README.md @@ -0,0 +1,13 @@ +# CW Law Stone + +## Overview + +The `cw-law-stone` smart contract aims to provide GaaS (i.e. Governance as a Service) in any [Cosmos blockchains](https://cosmos.network/) using the [CosmWasm](https://cosmwasm.com/) framework and the [Logic](https://docs.okp4.network/modules/next/logic) OKP4 module. + +This contract is built around a Prolog program describing the law by rules and facts. The law stone is immutable, this means it can only been questioned, there is no update mechanisms. + +The `cw-law-stone` responsibility is to guarantee the availability of its rules in order to question them, but not to ensure the rules application. + +To ensure reliability over time, the associated Prolog program is stored and pinned in a `cw-storage` contract. Moreover, all the eventual loaded files must be stored in a `cw-storage` contract as well, allowing the contract to pin them. + +To be able to free the underlying resources (i.e. objects in `cw-storage`) if not used anymore, the contract admin can break the stone. diff --git a/contracts/cw-law-stone/src/bin/schema.rs b/contracts/cw-law-stone/src/bin/schema.rs new file mode 100644 index 00000000..39e714d6 --- /dev/null +++ b/contracts/cw-law-stone/src/bin/schema.rs @@ -0,0 +1,11 @@ +use cosmwasm_schema::write_api; + +use cw_law_stone::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; + +fn main() { + write_api! { + instantiate: InstantiateMsg, + execute: ExecuteMsg, + query: QueryMsg, + } +} diff --git a/contracts/cw-law-stone/src/contract.rs b/contracts/cw-law-stone/src/contract.rs new file mode 100644 index 00000000..a00cb966 --- /dev/null +++ b/contracts/cw-law-stone/src/contract.rs @@ -0,0 +1,39 @@ +use crate::ContractError::NotImplemented; +#[cfg(not(feature = "library"))] +use cosmwasm_std::entry_point; +use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError, StdResult}; +use cw2::set_contract_version; + +use crate::error::ContractError; +use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg}; + +// version info for migration info +const CONTRACT_NAME: &str = "crates.io:law-stone"; +const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn instantiate( + deps: DepsMut<'_>, + _env: Env, + _info: MessageInfo, + _msg: InstantiateMsg, +) -> Result { + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + + Err(NotImplemented {}) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn execute( + _deps: DepsMut<'_>, + _env: Env, + _info: MessageInfo, + _msg: ExecuteMsg, +) -> Result { + Err(NotImplemented {}) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn query(_deps: Deps<'_>, _env: Env, _msg: QueryMsg) -> StdResult { + Err(StdError::generic_err("Not implemented")) +} diff --git a/contracts/cw-law-stone/src/error.rs b/contracts/cw-law-stone/src/error.rs new file mode 100644 index 00000000..1f8c2bd4 --- /dev/null +++ b/contracts/cw-law-stone/src/error.rs @@ -0,0 +1,11 @@ +use cosmwasm_std::StdError; +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum ContractError { + #[error("{0}")] + Std(#[from] StdError), + + #[error("Not implemented")] + NotImplemented {}, +} diff --git a/contracts/cw-law-stone/src/lib.rs b/contracts/cw-law-stone/src/lib.rs new file mode 100644 index 00000000..fddbd06d --- /dev/null +++ b/contracts/cw-law-stone/src/lib.rs @@ -0,0 +1,17 @@ +#![forbid(unsafe_code)] +#![deny( + warnings, + rust_2018_idioms, + trivial_casts, + trivial_numeric_casts, + unused_lifetimes, + unused_import_braces, + unused_qualifications, + unused_qualifications +)] + +pub mod contract; +mod error; +pub mod msg; + +pub use crate::error::ContractError; diff --git a/contracts/cw-law-stone/src/msg.rs b/contracts/cw-law-stone/src/msg.rs new file mode 100644 index 00000000..763e2df1 --- /dev/null +++ b/contracts/cw-law-stone/src/msg.rs @@ -0,0 +1,52 @@ +use cosmwasm_schema::{cw_serde, QueryResponses}; +use cosmwasm_std::Binary; +#[allow(unused_imports)] +use logic_bindings::AskResponse; + +/// Instantiate message +#[cw_serde] +pub struct InstantiateMsg { + /// The Prolog program carrying law rules and facts. + pub program: Binary, + + /// The `cw-storage` contract address on which to store the law program. + pub storage_address: String, +} + +/// Execute messages +#[cw_serde] +pub enum ExecuteMsg { + /// # BreakStone + /// Break the stone making this contract unusable, by clearing all the related resources: + /// - Unpin all the pinned objects on `cw-storage` contracts, if any. + /// - Forget the main program (i.e. or at least unpin it). + /// Only the contract admin is authorized to break it, if any. + /// If already broken, this is a no-op. + BreakStone, +} + +/// Query messages +#[cw_serde] +#[derive(QueryResponses)] +pub enum QueryMsg { + /// # Ask + /// If not broken, ask the logic module the provided query with the law program loaded. + #[returns(AskResponse)] + Ask { query: String }, + + /// # Program + /// If not broken, returns the law program location information. + #[returns(ProgramResponse)] + Program, +} + +/// # ProgramResponse +/// ProgramResponse carry elements to locate the program in a `cw-storage` contract. +#[cw_serde] +pub struct ProgramResponse { + /// The program object id in the `cw-storage` contract. + pub object_id: String, + + /// The `cw-storage` contract address on which the law program is stored. + pub storage_address: String, +} diff --git a/docs/README.md b/docs/README.md index 9d7e5986..0ab092ce 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,6 +2,8 @@ ## Top-level Schemas +* [cw-law-stone](./cw-law-stone.md "CW Law StoneOverviewThe cw-law-stone smart contract aims to provide GaaS (i") – `-` + * [cw-logic-sample](./cw-logic-sample.md "CW Logic SampleSample contract to query the OKP4 logic module") – `-` * [cw-storage](./cw-storage.md "CW StorageOverviewThe cw-storage smart contract enables the storage of arbitrary objects in any Cosmos blockchains using the CosmWasm framework") – `-` @@ -12,8 +14,12 @@ ### Objects +* [Ask](./cw-law-stone-querymsg-oneof-ask.md "If not broken, ask the logic module the provided query with the law program loaded") – `undefined#/query/oneOf/0` + * [Ask](./cw-logic-sample-querymsg-oneof-ask.md "Ask returns the evaluation of the query using the program context through the logic module") – `undefined#/query/oneOf/0` +* [AskResponse](./cw-law-stone-responses-askresponse.md) – `undefined#/responses/ask` + * [AskResponse](./cw-logic-sample-responses-askresponse.md) – `undefined#/responses/ask` * [Bucket](./cw-storage-querymsg-oneof-bucket.md "Bucket returns the bucket information") – `undefined#/query/oneOf/0` @@ -28,6 +34,8 @@ * [Increment](./cw-template-executemsg-oneof-increment.md "Execute an increment message") – `undefined#/execute/oneOf/0` +* [InstantiateMsg](./cw-law-stone-instantiatemsg.md "Instantiate message") – `undefined#/instantiate` + * [InstantiateMsg](./cw-logic-sample-instantiatemsg.md "Instantiate messages") – `undefined#/instantiate` * [InstantiateMsg](./cw-storage-instantiatemsg.md "Instantiate messages") – `undefined#/instantiate` @@ -56,12 +64,24 @@ * [PinObject](./cw-storage-executemsg-oneof-pinobject.md "PinObject pins the object in the bucket for the considered sender") – `undefined#/execute/oneOf/2` +* [ProgramResponse](./cw-law-stone-responses-programresponse.md "ProgramResponse carry elements to locate the program in a cw-storage contract") – `undefined#/responses/program` + * [Reset](./cw-template-executemsg-oneof-reset.md "Reset counter to the specified value") – `undefined#/execute/oneOf/1` * [StoreObject](./cw-storage-executemsg-oneof-storeobject.md "StoreObject store an object to the bucket and make the sender the owner of the object") – `undefined#/execute/oneOf/0` * [UnpinObject](./cw-storage-executemsg-oneof-unpinobject.md "UnpinObject unpins the object in the bucket for the considered sender") – `undefined#/execute/oneOf/3` +* [Untitled object in cw-law-stone](./cw-law-stone-querymsg-oneof-ask-properties-ask.md) – `undefined#/query/oneOf/0/properties/ask` + +* [Untitled object in cw-law-stone](./cw-law-stone-responses-askresponse-definitions-answer.md) – `undefined#/responses/ask/definitions/Answer` + +* [Untitled object in cw-law-stone](./cw-law-stone-responses-askresponse-definitions-result.md) – `undefined#/responses/ask/definitions/Result` + +* [Untitled object in cw-law-stone](./cw-law-stone-responses-askresponse-definitions-substitution.md) – `undefined#/responses/ask/definitions/Substitution` + +* [Untitled object in cw-law-stone](./cw-law-stone-responses-askresponse-definitions-term.md) – `undefined#/responses/ask/definitions/Term` + * [Untitled object in cw-logic-sample](./cw-logic-sample-querymsg-oneof-ask-properties-ask.md) – `undefined#/query/oneOf/0/properties/ask` * [Untitled object in cw-logic-sample](./cw-logic-sample-responses-askresponse-definitions-answer.md) – `undefined#/responses/ask/definitions/Answer` @@ -102,6 +122,14 @@ ### Arrays +* [Untitled array in cw-law-stone](./cw-law-stone-responses-askresponse-definitions-answer-properties-results.md) – `undefined#/responses/ask/definitions/Answer/properties/results` + +* [Untitled array in cw-law-stone](./cw-law-stone-responses-askresponse-definitions-answer-properties-variables.md) – `undefined#/responses/ask/definitions/Answer/properties/variables` + +* [Untitled array in cw-law-stone](./cw-law-stone-responses-askresponse-definitions-result-properties-substitutions.md) – `undefined#/responses/ask/definitions/Result/properties/substitutions` + +* [Untitled array in cw-law-stone](./cw-law-stone-responses-askresponse-definitions-term-properties-arguments.md) – `undefined#/responses/ask/definitions/Term/properties/arguments` + * [Untitled array in cw-logic-sample](./cw-logic-sample-responses-askresponse-definitions-answer-properties-results.md) – `undefined#/responses/ask/definitions/Answer/properties/results` * [Untitled array in cw-logic-sample](./cw-logic-sample-responses-askresponse-definitions-answer-properties-variables.md) – `undefined#/responses/ask/definitions/Answer/properties/variables` diff --git a/docs/cw-law-stone-executemsg-oneof-breakstone.md b/docs/cw-law-stone-executemsg-oneof-breakstone.md new file mode 100644 index 00000000..9a33fa67 --- /dev/null +++ b/docs/cw-law-stone-executemsg-oneof-breakstone.md @@ -0,0 +1,23 @@ +# BreakStone Schema + +```txt +undefined#/execute/oneOf/0 +``` + +Break the stone making this contract unusable, by clearing all the related resources: - Unpin all the pinned objects on `cw-storage` contracts, if any. - Forget the main program (i.e. or at least unpin it). Only the contract admin is authorized to break it, if any. If already broken, this is a no-op. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## 0 Type + +`string` ([BreakStone](cw-law-stone-executemsg-oneof-breakstone.md)) + +## 0 Constraints + +**enum**: the value of this property must be equal to one of the following values: + +| Value | Explanation | +| :-------------- | :---------- | +| `"break_stone"` | | diff --git a/docs/cw-law-stone-executemsg.md b/docs/cw-law-stone-executemsg.md new file mode 100644 index 00000000..ded897c5 --- /dev/null +++ b/docs/cw-law-stone-executemsg.md @@ -0,0 +1,19 @@ +# ExecuteMsg Schema + +```txt +undefined#/execute +``` + +Execute messages + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## execute Type + +merged type ([ExecuteMsg](cw-law-stone-executemsg.md)) + +one (and only one) of + +* [BreakStone](cw-law-stone-executemsg-oneof-breakstone.md "check type definition") diff --git a/docs/cw-law-stone-instantiatemsg-definitions-binary.md b/docs/cw-law-stone-instantiatemsg-definitions-binary.md new file mode 100644 index 00000000..c4730c6f --- /dev/null +++ b/docs/cw-law-stone-instantiatemsg-definitions-binary.md @@ -0,0 +1,17 @@ +# Untitled string in cw-law-stone Schema + +```txt +undefined#/instantiate/definitions/Binary +``` + +Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline. + +This is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also . + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## Binary Type + +`string` diff --git a/docs/cw-law-stone-instantiatemsg-definitions.md b/docs/cw-law-stone-instantiatemsg-definitions.md new file mode 100644 index 00000000..fe8be59a --- /dev/null +++ b/docs/cw-law-stone-instantiatemsg-definitions.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/instantiate/definitions +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## definitions Type + +unknown diff --git a/docs/cw-law-stone-instantiatemsg-properties-program-allof-0.md b/docs/cw-law-stone-instantiatemsg-properties-program-allof-0.md new file mode 100644 index 00000000..b71d867b --- /dev/null +++ b/docs/cw-law-stone-instantiatemsg-properties-program-allof-0.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/instantiate/properties/program/allOf/0 +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## 0 Type + +unknown diff --git a/docs/cw-law-stone-instantiatemsg-properties-program.md b/docs/cw-law-stone-instantiatemsg-properties-program.md new file mode 100644 index 00000000..031baeef --- /dev/null +++ b/docs/cw-law-stone-instantiatemsg-properties-program.md @@ -0,0 +1,19 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/instantiate/properties/program +``` + +The Prolog program carrying law rules and facts. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## program Type + +merged type ([Details](cw-law-stone-instantiatemsg-properties-program.md)) + +all of + +* [Untitled undefined type in cw-law-stone](cw-law-stone-instantiatemsg-properties-program-allof-0.md "check type definition") diff --git a/docs/cw-law-stone-instantiatemsg-properties-storage_address.md b/docs/cw-law-stone-instantiatemsg-properties-storage_address.md new file mode 100644 index 00000000..6619f131 --- /dev/null +++ b/docs/cw-law-stone-instantiatemsg-properties-storage_address.md @@ -0,0 +1,15 @@ +# Untitled string in cw-law-stone Schema + +```txt +undefined#/instantiate/properties/storage_address +``` + +The `cw-storage` contract address on which to store the law program. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## storage\_address Type + +`string` diff --git a/docs/cw-law-stone-instantiatemsg.md b/docs/cw-law-stone-instantiatemsg.md new file mode 100644 index 00000000..5e4b18d8 --- /dev/null +++ b/docs/cw-law-stone-instantiatemsg.md @@ -0,0 +1,75 @@ +# InstantiateMsg Schema + +```txt +undefined#/instantiate +``` + +Instantiate message + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | Yes | Unknown status | No | Forbidden | Forbidden | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## instantiate Type + +`object` ([InstantiateMsg](cw-law-stone-instantiatemsg.md)) + +# instantiate Properties + +| Property | Type | Required | Nullable | Defined by | +| :----------------------------------- | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------- | +| [program](#program) | Merged | Required | cannot be null | [cw-law-stone](cw-law-stone-instantiatemsg-properties-program.md "undefined#/instantiate/properties/program") | +| [storage\_address](#storage_address) | `string` | Required | cannot be null | [cw-law-stone](cw-law-stone-instantiatemsg-properties-storage_address.md "undefined#/instantiate/properties/storage_address") | + +## program + +The Prolog program carrying law rules and facts. + +`program` + +* is required + +* Type: merged type ([Details](cw-law-stone-instantiatemsg-properties-program.md)) + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-instantiatemsg-properties-program.md "undefined#/instantiate/properties/program") + +### program Type + +merged type ([Details](cw-law-stone-instantiatemsg-properties-program.md)) + +all of + +* [Untitled undefined type in cw-law-stone](cw-law-stone-instantiatemsg-properties-program-allof-0.md "check type definition") + +## storage\_address + +The `cw-storage` contract address on which to store the law program. + +`storage_address` + +* is required + +* Type: `string` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-instantiatemsg-properties-storage_address.md "undefined#/instantiate/properties/storage_address") + +### storage\_address Type + +`string` + +# InstantiateMsg Definitions + +## Definitions group Binary + +Reference this group by using + +```json +{"$ref":"undefined#/instantiate/definitions/Binary"} +``` + +| Property | Type | Required | Nullable | Defined by | +| :------- | :--- | :------- | :------- | :--------- | diff --git a/docs/cw-law-stone-querymsg-oneof-ask-properties-ask-properties-query.md b/docs/cw-law-stone-querymsg-oneof-ask-properties-ask-properties-query.md new file mode 100644 index 00000000..22ddd92c --- /dev/null +++ b/docs/cw-law-stone-querymsg-oneof-ask-properties-ask-properties-query.md @@ -0,0 +1,15 @@ +# Untitled string in cw-law-stone Schema + +```txt +undefined#/query/oneOf/0/properties/ask/properties/query +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## query Type + +`string` diff --git a/docs/cw-law-stone-querymsg-oneof-ask-properties-ask.md b/docs/cw-law-stone-querymsg-oneof-ask-properties-ask.md new file mode 100644 index 00000000..cf91944d --- /dev/null +++ b/docs/cw-law-stone-querymsg-oneof-ask-properties-ask.md @@ -0,0 +1,39 @@ +# Untitled object in cw-law-stone Schema + +```txt +undefined#/query/oneOf/0/properties/ask +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## ask Type + +`object` ([Details](cw-law-stone-querymsg-oneof-ask-properties-ask.md)) + +# ask Properties + +| Property | Type | Required | Nullable | Defined by | +| :-------------- | :------- | :------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | +| [query](#query) | `string` | Required | cannot be null | [cw-law-stone](cw-law-stone-querymsg-oneof-ask-properties-ask-properties-query.md "undefined#/query/oneOf/0/properties/ask/properties/query") | + +## query + + + +`query` + +* is required + +* Type: `string` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-querymsg-oneof-ask-properties-ask-properties-query.md "undefined#/query/oneOf/0/properties/ask/properties/query") + +### query Type + +`string` diff --git a/docs/cw-law-stone-querymsg-oneof-ask.md b/docs/cw-law-stone-querymsg-oneof-ask.md new file mode 100644 index 00000000..c442e70c --- /dev/null +++ b/docs/cw-law-stone-querymsg-oneof-ask.md @@ -0,0 +1,39 @@ +# Ask Schema + +```txt +undefined#/query/oneOf/0 +``` + +If not broken, ask the logic module the provided query with the law program loaded. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## 0 Type + +`object` ([Ask](cw-law-stone-querymsg-oneof-ask.md)) + +# 0 Properties + +| Property | Type | Required | Nullable | Defined by | +| :---------- | :------- | :------- | :------------- | :---------------------------------------------------------------------------------------------------------- | +| [ask](#ask) | `object` | Required | cannot be null | [cw-law-stone](cw-law-stone-querymsg-oneof-ask-properties-ask.md "undefined#/query/oneOf/0/properties/ask") | + +## ask + + + +`ask` + +* is required + +* Type: `object` ([Details](cw-law-stone-querymsg-oneof-ask-properties-ask.md)) + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-querymsg-oneof-ask-properties-ask.md "undefined#/query/oneOf/0/properties/ask") + +### ask Type + +`object` ([Details](cw-law-stone-querymsg-oneof-ask-properties-ask.md)) diff --git a/docs/cw-law-stone-querymsg-oneof-program.md b/docs/cw-law-stone-querymsg-oneof-program.md new file mode 100644 index 00000000..8b91bf8a --- /dev/null +++ b/docs/cw-law-stone-querymsg-oneof-program.md @@ -0,0 +1,23 @@ +# Program Schema + +```txt +undefined#/query/oneOf/1 +``` + +If not broken, returns the law program location information. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## 1 Type + +`string` ([Program](cw-law-stone-querymsg-oneof-program.md)) + +## 1 Constraints + +**enum**: the value of this property must be equal to one of the following values: + +| Value | Explanation | +| :---------- | :---------- | +| `"program"` | | diff --git a/docs/cw-law-stone-querymsg.md b/docs/cw-law-stone-querymsg.md new file mode 100644 index 00000000..bbfb27e1 --- /dev/null +++ b/docs/cw-law-stone-querymsg.md @@ -0,0 +1,21 @@ +# QueryMsg Schema + +```txt +undefined#/query +``` + +Query messages + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## query Type + +merged type ([QueryMsg](cw-law-stone-querymsg.md)) + +one (and only one) of + +* [Ask](cw-law-stone-querymsg-oneof-ask.md "check type definition") + +* [Program](cw-law-stone-querymsg-oneof-program.md "check type definition") diff --git a/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-has_more.md b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-has_more.md new file mode 100644 index 00000000..3b657ea8 --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-has_more.md @@ -0,0 +1,15 @@ +# Untitled boolean in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Answer/properties/has_more +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## has\_more Type + +`boolean` diff --git a/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-results-items.md b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-results-items.md new file mode 100644 index 00000000..a5ec9fee --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-results-items.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Answer/properties/results/items +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## items Type + +unknown diff --git a/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-results.md b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-results.md new file mode 100644 index 00000000..df6192fb --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-results.md @@ -0,0 +1,15 @@ +# Untitled array in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Answer/properties/results +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## results Type + +unknown\[] diff --git a/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-success.md b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-success.md new file mode 100644 index 00000000..abf57dba --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-success.md @@ -0,0 +1,15 @@ +# Untitled boolean in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Answer/properties/success +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## success Type + +`boolean` diff --git a/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-variables-items.md b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-variables-items.md new file mode 100644 index 00000000..f0227fc6 --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-variables-items.md @@ -0,0 +1,15 @@ +# Untitled string in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Answer/properties/variables/items +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## items Type + +`string` diff --git a/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-variables.md b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-variables.md new file mode 100644 index 00000000..084e1e5c --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-answer-properties-variables.md @@ -0,0 +1,15 @@ +# Untitled array in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Answer/properties/variables +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## variables Type + +`string[]` diff --git a/docs/cw-law-stone-responses-askresponse-definitions-answer.md b/docs/cw-law-stone-responses-askresponse-definitions-answer.md new file mode 100644 index 00000000..77df0e3c --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-answer.md @@ -0,0 +1,96 @@ +# Untitled object in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Answer +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## Answer Type + +`object` ([Details](cw-law-stone-responses-askresponse-definitions-answer.md)) + +# Answer Properties + +| Property | Type | Required | Nullable | Defined by | +| :---------------------- | :-------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [has\_more](#has_more) | `boolean` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-has_more.md "undefined#/responses/ask/definitions/Answer/properties/has_more") | +| [results](#results) | `array` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-results.md "undefined#/responses/ask/definitions/Answer/properties/results") | +| [success](#success) | `boolean` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-success.md "undefined#/responses/ask/definitions/Answer/properties/success") | +| [variables](#variables) | `array` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-variables.md "undefined#/responses/ask/definitions/Answer/properties/variables") | + +## has\_more + + + +`has_more` + +* is required + +* Type: `boolean` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-has_more.md "undefined#/responses/ask/definitions/Answer/properties/has_more") + +### has\_more Type + +`boolean` + +## results + + + +`results` + +* is required + +* Type: unknown\[] + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-results.md "undefined#/responses/ask/definitions/Answer/properties/results") + +### results Type + +unknown\[] + +## success + + + +`success` + +* is required + +* Type: `boolean` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-success.md "undefined#/responses/ask/definitions/Answer/properties/success") + +### success Type + +`boolean` + +## variables + + + +`variables` + +* is required + +* Type: `string[]` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-variables.md "undefined#/responses/ask/definitions/Answer/properties/variables") + +### variables Type + +`string[]` diff --git a/docs/cw-law-stone-responses-askresponse-definitions-result-properties-substitutions-items.md b/docs/cw-law-stone-responses-askresponse-definitions-result-properties-substitutions-items.md new file mode 100644 index 00000000..0ce1142e --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-result-properties-substitutions-items.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Result/properties/substitutions/items +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## items Type + +unknown diff --git a/docs/cw-law-stone-responses-askresponse-definitions-result-properties-substitutions.md b/docs/cw-law-stone-responses-askresponse-definitions-result-properties-substitutions.md new file mode 100644 index 00000000..f59b7b4b --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-result-properties-substitutions.md @@ -0,0 +1,15 @@ +# Untitled array in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Result/properties/substitutions +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## substitutions Type + +unknown\[] diff --git a/docs/cw-law-stone-responses-askresponse-definitions-result.md b/docs/cw-law-stone-responses-askresponse-definitions-result.md new file mode 100644 index 00000000..c272c5bc --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-result.md @@ -0,0 +1,39 @@ +# Untitled object in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Result +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## Result Type + +`object` ([Details](cw-law-stone-responses-askresponse-definitions-result.md)) + +# Result Properties + +| Property | Type | Required | Nullable | Defined by | +| :------------------------------ | :------ | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [substitutions](#substitutions) | `array` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-result-properties-substitutions.md "undefined#/responses/ask/definitions/Result/properties/substitutions") | + +## substitutions + + + +`substitutions` + +* is required + +* Type: unknown\[] + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-result-properties-substitutions.md "undefined#/responses/ask/definitions/Result/properties/substitutions") + +### substitutions Type + +unknown\[] diff --git a/docs/cw-law-stone-responses-askresponse-definitions-substitution-properties-term.md b/docs/cw-law-stone-responses-askresponse-definitions-substitution-properties-term.md new file mode 100644 index 00000000..b117c323 --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-substitution-properties-term.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Substitution/properties/term +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## term Type + +unknown diff --git a/docs/cw-law-stone-responses-askresponse-definitions-substitution-properties-variable.md b/docs/cw-law-stone-responses-askresponse-definitions-substitution-properties-variable.md new file mode 100644 index 00000000..34c8019f --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-substitution-properties-variable.md @@ -0,0 +1,15 @@ +# Untitled string in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Substitution/properties/variable +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## variable Type + +`string` diff --git a/docs/cw-law-stone-responses-askresponse-definitions-substitution.md b/docs/cw-law-stone-responses-askresponse-definitions-substitution.md new file mode 100644 index 00000000..9691b8d2 --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-substitution.md @@ -0,0 +1,58 @@ +# Untitled object in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Substitution +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## Substitution Type + +`object` ([Details](cw-law-stone-responses-askresponse-definitions-substitution.md)) + +# Substitution Properties + +| Property | Type | Required | Nullable | Defined by | +| :-------------------- | :------------ | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [term](#term) | Not specified | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-substitution-properties-term.md "undefined#/responses/ask/definitions/Substitution/properties/term") | +| [variable](#variable) | `string` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-substitution-properties-variable.md "undefined#/responses/ask/definitions/Substitution/properties/variable") | + +## term + + + +`term` + +* is required + +* Type: unknown + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-substitution-properties-term.md "undefined#/responses/ask/definitions/Substitution/properties/term") + +### term Type + +unknown + +## variable + + + +`variable` + +* is required + +* Type: `string` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-substitution-properties-variable.md "undefined#/responses/ask/definitions/Substitution/properties/variable") + +### variable Type + +`string` diff --git a/docs/cw-law-stone-responses-askresponse-definitions-term-properties-arguments-items.md b/docs/cw-law-stone-responses-askresponse-definitions-term-properties-arguments-items.md new file mode 100644 index 00000000..68cf876c --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-term-properties-arguments-items.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Term/properties/arguments/items +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## items Type + +unknown diff --git a/docs/cw-law-stone-responses-askresponse-definitions-term-properties-arguments.md b/docs/cw-law-stone-responses-askresponse-definitions-term-properties-arguments.md new file mode 100644 index 00000000..a5da58c1 --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-term-properties-arguments.md @@ -0,0 +1,15 @@ +# Untitled array in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Term/properties/arguments +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## arguments Type + +unknown\[] diff --git a/docs/cw-law-stone-responses-askresponse-definitions-term-properties-name.md b/docs/cw-law-stone-responses-askresponse-definitions-term-properties-name.md new file mode 100644 index 00000000..d2a0f7df --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-term-properties-name.md @@ -0,0 +1,15 @@ +# Untitled string in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Term/properties/name +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## name Type + +`string` diff --git a/docs/cw-law-stone-responses-askresponse-definitions-term.md b/docs/cw-law-stone-responses-askresponse-definitions-term.md new file mode 100644 index 00000000..2fea4a9d --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions-term.md @@ -0,0 +1,58 @@ +# Untitled object in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions/Term +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## Term Type + +`object` ([Details](cw-law-stone-responses-askresponse-definitions-term.md)) + +# Term Properties + +| Property | Type | Required | Nullable | Defined by | +| :---------------------- | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [arguments](#arguments) | `array` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-term-properties-arguments.md "undefined#/responses/ask/definitions/Term/properties/arguments") | +| [name](#name) | `string` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-term-properties-name.md "undefined#/responses/ask/definitions/Term/properties/name") | + +## arguments + + + +`arguments` + +* is required + +* Type: unknown\[] + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-term-properties-arguments.md "undefined#/responses/ask/definitions/Term/properties/arguments") + +### arguments Type + +unknown\[] + +## name + + + +`name` + +* is required + +* Type: `string` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-term-properties-name.md "undefined#/responses/ask/definitions/Term/properties/name") + +### name Type + +`string` diff --git a/docs/cw-law-stone-responses-askresponse-definitions.md b/docs/cw-law-stone-responses-askresponse-definitions.md new file mode 100644 index 00000000..ae6869ad --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-definitions.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/responses/ask/definitions +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## definitions Type + +unknown diff --git a/docs/cw-law-stone-responses-askresponse-properties-answer-anyof-0.md b/docs/cw-law-stone-responses-askresponse-properties-answer-anyof-0.md new file mode 100644 index 00000000..b610a063 --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-properties-answer-anyof-0.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/responses/ask/properties/answer/anyOf/0 +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## 0 Type + +unknown diff --git a/docs/cw-law-stone-responses-askresponse-properties-answer-anyof-1.md b/docs/cw-law-stone-responses-askresponse-properties-answer-anyof-1.md new file mode 100644 index 00000000..381ecb1a --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-properties-answer-anyof-1.md @@ -0,0 +1,15 @@ +# Untitled null in cw-law-stone Schema + +```txt +undefined#/responses/ask/properties/answer/anyOf/1 +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## 1 Type + +`null`, the value must be null diff --git a/docs/cw-law-stone-responses-askresponse-properties-answer.md b/docs/cw-law-stone-responses-askresponse-properties-answer.md new file mode 100644 index 00000000..5b3962da --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-properties-answer.md @@ -0,0 +1,21 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/responses/ask/properties/answer +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## answer Type + +merged type ([Details](cw-law-stone-responses-askresponse-properties-answer.md)) + +any of + +* [Untitled undefined type in cw-law-stone](cw-law-stone-responses-askresponse-properties-answer-anyof-0.md "check type definition") + +* [Untitled null in cw-law-stone](cw-law-stone-responses-askresponse-properties-answer-anyof-1.md "check type definition") diff --git a/docs/cw-law-stone-responses-askresponse-properties-gas_used.md b/docs/cw-law-stone-responses-askresponse-properties-gas_used.md new file mode 100644 index 00000000..c631d62f --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-properties-gas_used.md @@ -0,0 +1,21 @@ +# Untitled integer in cw-law-stone Schema + +```txt +undefined#/responses/ask/properties/gas_used +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## gas\_used Type + +`integer` + +## gas\_used Constraints + +**minimum**: the value of this number must greater than or equal to: `0` + +**unknown format**: the value of this string must follow the format: `uint64` diff --git a/docs/cw-law-stone-responses-askresponse-properties-height.md b/docs/cw-law-stone-responses-askresponse-properties-height.md new file mode 100644 index 00000000..cecf6b65 --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse-properties-height.md @@ -0,0 +1,21 @@ +# Untitled integer in cw-law-stone Schema + +```txt +undefined#/responses/ask/properties/height +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## height Type + +`integer` + +## height Constraints + +**minimum**: the value of this number must greater than or equal to: `0` + +**unknown format**: the value of this string must follow the format: `uint64` diff --git a/docs/cw-law-stone-responses-askresponse.md b/docs/cw-law-stone-responses-askresponse.md new file mode 100644 index 00000000..e4c16f02 --- /dev/null +++ b/docs/cw-law-stone-responses-askresponse.md @@ -0,0 +1,312 @@ +# AskResponse Schema + +```txt +undefined#/responses/ask +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | Yes | Unknown status | No | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## ask Type + +`object` ([AskResponse](cw-law-stone-responses-askresponse.md)) + +# ask Properties + +| Property | Type | Required | Nullable | Defined by | +| :--------------------- | :-------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------- | +| [answer](#answer) | Merged | Optional | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-properties-answer.md "undefined#/responses/ask/properties/answer") | +| [gas\_used](#gas_used) | `integer` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-properties-gas_used.md "undefined#/responses/ask/properties/gas_used") | +| [height](#height) | `integer` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-properties-height.md "undefined#/responses/ask/properties/height") | + +## answer + + + +`answer` + +* is optional + +* Type: merged type ([Details](cw-law-stone-responses-askresponse-properties-answer.md)) + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-properties-answer.md "undefined#/responses/ask/properties/answer") + +### answer Type + +merged type ([Details](cw-law-stone-responses-askresponse-properties-answer.md)) + +any of + +* [Untitled undefined type in cw-law-stone](cw-law-stone-responses-askresponse-properties-answer-anyof-0.md "check type definition") + +* [Untitled null in cw-law-stone](cw-law-stone-responses-askresponse-properties-answer-anyof-1.md "check type definition") + +## gas\_used + + + +`gas_used` + +* is required + +* Type: `integer` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-properties-gas_used.md "undefined#/responses/ask/properties/gas_used") + +### gas\_used Type + +`integer` + +### gas\_used Constraints + +**minimum**: the value of this number must greater than or equal to: `0` + +**unknown format**: the value of this string must follow the format: `uint64` + +## height + + + +`height` + +* is required + +* Type: `integer` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-properties-height.md "undefined#/responses/ask/properties/height") + +### height Type + +`integer` + +### height Constraints + +**minimum**: the value of this number must greater than or equal to: `0` + +**unknown format**: the value of this string must follow the format: `uint64` + +# AskResponse Definitions + +## Definitions group Answer + +Reference this group by using + +```json +{"$ref":"undefined#/responses/ask/definitions/Answer"} +``` + +| Property | Type | Required | Nullable | Defined by | +| :---------------------- | :-------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [has\_more](#has_more) | `boolean` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-has_more.md "undefined#/responses/ask/definitions/Answer/properties/has_more") | +| [results](#results) | `array` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-results.md "undefined#/responses/ask/definitions/Answer/properties/results") | +| [success](#success) | `boolean` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-success.md "undefined#/responses/ask/definitions/Answer/properties/success") | +| [variables](#variables) | `array` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-variables.md "undefined#/responses/ask/definitions/Answer/properties/variables") | + +### has\_more + + + +`has_more` + +* is required + +* Type: `boolean` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-has_more.md "undefined#/responses/ask/definitions/Answer/properties/has_more") + +#### has\_more Type + +`boolean` + +### results + + + +`results` + +* is required + +* Type: unknown\[] + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-results.md "undefined#/responses/ask/definitions/Answer/properties/results") + +#### results Type + +unknown\[] + +### success + + + +`success` + +* is required + +* Type: `boolean` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-success.md "undefined#/responses/ask/definitions/Answer/properties/success") + +#### success Type + +`boolean` + +### variables + + + +`variables` + +* is required + +* Type: `string[]` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-answer-properties-variables.md "undefined#/responses/ask/definitions/Answer/properties/variables") + +#### variables Type + +`string[]` + +## Definitions group Result + +Reference this group by using + +```json +{"$ref":"undefined#/responses/ask/definitions/Result"} +``` + +| Property | Type | Required | Nullable | Defined by | +| :------------------------------ | :------ | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [substitutions](#substitutions) | `array` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-result-properties-substitutions.md "undefined#/responses/ask/definitions/Result/properties/substitutions") | + +### substitutions + + + +`substitutions` + +* is required + +* Type: unknown\[] + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-result-properties-substitutions.md "undefined#/responses/ask/definitions/Result/properties/substitutions") + +#### substitutions Type + +unknown\[] + +## Definitions group Substitution + +Reference this group by using + +```json +{"$ref":"undefined#/responses/ask/definitions/Substitution"} +``` + +| Property | Type | Required | Nullable | Defined by | +| :-------------------- | :------------ | :------- | :------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [term](#term) | Not specified | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-substitution-properties-term.md "undefined#/responses/ask/definitions/Substitution/properties/term") | +| [variable](#variable) | `string` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-substitution-properties-variable.md "undefined#/responses/ask/definitions/Substitution/properties/variable") | + +### term + + + +`term` + +* is required + +* Type: unknown + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-substitution-properties-term.md "undefined#/responses/ask/definitions/Substitution/properties/term") + +#### term Type + +unknown + +### variable + + + +`variable` + +* is required + +* Type: `string` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-substitution-properties-variable.md "undefined#/responses/ask/definitions/Substitution/properties/variable") + +#### variable Type + +`string` + +## Definitions group Term + +Reference this group by using + +```json +{"$ref":"undefined#/responses/ask/definitions/Term"} +``` + +| Property | Type | Required | Nullable | Defined by | +| :---------------------- | :------- | :------- | :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [arguments](#arguments) | `array` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-term-properties-arguments.md "undefined#/responses/ask/definitions/Term/properties/arguments") | +| [name](#name) | `string` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-askresponse-definitions-term-properties-name.md "undefined#/responses/ask/definitions/Term/properties/name") | + +### arguments + + + +`arguments` + +* is required + +* Type: unknown\[] + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-term-properties-arguments.md "undefined#/responses/ask/definitions/Term/properties/arguments") + +#### arguments Type + +unknown\[] + +### name + + + +`name` + +* is required + +* Type: `string` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-askresponse-definitions-term-properties-name.md "undefined#/responses/ask/definitions/Term/properties/name") + +#### name Type + +`string` diff --git a/docs/cw-law-stone-responses-programresponse-properties-object_id.md b/docs/cw-law-stone-responses-programresponse-properties-object_id.md new file mode 100644 index 00000000..aa785c46 --- /dev/null +++ b/docs/cw-law-stone-responses-programresponse-properties-object_id.md @@ -0,0 +1,15 @@ +# Untitled string in cw-law-stone Schema + +```txt +undefined#/responses/program/properties/object_id +``` + +The program object id in the `cw-storage` contract. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## object\_id Type + +`string` diff --git a/docs/cw-law-stone-responses-programresponse-properties-storage_address.md b/docs/cw-law-stone-responses-programresponse-properties-storage_address.md new file mode 100644 index 00000000..0df8db75 --- /dev/null +++ b/docs/cw-law-stone-responses-programresponse-properties-storage_address.md @@ -0,0 +1,15 @@ +# Untitled string in cw-law-stone Schema + +```txt +undefined#/responses/program/properties/storage_address +``` + +The `cw-storage` contract address on which the law program is stored. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## storage\_address Type + +`string` diff --git a/docs/cw-law-stone-responses-programresponse.md b/docs/cw-law-stone-responses-programresponse.md new file mode 100644 index 00000000..021fd44f --- /dev/null +++ b/docs/cw-law-stone-responses-programresponse.md @@ -0,0 +1,58 @@ +# ProgramResponse Schema + +```txt +undefined#/responses/program +``` + +ProgramResponse carry elements to locate the program in a `cw-storage` contract. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :----------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | No | Forbidden | Forbidden | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## program Type + +`object` ([ProgramResponse](cw-law-stone-responses-programresponse.md)) + +# program Properties + +| Property | Type | Required | Nullable | Defined by | +| :----------------------------------- | :------- | :------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------- | +| [object\_id](#object_id) | `string` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-programresponse-properties-object_id.md "undefined#/responses/program/properties/object_id") | +| [storage\_address](#storage_address) | `string` | Required | cannot be null | [cw-law-stone](cw-law-stone-responses-programresponse-properties-storage_address.md "undefined#/responses/program/properties/storage_address") | + +## object\_id + +The program object id in the `cw-storage` contract. + +`object_id` + +* is required + +* Type: `string` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-programresponse-properties-object_id.md "undefined#/responses/program/properties/object_id") + +### object\_id Type + +`string` + +## storage\_address + +The `cw-storage` contract address on which the law program is stored. + +`storage_address` + +* is required + +* Type: `string` + +* cannot be null + +* defined in: [cw-law-stone](cw-law-stone-responses-programresponse-properties-storage_address.md "undefined#/responses/program/properties/storage_address") + +### storage\_address Type + +`string` diff --git a/docs/cw-law-stone-responses.md b/docs/cw-law-stone-responses.md new file mode 100644 index 00000000..af9cc148 --- /dev/null +++ b/docs/cw-law-stone-responses.md @@ -0,0 +1,15 @@ +# Untitled undefined type in cw-law-stone Schema + +```txt +undefined#/responses +``` + + + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :--------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json\*](schema/cw-law-stone.json "open original schema") | + +## responses Type + +unknown diff --git a/docs/cw-law-stone.md b/docs/cw-law-stone.md new file mode 100644 index 00000000..f650fc4a --- /dev/null +++ b/docs/cw-law-stone.md @@ -0,0 +1,27 @@ +# cw-law-stone Schema + +```txt +undefined +``` + +# CW Law Stone + +## Overview + +The `cw-law-stone` smart contract aims to provide GaaS (i.e. Governance as a Service) in any [Cosmos blockchains](https://cosmos.network/) using the [CosmWasm](https://cosmwasm.com/) framework and the [Logic](https://docs.okp4.network/modules/next/logic) OKP4 module. + +This contract is built around a Prolog program describing the law by rules and facts. The law stone is immutable, this means it can only been questioned, there is no update mechanisms. + +The `cw-law-stone` responsibility is to guarantee the availability of its rules in order to question them, but not to ensure the rules application. + +To ensure reliability over time, the associated Prolog program is stored and pinned in a `cw-storage` contract. Moreover, all the eventual loaded files must be stored in a `cw-storage` contract as well, allowing the contract to pin them. + +To be able to free the underlying resources (i.e. objects in `cw-storage`) if not used anymore, the contract admin can break the stone. + +| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | +| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :------------------------------------------------------------------- | +| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [cw-law-stone.json](schema/cw-law-stone.json "open original schema") | + +## cw-law-stone Type + +unknown ([cw-law-stone](cw-law-stone.md)) diff --git a/docs/schema/cw-law-stone.json b/docs/schema/cw-law-stone.json new file mode 100644 index 00000000..ff3841dc --- /dev/null +++ b/docs/schema/cw-law-stone.json @@ -0,0 +1 @@ +{"contract_name":"cw-law-stone","contract_version":"0.2.0","idl_version":"1.0.0","instantiate":{"$schema":"http://json-schema.org/draft-07/schema#","title":"InstantiateMsg","description":"Instantiate message","type":"object","required":["program","storage_address"],"properties":{"program":{"description":"The Prolog program carrying law rules and facts.","allOf":[{"$ref":"./cw-law-stone.json/#/definitions/Binary"}]},"storage_address":{"description":"The `cw-storage` contract address on which to store the law program.","type":"string"}},"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"}}},"execute":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ExecuteMsg","description":"Execute messages","oneOf":[{"title":"BreakStone","description":"Break the stone making this contract unusable, by clearing all the related resources: - Unpin all the pinned objects on `cw-storage` contracts, if any. - Forget the main program (i.e. or at least unpin it). Only the contract admin is authorized to break it, if any. If already broken, this is a no-op.","type":"string","enum":["break_stone"]}]},"query":{"$schema":"http://json-schema.org/draft-07/schema#","title":"QueryMsg","description":"Query messages","oneOf":[{"title":"Ask","description":"If not broken, ask the logic module the provided query with the law program loaded.","type":"object","required":["ask"],"properties":{"ask":{"type":"object","required":["query"],"properties":{"query":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},{"title":"Program","description":"If not broken, returns the law program location information.","type":"string","enum":["program"]}]},"migrate":null,"sudo":null,"responses":{"ask":{"$schema":"http://json-schema.org/draft-07/schema#","title":"AskResponse","type":"object","required":["gas_used","height"],"properties":{"answer":{"anyOf":[{"$ref":"./cw-law-stone.json/#/definitions/Answer"},{"type":"null"}]},"gas_used":{"type":"integer","format":"uint64","minimum":0},"height":{"type":"integer","format":"uint64","minimum":0}},"definitions":{"Answer":{"type":"object","required":["has_more","results","success","variables"],"properties":{"has_more":{"type":"boolean"},"results":{"type":"array","items":{"$ref":"./cw-law-stone.json/#/definitions/Result"}},"success":{"type":"boolean"},"variables":{"type":"array","items":{"type":"string"}}}},"Result":{"type":"object","required":["substitutions"],"properties":{"substitutions":{"type":"array","items":{"$ref":"./cw-law-stone.json/#/definitions/Substitution"}}}},"Substitution":{"type":"object","required":["term","variable"],"properties":{"term":{"$ref":"./cw-law-stone.json/#/definitions/Term"},"variable":{"type":"string"}}},"Term":{"type":"object","required":["arguments","name"],"properties":{"arguments":{"type":"array","items":{"$ref":"./cw-law-stone.json/#/definitions/Term"}},"name":{"type":"string"}}}}},"program":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ProgramResponse","description":"ProgramResponse carry elements to locate the program in a `cw-storage` contract.","type":"object","required":["object_id","storage_address"],"properties":{"object_id":{"description":"The program object id in the `cw-storage` contract.","type":"string"},"storage_address":{"description":"The `cw-storage` contract address on which the law program is stored.","type":"string"}},"additionalProperties":false}},"description":"# CW Law Stone\n\n## Overview\n\nThe `cw-law-stone` smart contract aims to provide GaaS (i.e. Governance as a Service) in any [Cosmos blockchains](https://cosmos.network/) using the [CosmWasm](https://cosmwasm.com/) framework and the [Logic](https://docs.okp4.network/modules/next/logic) OKP4 module.\n\nThis contract is built around a Prolog program describing the law by rules and facts. The law stone is immutable, this means it can only been questioned, there is no update mechanisms.\n\nThe `cw-law-stone` responsibility is to guarantee the availability of its rules in order to question them, but not to ensure the rules application.\n\nTo ensure reliability over time, the associated Prolog program is stored and pinned in a `cw-storage` contract. Moreover, all the eventual loaded files must be stored in a `cw-storage` contract as well, allowing the contract to pin them.\n\nTo be able to free the underlying resources (i.e. objects in `cw-storage`) if not used anymore, the contract admin can break the stone.","title":"cw-law-stone"}