Skip to content

Commit

Permalink
re-generated schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Zavgorodnii committed Feb 26, 2024
1 parent e17ea61 commit 5825efb
Show file tree
Hide file tree
Showing 6 changed files with 281 additions and 199 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use cosmwasm_schema::write_api;
use neutron_chain_manager::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};

fn main() {
write_api! {
instantiate: InstantiateMsg,
query: QueryMsg,
execute: ExecuteMsg,
migrate: MigrateMsg
}
}
235 changes: 135 additions & 100 deletions contracts/dao/neutron-chain-manager/schema/neutron-chain-manager.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,25 @@
"title": "InstantiateMsg",
"type": "object",
"required": [
"initial_strategies"
"initial_strategy",
"initial_strategy_address"
],
"properties": {
"initial_strategies": {
"description": "Defines the initial list of strategies.",
"type": "array",
"items": {
"$ref": "#/definitions/Strategy"
}
"initial_strategy": {
"description": "Defines the initial strategy. Must be an ALLOW_ALL strategy.",
"allOf": [
{
"$ref": "#/definitions/Strategy"
}
]
},
"initial_strategy_address": {
"description": "Defines the address for the initial strategy.",
"allOf": [
{
"$ref": "#/definitions/Addr"
}
]
}
},
"definitions": {
Expand Down Expand Up @@ -53,32 +63,32 @@
}
}
},
"LegacyParamPermission": {
"ParamChangePermission": {
"type": "object",
"required": [
"key",
"subspace"
"params"
],
"properties": {
"key": {
"type": "string"
},
"subspace": {
"type": "string"
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/ParamPermission"
}
}
}
},
"ParamChangePermission": {
"ParamPermission": {
"type": "object",
"required": [
"params"
"key",
"subspace"
],
"properties": {
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/LegacyParamPermission"
}
"key": {
"type": "string"
},
"subspace": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -123,22 +133,29 @@
]
},
"Strategy": {
"type": "object",
"required": [
"address",
"permissions"
],
"properties": {
"address": {
"$ref": "#/definitions/Addr"
"oneOf": [
{
"type": "string",
"enum": [
"AllowAll"
]
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
{
"type": "object",
"required": [
"AllowOnly"
],
"properties": {
"AllowOnly": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
}
},
"additionalProperties": false
}
}
]
},
"UpdateParamsPermission": {
"oneOf": [
Expand Down Expand Up @@ -171,9 +188,13 @@
"add_strategy": {
"type": "object",
"required": [
"address",
"strategy"
],
"properties": {
"address": {
"$ref": "#/definitions/Addr"
},
"strategy": {
"$ref": "#/definitions/Strategy"
}
Expand Down Expand Up @@ -969,21 +990,6 @@
}
}
},
"LegacyParamPermission": {
"type": "object",
"required": [
"key",
"subspace"
],
"properties": {
"key": {
"type": "string"
},
"subspace": {
"type": "string"
}
}
},
"MsgExecuteContract": {
"description": "MsgExecuteContract defines a call to the contract execution",
"type": "object",
Expand Down Expand Up @@ -1540,7 +1546,7 @@
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/LegacyParamPermission"
"$ref": "#/definitions/ParamPermission"
}
}
}
Expand Down Expand Up @@ -1571,6 +1577,21 @@
}
}
},
"ParamPermission": {
"type": "object",
"required": [
"key",
"subspace"
],
"properties": {
"key": {
"type": "string"
},
"subspace": {
"type": "string"
}
}
},
"Permission": {
"oneOf": [
{
Expand Down Expand Up @@ -1833,22 +1854,29 @@
]
},
"Strategy": {
"type": "object",
"required": [
"address",
"permissions"
],
"properties": {
"address": {
"$ref": "#/definitions/Addr"
"oneOf": [
{
"type": "string",
"enum": [
"AllowAll"
]
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
{
"type": "object",
"required": [
"AllowOnly"
],
"properties": {
"AllowOnly": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
}
},
"additionalProperties": false
}
}
]
},
"SudoContractProposal": {
"description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.",
Expand Down Expand Up @@ -2214,7 +2242,11 @@
}
]
},
"migrate": null,
"migrate": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MigrateMsg",
"type": "object"
},
"sudo": null,
"responses": {
"strategies": {
Expand All @@ -2225,10 +2257,6 @@
"$ref": "#/definitions/Strategy"
},
"definitions": {
"Addr": {
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
"type": "string"
},
"CronPermission": {
"type": "object",
"required": [
Expand Down Expand Up @@ -2259,32 +2287,32 @@
}
}
},
"LegacyParamPermission": {
"ParamChangePermission": {
"type": "object",
"required": [
"key",
"subspace"
"params"
],
"properties": {
"key": {
"type": "string"
},
"subspace": {
"type": "string"
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/ParamPermission"
}
}
}
},
"ParamChangePermission": {
"ParamPermission": {
"type": "object",
"required": [
"params"
"key",
"subspace"
],
"properties": {
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/LegacyParamPermission"
}
"key": {
"type": "string"
},
"subspace": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -2329,22 +2357,29 @@
]
},
"Strategy": {
"type": "object",
"required": [
"address",
"permissions"
],
"properties": {
"address": {
"$ref": "#/definitions/Addr"
"oneOf": [
{
"type": "string",
"enum": [
"AllowAll"
]
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
{
"type": "object",
"required": [
"AllowOnly"
],
"properties": {
"AllowOnly": {
"type": "array",
"items": {
"$ref": "#/definitions/Permission"
}
}
},
"additionalProperties": false
}
}
]
},
"UpdateParamsPermission": {
"oneOf": [
Expand Down
Loading

0 comments on commit 5825efb

Please sign in to comment.