From 173b246f79fc3b6859b3e2f618c8faeb47f37fd8 Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Wed, 24 Nov 2021 15:45:51 +0100 Subject: [PATCH] Stabilize `seal_call` --- RELEASES.md | 4 +--- crates/env/src/engine/on_chain/ext.rs | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 5a712a603e7..769fbc39ce1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -13,13 +13,11 @@ This is the 7th release candidate for ink! 3.0. - Annotating a wildcard selector in traits is not supported. ## Changed -- Upgraded to the unstable `seal_call` API ‒ [#960](https://github.com/paritytech/ink/pull/960). +- Upgraded to the `seal_call` v1 API ‒ [#960](https://github.com/paritytech/ink/pull/960). - This API now enables control over the behavior of cross-contract calls, e.g. to forward/clone input, enable tail calls and control reentrancy. The crate documentation contains more details on the [`CallFlags`](https://paritytech.github.io/ink/ink_env/struct.CallFlags.html). - **Note:** The default behavior of cross-contract calls now disallows reentering the calling contract. - - **Note:** In order to support this you currently have to enable the `unstable-interface` of - the `contracts` pallet, [like here](https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/Cargo.toml#L104-L108). - ink! contract definitions via `#[ink::contract]`: - ink! smart contracts now generate two contract types. Given `MyContract`: - `MyContract` will still be the storage struct. diff --git a/crates/env/src/engine/on_chain/ext.rs b/crates/env/src/engine/on_chain/ext.rs index badbb39be82..eff097b5f8f 100644 --- a/crates/env/src/engine/on_chain/ext.rs +++ b/crates/env/src/engine/on_chain/ext.rs @@ -334,10 +334,7 @@ mod sys { output_ptr: Ptr32Mut<[u8]>, output_len_ptr: Ptr32Mut, ); - } - #[link(wasm_import_module = "__unstable__")] - extern "C" { pub fn seal_call( flags: u32, callee_ptr: Ptr32<[u8]>, @@ -348,7 +345,10 @@ mod sys { output_ptr: Ptr32Mut<[u8]>, output_len_ptr: Ptr32Mut, ) -> ReturnCode; + } + #[link(wasm_import_module = "__unstable__")] + extern "C" { pub fn seal_rent_params( output_ptr: Ptr32Mut<[u8]>, output_len_ptr: Ptr32Mut,