Skip to main content

Module 0x2::system_admin_cap

A system admin capability implementation.

use 0x2::tx_context;

Struct IotaSystemAdminCap

IotaSystemAdminCap allows to perform privileged IOTA system operations. For example, packing and unpacking TimeLocks during staking, etc.

struct IotaSystemAdminCap has store

Fields
dummy_field: bool

Constants

Sender is not @0x0 the system address.

const ENotSystemAddress: u64 = 1;

The new function was called at a non-genesis epoch.

const ENotCalledAtGenesis: u64 = 0;

Function new_system_admin_cap

Create a IotaSystemAdminCap. This should be called only once during genesis creation.

fun new_system_admin_cap(ctx: &tx_context::TxContext): system_admin_cap::IotaSystemAdminCap

Implementation

fun new_system_admin_cap(ctx: &TxContext): IotaSystemAdminCap { assert!(ctx.sender() == @0x0, ENotSystemAddress); assert!(ctx.epoch() == 0, ENotCalledAtGenesis);

IotaSystemAdminCap {} }