From 914a716575a7b0e1ce6dbb5126023ad9c3463ca5 Mon Sep 17 00:00:00 2001 From: Tronica Date: Tue, 18 Mar 2025 11:47:54 +0100 Subject: [PATCH 1/3] Update MIGRATING.md --- MIGRATING.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/MIGRATING.md b/MIGRATING.md index d5bbfd1f1..c092cecd9 100644 --- a/MIGRATING.md +++ b/MIGRATING.md @@ -24,7 +24,7 @@ major releases of `cosmwasm`. Note that you can also view the `stargate` feature instead, since it was previously implied by `ibc3`. Also remove any uses of the `backtraces` feature. You can use a - `RUST_BACKTRACE=1` env variable for this now. + `RUST_BACKTRACE=1` environment variable for this now. If you were using `cosmwasm-std` with `default-features = false`, you probably want to enable the `std` feature now, as we might move certain existing @@ -156,10 +156,10 @@ major releases of `cosmwasm`. Note that you can also view the +StdError::generic_err(msg) ``` -- Replace addresses in unit tests with valid bech32 addresses. This has to be +- Replace addresses in unit tests with valid Bech32 addresses. This has to be done for all addresses that are validated or canonicalized during the test or within the contract. The easiest way to do this is by using - `MockApi::addr_make`. It generates a bech32 address from any string: + `MockApi::addr_make`. It generates a Bech32 address from any string: ```diff -let msg = InstantiateMsg { @@ -172,10 +172,10 @@ major releases of `cosmwasm`. Note that you can also view the +}; ``` -- Replace addresses in integration tests using `cosmwasm-vm` with valid bech32 +- Replace addresses in integration tests using `cosmwasm-vm` with valid Bech32 addresses. This has to be done for all addresses that are validated or canonicalized during the test or within the contract. The easiest way to do - this is by using `MockApi::addr_make`. It generates a bech32 address from any + this is by using `MockApi::addr_make`. It generates a Bech32 address from any string: ```diff @@ -206,9 +206,9 @@ major releases of `cosmwasm`. Note that you can also view the - If you were using `QueryRequest::Stargate`, you might want to enable the `cosmwasm_2_0` cargo feature and migrate to `QueryRequest::Grpc` instead. - While the stargate query sometimes returns protobuf encoded data and sometimes + While the stargate query sometimes returns protobuf-encoded data and sometimes JSON encoded data, depending on the chain, the gRPC query always returns - protobuf encoded data. + protobuf-encoded data. ```diff -deps.querier.query(&QueryRequest::Stargate { @@ -1311,7 +1311,7 @@ arbitrary ones. The existing `CanonicalAddr` remains unchanged and can be used in cases in which a compact binary representation is desired. For JSON state this does not - save much data (e.g. the bech32 address + save much data (e.g. the Bech32 address cosmos1pfq05em6sfkls66ut4m2257p7qwlk448h8mysz takes 45 bytes as direct ASCII and 28 bytes when its canonical representation is base64 encoded). For fixed-length database keys `CanonicalAddr` remains handy though. From 802c7379fdbfb35650b798014a1cd1e9ca4426b7 Mon Sep 17 00:00:00 2001 From: Tronica Date: Tue, 18 Mar 2025 11:54:09 +0100 Subject: [PATCH 2/3] Update cosmos_msg.rs --- packages/std/src/results/cosmos_msg.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/std/src/results/cosmos_msg.rs b/packages/std/src/results/cosmos_msg.rs index ce9729772..6cdb20a72 100644 --- a/packages/std/src/results/cosmos_msg.rs +++ b/packages/std/src/results/cosmos_msg.rs @@ -72,7 +72,7 @@ pub enum CosmosMsg { type_url: String, value: Binary, }, - /// `CosmosMsg::Any` is the replaces the "stargate message" – a message wrapped + /// `CosmosMsg::Any` replaces the "stargate message" – a message wrapped /// in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) /// that is supported by the chain. It behaves the same as /// `CosmosMsg::Stargate` but has a better name and slightly improved syntax. @@ -176,7 +176,7 @@ pub enum DistributionMsg { /// The `withdraw_address` address: String, }, - /// This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). + /// This is translated to a [MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). /// `delegator_address` is automatically filled with the current contract's address. WithdrawDelegatorReward { /// The `validator_address` From 102b07ae6d8d94ec0d2764b07222bc50940b8d18 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:08:29 +0000 Subject: [PATCH 3/3] [autofix.ci] apply automated fixes --- contracts/ibc-reflect-send/schema/ibc-reflect-send.json | 2 +- contracts/ibc-reflect-send/schema/ibc/packet_msg.json | 2 +- contracts/ibc-reflect-send/schema/raw/execute.json | 2 +- contracts/ibc-reflect/schema/ibc/packet_msg.json | 2 +- contracts/reflect/schema/raw/execute.json | 4 ++-- contracts/reflect/schema/reflect.json | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contracts/ibc-reflect-send/schema/ibc-reflect-send.json b/contracts/ibc-reflect-send/schema/ibc-reflect-send.json index 3c91ffab8..b91202364 100644 --- a/contracts/ibc-reflect-send/schema/ibc-reflect-send.json +++ b/contracts/ibc-reflect-send/schema/ibc-reflect-send.json @@ -335,7 +335,7 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "description": "This is translated to a [MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ "withdraw_delegator_reward" diff --git a/contracts/ibc-reflect-send/schema/ibc/packet_msg.json b/contracts/ibc-reflect-send/schema/ibc/packet_msg.json index 974ced2dc..098776308 100644 --- a/contracts/ibc-reflect-send/schema/ibc/packet_msg.json +++ b/contracts/ibc-reflect-send/schema/ibc/packet_msg.json @@ -276,7 +276,7 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "description": "This is translated to a [MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ "withdraw_delegator_reward" diff --git a/contracts/ibc-reflect-send/schema/raw/execute.json b/contracts/ibc-reflect-send/schema/raw/execute.json index 8841eded4..392125413 100644 --- a/contracts/ibc-reflect-send/schema/raw/execute.json +++ b/contracts/ibc-reflect-send/schema/raw/execute.json @@ -324,7 +324,7 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "description": "This is translated to a [MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ "withdraw_delegator_reward" diff --git a/contracts/ibc-reflect/schema/ibc/packet_msg.json b/contracts/ibc-reflect/schema/ibc/packet_msg.json index eec0371bd..dc0222bd3 100644 --- a/contracts/ibc-reflect/schema/ibc/packet_msg.json +++ b/contracts/ibc-reflect/schema/ibc/packet_msg.json @@ -275,7 +275,7 @@ "additionalProperties": false }, { - "description": "`CosmosMsg::Any` is the replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is supported by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", + "description": "`CosmosMsg::Any` replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is supported by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", "type": "object", "required": [ "any" diff --git a/contracts/reflect/schema/raw/execute.json b/contracts/reflect/schema/raw/execute.json index 60689b4e4..1bb018bb7 100644 --- a/contracts/reflect/schema/raw/execute.json +++ b/contracts/reflect/schema/raw/execute.json @@ -247,7 +247,7 @@ "additionalProperties": false }, { - "description": "`CosmosMsg::Any` is the replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is supported by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", + "description": "`CosmosMsg::Any` replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is supported by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", "type": "object", "required": [ "any" @@ -357,7 +357,7 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "description": "This is translated to a [MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ "withdraw_delegator_reward" diff --git a/contracts/reflect/schema/reflect.json b/contracts/reflect/schema/reflect.json index 9a4c0e536..55b9fffa7 100644 --- a/contracts/reflect/schema/reflect.json +++ b/contracts/reflect/schema/reflect.json @@ -257,7 +257,7 @@ "additionalProperties": false }, { - "description": "`CosmosMsg::Any` is the replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is supported by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", + "description": "`CosmosMsg::Any` replaces the \"stargate message\" – a message wrapped in a [protobuf Any](https://protobuf.dev/programming-guides/proto3/#any) that is supported by the chain. It behaves the same as `CosmosMsg::Stargate` but has a better name and slightly improved syntax.\n\nThis is feature-gated at compile time with `cosmwasm_2_0` because a chain running CosmWasm < 2.0 cannot process this.", "type": "object", "required": [ "any" @@ -367,7 +367,7 @@ "additionalProperties": false }, { - "description": "This is translated to a [[MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", + "description": "This is translated to a [MsgWithdrawDelegatorReward](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#L42-L50). `delegator_address` is automatically filled with the current contract's address.", "type": "object", "required": [ "withdraw_delegator_reward"