mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 22:51:13 +00:00
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 <bigcyrill@hotmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user