Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contracts: Stabilize caller_is_root API #3154

Merged
merged 3 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions prdoc/pr_3154.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: "Contracts: Stabilize caller_is_root API"

doc:
- audience: Runtime Dev
description: |
Removed the `#[unstable]` attrribute on `caller_is_root` host function.

crates:
- name: pallet-contracts
1 change: 0 additions & 1 deletion substrate/frame/contracts/src/wasm/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32, TrapReason> {
ctx.charge_gas(RuntimeCosts::CallerIsRoot)?;
Ok(ctx.ext.caller_is_root() as u32)
Expand Down
3 changes: 0 additions & 3 deletions substrate/frame/contracts/uapi/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading