From b72f8e219c8cf31e00045e97e7beafe24aee6860 Mon Sep 17 00:00:00 2001 From: Noah Saso <6721426+NoahSaso@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:06:37 -0500 Subject: [PATCH] schema --- .../dao-dao-core/schema/dao-dao-core.json | 51 ++++++++++++++++--- .../schema/cw-fund-distributor.json | 33 ++++++++++++ .../dao-migrator/schema/dao-migrator.json | 34 +++++++++++-- .../schema/dao-proposal-multiple.json | 51 ++++++++++++++++--- .../schema/dao-proposal-single.json | 51 ++++++++++++++++--- .../schema/dao-voting-cw20-staked.json | 33 ++++++++++++ .../dao-voting-cw4/schema/dao-voting-cw4.json | 15 ++++++ .../schema/dao-voting-cw721-roles.json | 15 ++++++ .../schema/dao-voting-cw721-staked.json | 11 ++++ .../schema/dao-voting-token-staked.json | 11 ++++ 10 files changed, 283 insertions(+), 22 deletions(-) diff --git a/contracts/dao-dao-core/schema/dao-dao-core.json b/contracts/dao-dao-core/schema/dao-dao-core.json index c4488c74d..17a30945f 100644 --- a/contracts/dao-dao-core/schema/dao-dao-core.json +++ b/contracts/dao-dao-core/schema/dao-dao-core.json @@ -621,7 +621,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -645,7 +644,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -661,6 +663,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -2040,7 +2053,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -2064,7 +2076,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -2080,6 +2095,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -3083,7 +3109,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -3107,7 +3132,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -3123,6 +3151,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/contracts/distribution/cw-fund-distributor/schema/cw-fund-distributor.json b/contracts/distribution/cw-fund-distributor/schema/cw-fund-distributor.json index ae3e73162..c3b0d1cd9 100644 --- a/contracts/distribution/cw-fund-distributor/schema/cw-fund-distributor.json +++ b/contracts/distribution/cw-fund-distributor/schema/cw-fund-distributor.json @@ -273,6 +273,17 @@ "format": "uint64", "minimum": 0.0 }, + "staking_salt": { + "description": "Optionally instantiate the staking contract via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, "unstaking_duration": { "description": "See corresponding field in cw20-stake's instantiation. This will be used when instantiating the new staking contract.", "anyOf": [ @@ -387,11 +398,33 @@ "name": { "type": "string" }, + "salt": { + "description": "Optionally instantiate the token via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, "staking_code_id": { "type": "integer", "format": "uint64", "minimum": 0.0 }, + "staking_salt": { + "description": "Optionally instantiate the staking contract via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, "symbol": { "type": "string" }, diff --git a/contracts/external/dao-migrator/schema/dao-migrator.json b/contracts/external/dao-migrator/schema/dao-migrator.json index 9f3087d74..39ee898e6 100644 --- a/contracts/external/dao-migrator/schema/dao-migrator.json +++ b/contracts/external/dao-migrator/schema/dao-migrator.json @@ -163,7 +163,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -187,7 +186,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -203,6 +205,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -557,7 +570,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -581,7 +593,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -597,6 +612,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json b/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json index 63de23882..987b39421 100644 --- a/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json +++ b/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json @@ -186,7 +186,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -210,7 +209,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -226,6 +228,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1283,7 +1296,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -1307,7 +1319,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -1323,6 +1338,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -2383,7 +2409,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -2407,7 +2432,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -2423,6 +2451,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json b/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json index b719a0a60..19dcefa8b 100644 --- a/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json +++ b/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json @@ -186,7 +186,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -210,7 +209,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -226,6 +228,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1336,7 +1349,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -1360,7 +1372,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -1376,6 +1391,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -2461,7 +2487,6 @@ "type": "object", "required": [ "code_id", - "funds", "label", "msg" ], @@ -2485,7 +2510,10 @@ }, "funds": { "description": "Funds to be sent to the instantiated contract.", - "type": "array", + "type": [ + "array", + "null" + ], "items": { "$ref": "#/definitions/Coin" } @@ -2501,6 +2529,17 @@ "$ref": "#/definitions/Binary" } ] + }, + "salt": { + "description": "Salt to use with instantiate2, if defined. Otherwise uses normal instantiate.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/contracts/voting/dao-voting-cw20-staked/schema/dao-voting-cw20-staked.json b/contracts/voting/dao-voting-cw20-staked/schema/dao-voting-cw20-staked.json index b2043550f..71714af19 100644 --- a/contracts/voting/dao-voting-cw20-staked/schema/dao-voting-cw20-staked.json +++ b/contracts/voting/dao-voting-cw20-staked/schema/dao-voting-cw20-staked.json @@ -273,6 +273,17 @@ "format": "uint64", "minimum": 0.0 }, + "staking_salt": { + "description": "Optionally instantiate the staking contract via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, "unstaking_duration": { "description": "See corresponding field in cw20-stake's instantiation. This will be used when instantiating the new staking contract.", "anyOf": [ @@ -387,11 +398,33 @@ "name": { "type": "string" }, + "salt": { + "description": "Optionally instantiate the token via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, "staking_code_id": { "type": "integer", "format": "uint64", "minimum": 0.0 }, + "staking_salt": { + "description": "Optionally instantiate the staking contract via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, "symbol": { "type": "string" }, diff --git a/contracts/voting/dao-voting-cw4/schema/dao-voting-cw4.json b/contracts/voting/dao-voting-cw4/schema/dao-voting-cw4.json index 5e785bb41..1f870b783 100644 --- a/contracts/voting/dao-voting-cw4/schema/dao-voting-cw4.json +++ b/contracts/voting/dao-voting-cw4/schema/dao-voting-cw4.json @@ -16,6 +16,10 @@ }, "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" + }, "GroupContract": { "oneOf": [ { @@ -57,6 +61,17 @@ "format": "uint64", "minimum": 0.0 }, + "cw4_group_salt": { + "description": "Optionally instantiate the cw4 group via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, "initial_members": { "type": "array", "items": { diff --git a/contracts/voting/dao-voting-cw721-roles/schema/dao-voting-cw721-roles.json b/contracts/voting/dao-voting-cw721-roles/schema/dao-voting-cw721-roles.json index b73565bb0..401385358 100644 --- a/contracts/voting/dao-voting-cw721-roles/schema/dao-voting-cw721-roles.json +++ b/contracts/voting/dao-voting-cw721-roles/schema/dao-voting-cw721-roles.json @@ -21,6 +21,10 @@ }, "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" + }, "MetadataExt": { "type": "object", "required": [ @@ -104,6 +108,17 @@ "description": "NFT collection name", "type": "string" }, + "salt": { + "description": "Optionally instantiate the token via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] + }, "symbol": { "description": "NFT collection symbol", "type": "string" diff --git a/contracts/voting/dao-voting-cw721-staked/schema/dao-voting-cw721-staked.json b/contracts/voting/dao-voting-cw721-staked/schema/dao-voting-cw721-staked.json index 396c520d9..c2ebe89ee 100644 --- a/contracts/voting/dao-voting-cw721-staked/schema/dao-voting-cw721-staked.json +++ b/contracts/voting/dao-voting-cw721-staked/schema/dao-voting-cw721-staked.json @@ -194,6 +194,17 @@ }, "msg": { "$ref": "#/definitions/Binary" + }, + "salt": { + "description": "Optionally instantiate the token via instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/contracts/voting/dao-voting-token-staked/schema/dao-voting-token-staked.json b/contracts/voting/dao-voting-token-staked/schema/dao-voting-token-staked.json index 0ef91a60f..36f1e0898 100644 --- a/contracts/voting/dao-voting-token-staked/schema/dao-voting-token-staked.json +++ b/contracts/voting/dao-voting-token-staked/schema/dao-voting-token-staked.json @@ -262,6 +262,17 @@ "type": "integer", "format": "uint64", "minimum": 0.0 + }, + "token_issuer_salt": { + "description": "Optionally instantiate the cw-tokenfactory-issuer contract with instantiate2 using this salt.", + "anyOf": [ + { + "$ref": "#/definitions/Binary" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false