Module iota::system_admin_cap
A system admin capability implementation.
use iota::tx_context;
Struct IotaSystemAdminCap
IotaSystemAdminCap allows to perform privileged IOTA system operations.
For example, packing and unpacking TimeLocks during staking, etc.
public struct IotaSystemAdminCap has store
Fields
Constants
The new function was called at a non-genesis epoch.
const ENotCalledAtGenesis: u64 = 0;
Sender is not @0x0 the system address.
const ENotSystemAddress: u64 = 1;
Function new_system_admin_cap
Create a IotaSystemAdminCap.
This should be called only once during genesis creation.
fun new_system_admin_cap(ctx: &iota::tx_context::TxContext): iota::system_admin_cap::IotaSystemAdminCap
Implementation
fun new_system_admin_cap(ctx: &TxContext): IotaSystemAdminCap {
assert!(ctx.sender() == @0x0, ENotSystemAddress);
assert!(ctx.epoch() == 0, ENotCalledAtGenesis);
IotaSystemAdminCap {}
}