Skip to main content

Module iota::system_admin_cap

A system admin capability implementation.

use iota::tx_context; use std::option; use std::vector;

Module Functions​

prv 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 {} }

Structs​

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​

err ENotCalledAtGenesis​

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

const ENotCalledAtGenesis: u64 = 0;

err ENotSystemAddress​

Sender is not @0x0 the system address.

const ENotSystemAddress: u64 = 1;