From 2981d9f2e4173822180f3455668c30cdac81a377 Mon Sep 17 00:00:00 2001 From: Cyrill Leutwiler Date: Sat, 3 Feb 2024 12:50:55 +0100 Subject: [PATCH] Contracts: Stabilize `caller_is_root` API (#3154) Can this API be marked stable? Implemented in [solang here](https://github.com/hyperledger/solang/pull/1620) --------- Signed-off-by: Cyrill Leutwiler --- substrate/frame/contracts/src/wasm/runtime.rs | 1 - substrate/frame/contracts/uapi/src/host.rs | 3 --- 2 files changed, 4 deletions(-) diff --git a/substrate/frame/contracts/src/wasm/runtime.rs b/substrate/frame/contracts/src/wasm/runtime.rs index 3e49b68f86b6c..3af0d04a3ad13 100644 --- a/substrate/frame/contracts/src/wasm/runtime.rs +++ b/substrate/frame/contracts/src/wasm/runtime.rs @@ -1542,7 +1542,6 @@ pub mod env { /// Checks whether the caller of the current contract is root. /// See [`pallet_contracts_uapi::HostFn::caller_is_root`]. - #[unstable] fn caller_is_root(ctx: _, _memory: _) -> Result { ctx.charge_gas(RuntimeCosts::CallerIsRoot)?; Ok(ctx.ext.caller_is_root() as u32) diff --git a/substrate/frame/contracts/uapi/src/host.rs b/substrate/frame/contracts/uapi/src/host.rs index 21350bc4eb3e4..c8b9ae8b2def9 100644 --- a/substrate/frame/contracts/uapi/src/host.rs +++ b/substrate/frame/contracts/uapi/src/host.rs @@ -277,9 +277,6 @@ pub trait HostFn { /// /// A return value of `true` indicates that this contract is being called by a root origin, /// and `false` indicates that the caller is a signed origin. - #[deprecated( - note = "Unstable function. Behaviour can change without further notice. Use only for testing." - )] fn caller_is_root() -> u32; /// Clear the value at the given key in the contract storage.