From aa13a6216b94496451112e1dee194e9eef8982a2 Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Thu, 29 Feb 2024 12:01:47 -0500 Subject: [PATCH 01/12] set provenance to 1.18.0-rc2 --- dependencies/provenance | 2 +- packages/proto-build/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies/provenance b/dependencies/provenance index 7b165708..b27b3f0f 160000 --- a/dependencies/provenance +++ b/dependencies/provenance @@ -1 +1 @@ -Subproject commit 7b165708ccd30b98df0ac47fd541f572bcf2f001 +Subproject commit b27b3f0fa2f794f37fc48a70c69bcb1b8ba12218 diff --git a/packages/proto-build/src/main.rs b/packages/proto-build/src/main.rs index a0428d3e..7ebbb115 100644 --- a/packages/proto-build/src/main.rs +++ b/packages/proto-build/src/main.rs @@ -10,7 +10,7 @@ use proto_build::{ }; /// The provenance commit or tag to be cloned and used to build the proto files -const PROVENANCE_REV: &str = "v1.17.1"; +const PROVENANCE_REV: &str = "v1.18.0-rc2"; // All paths must end with a / and either be absolute or include a ./ to reference the current // working directory. From e2581634d9202e1453cc35d234079a535271fe66 Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:52:03 -0500 Subject: [PATCH 02/12] update provenance commit hash --- packages/provwasm-std/src/types/PROVENANCE_COMMIT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/provwasm-std/src/types/PROVENANCE_COMMIT b/packages/provwasm-std/src/types/PROVENANCE_COMMIT index 34779d0c..dc12d32f 100644 --- a/packages/provwasm-std/src/types/PROVENANCE_COMMIT +++ b/packages/provwasm-std/src/types/PROVENANCE_COMMIT @@ -1 +1 @@ -v1.17.1 \ No newline at end of file +v1.18.0-rc2 \ No newline at end of file From c0c586df1e7112214213c3081eaa83d6f5f4b796 Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:29:12 -0500 Subject: [PATCH 03/12] update exchange generated types --- .../src/types/provenance/exchange/v1.rs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/provwasm-std/src/types/provenance/exchange/v1.rs b/packages/provwasm-std/src/types/provenance/exchange/v1.rs index 0be61db8..aee8a9c9 100644 --- a/packages/provwasm-std/src/types/provenance/exchange/v1.rs +++ b/packages/provwasm-std/src/types/provenance/exchange/v1.rs @@ -420,6 +420,17 @@ pub struct Market { pub req_attr_create_ask: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(string, repeated, tag = "13")] pub req_attr_create_bid: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, tag = "14")] + pub accepting_commitments: bool, + #[prost(message, repeated, tag = "15")] + pub fee_create_commitment_flat: + ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "16")] + pub commitment_settlement_bips: u32, + #[prost(string, tag = "17")] + pub intermediary_denom: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "18")] + pub req_attr_create_commitment: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1026,10 +1037,13 @@ pub struct MsgMarketUpdateDetailsResponse {} #[proto_message(type_url = "/provenance.exchange.v1.MsgMarketUpdateEnabledRequest")] #[serde(rename_all = "snake_case")] pub struct MsgMarketUpdateEnabledRequest { + #[deprecated] #[prost(string, tag = "1")] pub admin: ::prost::alloc::string::String, + #[deprecated] #[prost(uint32, tag = "2")] pub market_id: u32, + #[deprecated] #[prost(bool, tag = "3")] pub accepting_orders: bool, } @@ -1141,6 +1155,10 @@ pub struct MsgMarketManageReqAttrsRequest { pub create_bid_to_add: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(string, repeated, tag = "6")] pub create_bid_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "7")] + pub create_commitment_to_add: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag = "8")] + pub create_commitment_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1235,6 +1253,16 @@ pub struct MsgGovManageFeesRequest { pub add_fee_buyer_settlement_ratios: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "14")] pub remove_fee_buyer_settlement_ratios: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "15")] + pub add_fee_create_commitment_flat: + ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "16")] + pub remove_fee_create_commitment_flat: + ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "17")] + pub set_fee_commitment_settlement_bips: u32, + #[prost(bool, tag = "18")] + pub unset_fee_commitment_settlement_bips: bool, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( From bf3e612d37a313726ddcb6242a86099691b4cb70 Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:08:33 -0500 Subject: [PATCH 04/12] update marker generated types --- .../src/types/provenance/marker/v1.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/provwasm-std/src/types/provenance/marker/v1.rs b/packages/provwasm-std/src/types/provenance/marker/v1.rs index d3f5d345..4e7f8629 100644 --- a/packages/provwasm-std/src/types/provenance/marker/v1.rs +++ b/packages/provwasm-std/src/types/provenance/marker/v1.rs @@ -70,6 +70,7 @@ pub enum Access { Delete = 5, Admin = 6, Transfer = 7, + ForceTransfer = 8, } impl Access { /// String value of the enum field names used in the ProtoBuf definition. @@ -86,6 +87,7 @@ impl Access { Access::Delete => "ACCESS_DELETE", Access::Admin => "ACCESS_ADMIN", Access::Transfer => "ACCESS_TRANSFER", + Access::ForceTransfer => "ACCESS_FORCE_TRANSFER", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -99,6 +101,7 @@ impl Access { "ACCESS_DELETE" => Some(Self::Delete), "ACCESS_ADMIN" => Some(Self::Admin), "ACCESS_TRANSFER" => Some(Self::Transfer), + "ACCESS_FORCE_TRANSFER" => Some(Self::ForceTransfer), _ => None, } } @@ -1228,6 +1231,7 @@ pub struct MsgAddMarkerRequest { pub allow_forced_transfer: bool, #[prost(string, repeated, tag = "11")] pub required_attributes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[deprecated] #[prost(uint64, tag = "12")] #[serde( serialize_with = "crate::serde::as_str::serialize", @@ -1240,6 +1244,12 @@ pub struct MsgAddMarkerRequest { deserialize_with = "crate::serde::as_str::deserialize" )] pub volume: u64, + #[prost(uint64, tag = "14")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub usd_mills: u64, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1674,6 +1684,7 @@ pub struct MsgAddFinalizeActivateMarkerRequest { pub allow_forced_transfer: bool, #[prost(string, repeated, tag = "10")] pub required_attributes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[deprecated] #[prost(uint64, tag = "11")] #[serde( serialize_with = "crate::serde::as_str::serialize", @@ -1686,6 +1697,12 @@ pub struct MsgAddFinalizeActivateMarkerRequest { deserialize_with = "crate::serde::as_str::deserialize" )] pub volume: u64, + #[prost(uint64, tag = "13")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub usd_mills: u64, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( From 54525ae1651676f20f3dd833c865840d9cde954a Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:30:59 -0500 Subject: [PATCH 05/12] update metadata generated types --- packages/provwasm-std/src/types/provenance/metadata/v1.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/provwasm-std/src/types/provenance/metadata/v1.rs b/packages/provwasm-std/src/types/provenance/metadata/v1.rs index 5a52d566..65e3d606 100644 --- a/packages/provwasm-std/src/types/provenance/metadata/v1.rs +++ b/packages/provwasm-std/src/types/provenance/metadata/v1.rs @@ -2150,6 +2150,12 @@ pub struct MsgWriteScopeRequest { pub scope_uuid: ::prost::alloc::string::String, #[prost(string, tag = "4")] pub spec_uuid: ::prost::alloc::string::String, + #[prost(uint64, tag = "5")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub usd_mills: u64, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( From 9f58a7207d2c177f3a0e1f77481329b363ed3084 Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Mon, 4 Mar 2024 16:05:14 -0500 Subject: [PATCH 06/12] add cosmos msg mod --- packages/provwasm-std/src/types/cosmos/mod.rs | 1 + packages/provwasm-std/src/types/cosmos/msg/mod.rs | 1 + packages/provwasm-std/src/types/cosmos/msg/v1.rs | 1 + 3 files changed, 3 insertions(+) create mode 100644 packages/provwasm-std/src/types/cosmos/msg/mod.rs create mode 100644 packages/provwasm-std/src/types/cosmos/msg/v1.rs diff --git a/packages/provwasm-std/src/types/cosmos/mod.rs b/packages/provwasm-std/src/types/cosmos/mod.rs index 1f499622..79f070fc 100644 --- a/packages/provwasm-std/src/types/cosmos/mod.rs +++ b/packages/provwasm-std/src/types/cosmos/mod.rs @@ -5,6 +5,7 @@ pub mod base; pub mod crypto; pub mod distribution; pub mod gov; +pub mod msg; pub mod slashing; pub mod staking; pub mod tx; diff --git a/packages/provwasm-std/src/types/cosmos/msg/mod.rs b/packages/provwasm-std/src/types/cosmos/msg/mod.rs new file mode 100644 index 00000000..a3a6d96c --- /dev/null +++ b/packages/provwasm-std/src/types/cosmos/msg/mod.rs @@ -0,0 +1 @@ +pub mod v1; diff --git a/packages/provwasm-std/src/types/cosmos/msg/v1.rs b/packages/provwasm-std/src/types/cosmos/msg/v1.rs new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/packages/provwasm-std/src/types/cosmos/msg/v1.rs @@ -0,0 +1 @@ + From 1edda8c68d66a9e0ca4d2e347ea3df3c34dfca8a Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Tue, 5 Mar 2024 09:13:43 -0500 Subject: [PATCH 07/12] cleanup contracts makefile --- contracts/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contracts/Makefile b/contracts/Makefile index 06f29157..6c30117a 100644 --- a/contracts/Makefile +++ b/contracts/Makefile @@ -1,5 +1,5 @@ .PHONY: all -all: attrs ibc marker msgfees name scope trigger tutorial +all: attrs ibc marker msgfees name scope security trigger tutorial .PHONY: attrs attrs: @@ -25,6 +25,10 @@ name: scope: @make -C scope +.PHONY: security +security: + @make -C security + .PHONY: trigger trigger: @make -C trigger @@ -41,3 +45,5 @@ clean: @make -C msgfees clean @make -C name clean @make -C scope clean + @make -C trigger clean + @make -C tutorial clean From 90d2033452e35ee942302d538cf88d47547ba59b Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Tue, 5 Mar 2024 10:08:55 -0500 Subject: [PATCH 08/12] cleanup root makefile --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 0d6e23c1..77776289 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ attrs: @make -C contracts/attrs .PHONY: ibc -attrs: +ibc: @make -C contracts/ibc .PHONY: marker @@ -43,21 +43,21 @@ name: @make -C contracts/name .PHONY: nft -name: +nft: @make -C contracts/nft +.PHONY: security +security: + @make -C contracts/security + .PHONY: scope scope: @make -C contracts/scope .PHONY: template -scope: +template: @make -C contracts/template .PHONY: trigger -scope: +trigger: @make -C contracts/trigger - -.PHONY: security -security: - @make -C contracts/security From 6243eeb8733238b37526b38078b4411a04271048 Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:39:18 -0500 Subject: [PATCH 09/12] add clippy ignore too_many_args --- packages/provwasm-std/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/provwasm-std/src/lib.rs b/packages/provwasm-std/src/lib.rs index a9410b76..6aa1ea77 100644 --- a/packages/provwasm-std/src/lib.rs +++ b/packages/provwasm-std/src/lib.rs @@ -3,6 +3,7 @@ pub const PROVENANCE_VERSION: &str = include_str!("types/PROVENANCE_COMMIT"); mod serde; pub mod shim; +#[allow(clippy::too_many_arguments)] pub mod types; // Indicate that smart contracts that use this lib can only be run on the Provenance Blockchain. #[no_mangle] From bca208836be208ea30e9c6c434ab020eb703d9ff Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Tue, 5 Mar 2024 13:24:31 -0500 Subject: [PATCH 10/12] fix args for marker contract --- contracts/marker/src/contract.rs | 8 ++++---- contracts/marker/src/helpers.rs | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contracts/marker/src/contract.rs b/contracts/marker/src/contract.rs index b8b9aabb..f8a2b307 100644 --- a/contracts/marker/src/contract.rs +++ b/contracts/marker/src/contract.rs @@ -327,9 +327,9 @@ mod tests { required_attributes: vec![], usd_cents: 0, volume: 0, + usd_mills: 0, } - .try_into() - .unwrap(); + .into(); // Create marker execute message let msg = ExecuteMsg::Create { @@ -378,9 +378,9 @@ mod tests { required_attributes: vec![], usd_cents: 0, volume: 0, + usd_mills: 0, } - .try_into() - .unwrap(); + .into(); // Create marker execute message let msg = ExecuteMsg::Create { diff --git a/contracts/marker/src/helpers.rs b/contracts/marker/src/helpers.rs index c7866e50..4b232477 100644 --- a/contracts/marker/src/helpers.rs +++ b/contracts/marker/src/helpers.rs @@ -66,6 +66,7 @@ pub fn create_marker>( required_attributes: vec![], usd_cents: 0, volume: 0, + usd_mills: 0, } .into()) } From d5af3ef1f0bdb1df9dbb6de8adcd9cf69c6769d5 Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:11:02 -0500 Subject: [PATCH 11/12] fix args for scope contract --- contracts/scope/src/contract.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/scope/src/contract.rs b/contracts/scope/src/contract.rs index 8bf2e23a..74e4513b 100644 --- a/contracts/scope/src/contract.rs +++ b/contracts/scope/src/contract.rs @@ -84,6 +84,7 @@ pub fn try_write_scope( signers, scope_uuid: "".to_string(), spec_uuid: "".to_string(), + usd_mills: 0, })) } From e4783f84a579f4ed9919612b80c332f6c6378625 Mon Sep 17 00:00:00 2001 From: kwt <4344285+kwtalley@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:20:45 -0500 Subject: [PATCH 12/12] update CHANGELOG, RELEASE_CHANGELOG --- CHANGELOG.md | 10 +++++++--- RELEASE_CHANGELOG.md | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5094ff3..aa030bb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ * Bump to Provenance 1.17.1 ([#135](https://github.com/provenance-io/provwasm/issues/135)) * Add ibc message types ([#136](https://github.com/provenance-io/provwasm/issues/136)) * Update contracts to use `cosmwasm/optimzer` ([#140](https://github.com/provenance-io/provwasm/issues/140)) -* Create security contract to link assets with a security type ([#138](https://github.com/provenance-io/provwasm/issues/138)) +* Create security contract to link assets with a security + type ([#138](https://github.com/provenance-io/provwasm/issues/138)) +* Bump to Provenance 1.18.0-rc2 ([#143](https://github.com/provenance-io/provwasm/issues/143)) ## Releases @@ -22,7 +24,8 @@ ### [v1.2.0](https://github.com/provenance-io/provwasm/tree/v1.2.0) * Update tutorial documentation ([#102](https://github.com/provenance-io/provwasm/issues/102)) -* Add Fee struct to make it easier to implement message fees ([#106](https://github.com/provenance-io/provwasm/issues/106)) +* Add Fee struct to make it easier to implement message + fees ([#106](https://github.com/provenance-io/provwasm/issues/106)) * Added ProvenanceMsg From implementation ([#108](https://github.com/provenance-io/provwasm/issues/102)) * Add forced transfer support for restricted markers ([#110](https://github.com/provenance-io/provwasm/issues/110)) @@ -38,7 +41,8 @@ ### [v1.1.0](https://github.com/provenance-io/provwasm/tree/v1.1.0) * Smart Contract MsgFee Support ([#87](https://github.com/provenance-io/provwasm/issues/87)) -* Add `UpdateAttribute` and `DeleteDistinctAttribute` bindings ([#86](https://github.com/provenance-io/provwasm/issues/86)) +* Add `UpdateAttribute` and `DeleteDistinctAttribute` + bindings ([#86](https://github.com/provenance-io/provwasm/issues/86)) ### [v1.0.0](https://github.com/provenance-io/provwasm/tree/v1.0.0) diff --git a/RELEASE_CHANGELOG.md b/RELEASE_CHANGELOG.md index 560c20f9..95026753 100644 --- a/RELEASE_CHANGELOG.md +++ b/RELEASE_CHANGELOG.md @@ -4,3 +4,4 @@ * Bump to Provenance 1.17.1 ([#135](https://github.com/provenance-io/provwasm/issues/135)) * Add ibc message types ([#136](https://github.com/provenance-io/provwasm/issues/136)) * Update contracts to use `cosmwasm/optimzer` ([#140](https://github.com/provenance-io/provwasm/issues/140)) +* Bump to Provenance 1.18.0-rc2 ([#143](https://github.com/provenance-io/provwasm/issues/143))