diff --git a/Cargo.lock b/Cargo.lock index 885603bc0..e5184d09a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1844,7 +1844,7 @@ dependencies = [ [[package]] name = "dao-proposal-incentives" -version = "2.4.0" +version = "2.4.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1862,7 +1862,7 @@ dependencies = [ "dao-interface", "dao-proposal-single", "dao-testing", - "dao-voting 2.4.0", + "dao-voting 2.4.2", "thiserror", ] @@ -2157,7 +2157,7 @@ dependencies = [ [[package]] name = "dao-voting-incentives" -version = "2.4.0" +version = "2.4.2" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -2175,7 +2175,7 @@ dependencies = [ "dao-interface", "dao-proposal-single", "dao-testing", - "dao-voting 2.4.0", + "dao-voting 2.4.2", "thiserror", ] diff --git a/ci/bootstrap-env/src/main.rs b/ci/bootstrap-env/src/main.rs index c1c321c91..83d6b82c9 100644 --- a/ci/bootstrap-env/src/main.rs +++ b/ci/bootstrap-env/src/main.rs @@ -183,7 +183,8 @@ fn main() -> Result<()> { ); // Persist contract code_ids in local.yaml so we can use SKIP_CONTRACT_STORE locally to avoid having to re-store them again - cfg.contract_deploy_info = orc.contract_map.deploy_info().clone(); + cfg.contract_deploy_info + .clone_from(orc.contract_map.deploy_info()); fs::write( "ci/configs/cosm-orc/local.yaml", serde_yaml::to_string(&cfg)?, diff --git a/ci/integration-tests/src/helpers/chain.rs b/ci/integration-tests/src/helpers/chain.rs index 20b3d27d4..fd7445cde 100644 --- a/ci/integration-tests/src/helpers/chain.rs +++ b/ci/integration-tests/src/helpers/chain.rs @@ -99,7 +99,8 @@ fn global_setup() -> Cfg { .unwrap(); save_gas_report(&orc, &gas_report_dir); // persist stored code_ids in CONFIG, so we can reuse for all tests - cfg.contract_deploy_info = orc.contract_map.deploy_info().clone(); + cfg.contract_deploy_info + .clone_from(orc.contract_map.deploy_info()); } Cfg { diff --git a/contracts/dao-dao-core/schema/dao-dao-core.json b/contracts/dao-dao-core/schema/dao-dao-core.json index 3ada83c21..9ce1b683f 100644 --- a/contracts/dao-dao-core/schema/dao-dao-core.json +++ b/contracts/dao-dao-core/schema/dao-dao-core.json @@ -1796,6 +1796,27 @@ }, "additionalProperties": false }, + { + "type": "object", + "required": [ + "proposal_module" + ], + "properties": { + "proposal_module": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, { "description": "Gets the active proposal modules associated with the contract.", "type": "object", @@ -3033,6 +3054,54 @@ } } }, + "proposal_module": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ProposalModule", + "description": "Top level type describing a proposal module.", + "type": "object", + "required": [ + "address", + "prefix", + "status" + ], + "properties": { + "address": { + "description": "The address of the proposal module.", + "allOf": [ + { + "$ref": "#/definitions/Addr" + } + ] + }, + "prefix": { + "description": "The URL prefix of this proposal module as derived from the module ID. Prefixes are mapped to letters, e.g. 0 is 'A', and 26 is 'AA'.", + "type": "string" + }, + "status": { + "description": "The status of the proposal module, e.g. 'Enabled' or 'Disabled.'", + "allOf": [ + { + "$ref": "#/definitions/ProposalModuleStatus" + } + ] + } + }, + "additionalProperties": false, + "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" + }, + "ProposalModuleStatus": { + "description": "The status of a proposal module.", + "type": "string", + "enum": [ + "enabled", + "disabled" + ] + } + } + }, "proposal_module_count": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ProposalModuleCountResponse", diff --git a/contracts/external/cw721-roles/src/contract.rs b/contracts/external/cw721-roles/src/contract.rs index 833007e46..ea31936a1 100644 --- a/contracts/external/cw721-roles/src/contract.rs +++ b/contracts/external/cw721-roles/src/contract.rs @@ -319,7 +319,7 @@ pub fn execute_update_token_role( let mut token = contract.tokens.load(deps.storage, &token_id)?; // Update role with new value - token.extension.role = role.clone(); + token.extension.role.clone_from(&role); contract.tokens.save(deps.storage, &token_id, &token)?; Ok(Response::default() @@ -341,7 +341,7 @@ pub fn execute_update_token_uri( let mut token = contract.tokens.load(deps.storage, &token_id)?; // Set new token URI - token.token_uri = token_uri.clone(); + token.token_uri.clone_from(&token_uri); contract.tokens.save(deps.storage, &token_id, &token)?; Ok(Response::new() diff --git a/contracts/external/dao-proposal-incentives/Cargo.toml b/contracts/external/dao-proposal-incentives/Cargo.toml index ff3827b82..a347bf3f2 100644 --- a/contracts/external/dao-proposal-incentives/Cargo.toml +++ b/contracts/external/dao-proposal-incentives/Cargo.toml @@ -1,6 +1,6 @@ [package] name ="dao-proposal-incentives" -authors = ["Jake Hartnell ", "ismellike"] +authors = ["Jake Hartnell ", "Gabe Lopez "] description = "A contract that implements incentives for voting in a DAO." edition = { workspace = true } license = { workspace = true } diff --git a/contracts/external/dao-proposal-incentives/schema/dao-proposal-incentives.json b/contracts/external/dao-proposal-incentives/schema/dao-proposal-incentives.json index 2d02b5883..a258c15ea 100644 --- a/contracts/external/dao-proposal-incentives/schema/dao-proposal-incentives.json +++ b/contracts/external/dao-proposal-incentives/schema/dao-proposal-incentives.json @@ -1,6 +1,6 @@ { "contract_name": "dao-proposal-incentives", - "contract_version": "2.4.0", + "contract_version": "2.4.2", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/external/dao-proposal-incentives/src/tests.rs b/contracts/external/dao-proposal-incentives/src/tests.rs index 2adca6808..903ef94df 100644 --- a/contracts/external/dao-proposal-incentives/src/tests.rs +++ b/contracts/external/dao-proposal-incentives/src/tests.rs @@ -357,6 +357,7 @@ pub fn test_hook() { funds: vec![], })], proposer: None, + vote: None, }), &[], ); @@ -390,6 +391,7 @@ pub fn test_hook() { description: "Testing".to_string(), msgs: vec![], proposer: None, + vote: None, }), &[], ) @@ -418,6 +420,7 @@ pub fn test_hook() { description: "Testing".to_string(), msgs: vec![], proposer: None, + vote: None, }), &[], ) diff --git a/contracts/external/dao-voting-incentives/Cargo.toml b/contracts/external/dao-voting-incentives/Cargo.toml index be6d63c19..882d4a7ab 100644 --- a/contracts/external/dao-voting-incentives/Cargo.toml +++ b/contracts/external/dao-voting-incentives/Cargo.toml @@ -1,6 +1,6 @@ [package] name ="dao-voting-incentives" -authors = ["Jake Hartnell ", "ismellike"] +authors = ["Jake Hartnell ", "Gabe Lopez "] description = "A contract that implements incentives for voting in a DAO." edition = { workspace = true } license = { workspace = true } diff --git a/contracts/external/dao-voting-incentives/schema/dao-voting-incentives.json b/contracts/external/dao-voting-incentives/schema/dao-voting-incentives.json index f2331d18e..08eefdf57 100644 --- a/contracts/external/dao-voting-incentives/schema/dao-voting-incentives.json +++ b/contracts/external/dao-voting-incentives/schema/dao-voting-incentives.json @@ -1,6 +1,6 @@ { "contract_name": "dao-voting-incentives", - "contract_version": "2.4.0", + "contract_version": "2.4.2", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/external/dao-voting-incentives/src/tests.rs b/contracts/external/dao-voting-incentives/src/tests.rs index d4058e61f..a6fb3ebb6 100644 --- a/contracts/external/dao-voting-incentives/src/tests.rs +++ b/contracts/external/dao-voting-incentives/src/tests.rs @@ -319,6 +319,7 @@ pub fn test_hooks() { }), ], proposer: None, + vote: None, }), &[], ); @@ -358,6 +359,7 @@ pub fn test_hooks() { description: "Testing".to_string(), msgs: vec![], proposer: None, + vote: None, }), &[], ) @@ -435,6 +437,7 @@ pub fn test_hooks() { description: "Testing".to_string(), msgs: vec![], proposer: None, + vote: None, }), &[], ) diff --git a/contracts/proposal/dao-proposal-condorcet/schema/dao-proposal-condorcet.json b/contracts/proposal/dao-proposal-condorcet/schema/dao-proposal-condorcet.json index 1ffbbb163..ef9e647a1 100644 --- a/contracts/proposal/dao-proposal-condorcet/schema/dao-proposal-condorcet.json +++ b/contracts/proposal/dao-proposal-condorcet/schema/dao-proposal-condorcet.json @@ -1140,6 +1140,30 @@ } }, "additionalProperties": false + }, + { + "description": "Returns generic proposal information", + "type": "object", + "required": [ + "generic_proposal_info" + ], + "properties": { + "generic_proposal_info": { + "type": "object", + "required": [ + "proposal_id" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ] }, @@ -1256,6 +1280,32 @@ "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" }, + "generic_proposal_info": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GenericProposalInfo", + "type": "object", + "required": [ + "proposer", + "start_height" + ], + "properties": { + "proposer": { + "$ref": "#/definitions/Addr" + }, + "start_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false, + "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" + } + } + }, "info": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InfoResponse", 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 415412ea2..2b95657b5 100644 --- a/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json +++ b/contracts/proposal/dao-proposal-multiple/schema/dao-proposal-multiple.json @@ -2078,6 +2078,30 @@ } }, "additionalProperties": false + }, + { + "description": "Returns generic proposal information", + "type": "object", + "required": [ + "generic_proposal_info" + ], + "properties": { + "generic_proposal_info": { + "type": "object", + "required": [ + "proposal_id" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ] }, @@ -2580,6 +2604,32 @@ "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" }, + "generic_proposal_info": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GenericProposalInfo", + "type": "object", + "required": [ + "proposer", + "start_height" + ], + "properties": { + "proposer": { + "$ref": "#/definitions/Addr" + }, + "start_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false, + "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" + } + } + }, "get_vote": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "VoteResponse", 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 2491d27aa..566cc760d 100644 --- a/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json +++ b/contracts/proposal/dao-proposal-single/schema/dao-proposal-single.json @@ -2156,6 +2156,30 @@ } }, "additionalProperties": false + }, + { + "description": "Returns generic proposal information", + "type": "object", + "required": [ + "generic_proposal_info" + ], + "properties": { + "generic_proposal_info": { + "type": "object", + "required": [ + "proposal_id" + ], + "properties": { + "proposal_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false } ] }, @@ -2711,6 +2735,32 @@ "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" }, + "generic_proposal_info": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "GenericProposalInfo", + "type": "object", + "required": [ + "proposer", + "start_height" + ], + "properties": { + "proposer": { + "$ref": "#/definitions/Addr" + }, + "start_height": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false, + "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" + } + } + }, "get_vote": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "VoteResponse",