Module 0xa5::creator_cap
use 0x2::object;
use 0x2::tx_context;
Resource CreatorCap
struct CreatorCap has store, key
Fields
-
id: object::UID
-
Function create
public(friend) fun create(ctx: &mut tx_context::TxContext): creator_cap::CreatorCap
Implementation
public(package) fun create(ctx: &mut TxContext): CreatorCap {
CreatorCap {
id: object::new(ctx),
}
}
Function destroy
public(friend) fun destroy(self: creator_cap::CreatorCap)
Implementation
public(package) fun destroy(self: CreatorCap) {
let CreatorCap { id } = self;
id.delete();
}