diff --git a/CHANGELOG.md b/CHANGELOG.md index 3003444997..2e5806c956 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - [E2E] Update `subxt` and `polkadot-sdk` dependencies ‒ [#2174](https://github.com/use-ink/ink/pull/2174) - Update repository URLs & references from `paritytech` GitHub organization to new `use-ink` one ‒ [#2220](https://github.com/use-ink/ink/pull/2220) and [#2248](https://github.com/use-ink/ink/pull/2248) +- Fix XCM-support to single encode the XCM message [#2278](https://github.com/use-ink/ink/pull/2278) ### Fixed - Fix outdated docs for `[ink_e2e::test]` ‒ [#2162](https://github.com/use-ink/ink/pull/2162) diff --git a/crates/env/src/engine/on_chain/impls.rs b/crates/env/src/engine/on_chain/impls.rs index aaf35f50e1..bf3fea473f 100644 --- a/crates/env/src/engine/on_chain/impls.rs +++ b/crates/env/src/engine/on_chain/impls.rs @@ -735,8 +735,8 @@ impl TypedEnvBackend for EnvInstance { { let mut scope = self.scoped_buffer(); - // Double encoding the message as the host fn expects an encoded message. - let enc_msg = scope.take_encoded(&scale::Encode::encode(msg)); + let enc_msg = scope.take_encoded(msg); + #[allow(deprecated)] ext::xcm_execute(enc_msg).map_err(Into::into) } @@ -755,8 +755,7 @@ impl TypedEnvBackend for EnvInstance { scope.append_encoded(dest); let enc_dest = scope.take_appended(); - // Double encoding the message as the host fn expects an encoded message. - scope.append_encoded(&scale::Encode::encode(msg)); + scope.append_encoded(msg); let enc_msg = scope.take_appended(); #[allow(deprecated)] ext::xcm_send(enc_dest, enc_msg, output.try_into().unwrap())?;