mint_cap
Module0x34a2…c82c
- Move path
- 0xbc3d…e5f9::mint_cap
- Functions
- 1515 public, 0 entry
- Structs
- 2
- Friend modules
- None
mint_cap
- access_policy19
- attributes18
- collection19
- composable_nft28
- composable_svg27
- composable_url10
- creators16
- display_info14
- frozen_pub1
- mint_cap15
- mint_event3
- mint_pass12
- mint_supply19
- nft18
- nft_bag28
- nft_protocol5
- p2p_list8
- p2p_list_domain13
- plugins14
- royalty29
- royalty_strategy_bps23
- session_token8
- supply27
- svg13
- symbol10
- tags11
- transfer_allowlist6
- transfer_allowlist_domain13
- transfer_token5
- url7
Bytecode303 lines
The on-chain disassembly. Offsets are bytecode positions within each function.
// Move bytecode v6
module bc3df36be17f27ac98e3c839b2589db8475fa07b20657b08e8891e3aaf5ee5f9.mint_cap {
use 16c5f17f2d55584a6e6daa442ccf83b4530d10546a8e7dedda9ba324e012fc40::frozen_publisher;
use 16c5f17f2d55584a6e6daa442ccf83b4530d10546a8e7dedda9ba324e012fc40::witness;
use 859eb18bd5b5e8cc32deb6dfb1c39941008ab3c6e27f0b8ce2364be7102bb7cb::utils;
use 859eb18bd5b5e8cc32deb6dfb1c39941008ab3c6e27f0b8ce2364be7102bb7cb::utils_supply;
use 0000000000000000000000000000000000000000000000000000000000000001::option;
use 0000000000000000000000000000000000000000000000000000000000000001::string;
use 0000000000000000000000000000000000000000000000000000000000000002::display;
use 0000000000000000000000000000000000000000000000000000000000000002::object;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
use 0000000000000000000000000000000000000000000000000000000000000002::types;
struct Witness has drop {
dummy_field: bool
}
struct MintCap<phantom Ty0> has store, key {
id: UID,
collection_id: ID,
supply: Option<Supply>
}
public new<Ty0: drop, Ty1>(Arg0: &Ty0, Arg1: ID, Arg2: Option<u64>, Arg3: &mut TxContext): MintCap<Ty1> {
L4: loc0: MintCap<Ty1>
B0:
0ImmBorrowLoc[2](Arg2: Option<u64>)
1Call option::is_some<u64>(&Option<u64>): bool
2BrFalse(11)
B1:
3MoveLoc[0](Arg0: &Ty0)
4MoveLoc[1](Arg1: ID)
5MoveLoc[2](Arg2: Option<u64>)
6Call option::destroy_some<u64>(Option<u64>): u64
7MoveLoc[3](Arg3: &mut TxContext)
8Call new_limited<Ty0, Ty1>(&Ty0, ID, u64, &mut TxContext): MintCap<Ty1>
9StLoc[4](loc0: MintCap<Ty1>)
10Branch(16)
B2:
11MoveLoc[0](Arg0: &Ty0)
12MoveLoc[1](Arg1: ID)
13MoveLoc[3](Arg3: &mut TxContext)
14Call new_unlimited<Ty0, Ty1>(&Ty0, ID, &mut TxContext): MintCap<Ty1>
15StLoc[4](loc0: MintCap<Ty1>)
B3:
16MoveLoc[4](loc0: MintCap<Ty1>)
17Ret
}
public new_unlimited<Ty0: drop, Ty1>(Arg0: &Ty0, Arg1: ID, Arg2: &mut TxContext): MintCap<Ty1> {
B0:
0Call utils::assert_same_module<Ty0, Ty1>()
1MoveLoc[0](Arg0: &Ty0)
2Call types::is_one_time_witness<Ty0>(&Ty0): bool
3BrFalse(5)
B1:
4Branch(9)
B2:
5MoveLoc[2](Arg2: &mut TxContext)
6Pop
7LdConst[2](u64: 3)
8Abort
B3:
9MoveLoc[2](Arg2: &mut TxContext)
10Call object::new(&mut TxContext): UID
11MoveLoc[1](Arg1: ID)
12Call option::none<Supply>(): Option<Supply>
13PackGeneric[0](MintCap<Ty1>)
14Ret
}
public new_limited<Ty0: drop, Ty1>(Arg0: &Ty0, Arg1: ID, Arg2: u64, Arg3: &mut TxContext): MintCap<Ty1> {
B0:
0Call utils::assert_same_module<Ty0, Ty1>()
1MoveLoc[0](Arg0: &Ty0)
2Call types::is_one_time_witness<Ty0>(&Ty0): bool
3BrFalse(5)
B1:
4Branch(9)
B2:
5MoveLoc[3](Arg3: &mut TxContext)
6Pop
7LdConst[2](u64: 3)
8Abort
B3:
9MoveLoc[3](Arg3: &mut TxContext)
10Call object::new(&mut TxContext): UID
11MoveLoc[1](Arg1: ID)
12MoveLoc[2](Arg2: u64)
13Call utils_supply::new(u64): Supply
14Call option::some<Supply>(Supply): Option<Supply>
15PackGeneric[0](MintCap<Ty1>)
16Ret
}
public collection_id<Ty0>(Arg0: &MintCap<Ty0>): ID {
B0:
0MoveLoc[0](Arg0: &MintCap<Ty0>)
1ImmBorrowFieldGeneric[0](MintCap.collection_id: ID)
2ReadRef
3Ret
}
public supply<Ty0>(Arg0: &MintCap<Ty0>): u64 {
B0:
0CopyLoc[0](Arg0: &MintCap<Ty0>)
1Call assert_limited<Ty0>(&MintCap<Ty0>)
2MoveLoc[0](Arg0: &MintCap<Ty0>)
3ImmBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
4Call option::borrow<Supply>(&Option<Supply>): &Supply
5Call utils_supply::get_current(&Supply): u64
6Ret
}
public get_supply<Ty0>(Arg0: &MintCap<Ty0>): &Supply {
B0:
0CopyLoc[0](Arg0: &MintCap<Ty0>)
1Call assert_limited<Ty0>(&MintCap<Ty0>)
2MoveLoc[0](Arg0: &MintCap<Ty0>)
3ImmBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
4Call option::borrow<Supply>(&Option<Supply>): &Supply
5Ret
}
public has_supply<Ty0>(Arg0: &MintCap<Ty0>): bool {
B0:
0MoveLoc[0](Arg0: &MintCap<Ty0>)
1ImmBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
2Call option::is_some<Supply>(&Option<Supply>): bool
3Ret
}
public borrow_supply<Ty0>(Arg0: &MintCap<Ty0>): &Option<Supply> {
B0:
0MoveLoc[0](Arg0: &MintCap<Ty0>)
1ImmBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
2Ret
}
public increment_supply<Ty0>(Arg0: &mut MintCap<Ty0>, Arg1: u64) {
B0:
0CopyLoc[0](Arg0: &mut MintCap<Ty0>)
1ImmBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
2Call option::is_some<Supply>(&Option<Supply>): bool
3BrFalse(10)
B1:
4MoveLoc[0](Arg0: &mut MintCap<Ty0>)
5MutBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
6Call option::borrow_mut<Supply>(&mut Option<Supply>): &mut Supply
7MoveLoc[1](Arg1: u64)
8Call utils_supply::increment(&mut Supply, u64)
9Branch(12)
B2:
10MoveLoc[0](Arg0: &mut MintCap<Ty0>)
11Pop
B3:
12Ret
}
public split<Ty0>(Arg0: &mut MintCap<Ty0>, Arg1: u64, Arg2: &mut TxContext): MintCap<Ty0> {
L3: loc0: Supply
L4: loc1: Supply
B0:
0CopyLoc[0](Arg0: &mut MintCap<Ty0>)
1FreezeRef
2Call has_supply<Ty0>(&MintCap<Ty0>): bool
3BrFalse(11)
B1:
4CopyLoc[0](Arg0: &mut MintCap<Ty0>)
5MutBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
6Call option::borrow_mut<Supply>(&mut Option<Supply>): &mut Supply
7MoveLoc[1](Arg1: u64)
8Call utils_supply::split(&mut Supply, u64): Supply
9StLoc[3](loc0: Supply)
10Branch(14)
B2:
11MoveLoc[1](Arg1: u64)
12Call utils_supply::new(u64): Supply
13StLoc[3](loc0: Supply)
B3:
14MoveLoc[3](loc0: Supply)
15StLoc[4](loc1: Supply)
16MoveLoc[2](Arg2: &mut TxContext)
17Call object::new(&mut TxContext): UID
18MoveLoc[0](Arg0: &mut MintCap<Ty0>)
19ImmBorrowFieldGeneric[0](MintCap.collection_id: ID)
20ReadRef
21MoveLoc[4](loc1: Supply)
22Call option::some<Supply>(Supply): Option<Supply>
23PackGeneric[1](MintCap<Ty0>)
24Ret
}
public merge<Ty0>(Arg0: &mut MintCap<Ty0>, Arg1: MintCap<Ty0>) {
L2: loc0: bool
L3: loc1: UID
L4: loc2: Option<Supply>
B0:
0MoveLoc[1](Arg1: MintCap<Ty0>)
1UnpackGeneric[1](MintCap<Ty0>)
2StLoc[4](loc2: Option<Supply>)
3Pop
4StLoc[3](loc1: UID)
5ImmBorrowLoc[4](loc2: Option<Supply>)
6Call option::is_some<Supply>(&Option<Supply>): bool
7BrFalse(13)
B1:
8CopyLoc[0](Arg0: &mut MintCap<Ty0>)
9ImmBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
10Call option::is_some<Supply>(&Option<Supply>): bool
11StLoc[2](loc0: bool)
12Branch(15)
B2:
13LdFalse
14StLoc[2](loc0: bool)
B3:
15MoveLoc[2](loc0: bool)
16BrFalse(24)
B4:
17MoveLoc[0](Arg0: &mut MintCap<Ty0>)
18MutBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
19Call option::borrow_mut<Supply>(&mut Option<Supply>): &mut Supply
20MoveLoc[4](loc2: Option<Supply>)
21Call option::destroy_some<Supply>(Option<Supply>): Supply
22Call utils_supply::merge(&mut Supply, Supply)
23Branch(26)
B5:
24MoveLoc[0](Arg0: &mut MintCap<Ty0>)
25Pop
B6:
26MoveLoc[3](loc1: UID)
27Call object::delete(UID)
28Ret
}
public delete_mint_cap<Ty0>(Arg0: MintCap<Ty0>) {
B0:
0MoveLoc[0](Arg0: MintCap<Ty0>)
1UnpackGeneric[1](MintCap<Ty0>)
2Pop
3Pop
4Call object::delete(UID)
5Ret
}
public assert_limited<Ty0>(Arg0: &MintCap<Ty0>) {
B0:
0MoveLoc[0](Arg0: &MintCap<Ty0>)
1ImmBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
2Call option::is_some<Supply>(&Option<Supply>): bool
3BrFalse(5)
B1:
4Branch(7)
B2:
5LdConst[0](u64: 1)
6Abort
B3:
7Ret
}
public assert_unlimited<Ty0>(Arg0: &MintCap<Ty0>) {
B0:
0MoveLoc[0](Arg0: &MintCap<Ty0>)
1ImmBorrowFieldGeneric[1](MintCap.supply: Option<Supply>)
2Call option::is_none<Supply>(&Option<Supply>): bool
3BrFalse(5)
B1:
4Branch(7)
B2:
5LdConst[1](u64: 2)
6Abort
B3:
7Ret
}
public new_display<Ty0: store + key>(Arg0: Witness<Ty0>, Arg1: &FrozenPublisher, Arg2: &mut TxContext): Display<MintCap<Ty0>> {
L3: loc0: Display<MintCap<Ty0>>
B0:
0LdFalse
1Pack[0](Witness)
2MoveLoc[1](Arg1: &FrozenPublisher)
3MoveLoc[2](Arg2: &mut TxContext)
4Call frozen_publisher::new_display<Witness, MintCap<Ty0>>(Witness, &FrozenPublisher, &mut TxContext): Display<MintCap<Ty0>>
5StLoc[3](loc0: Display<MintCap<Ty0>>)
6MutBorrowLoc[3](loc0: Display<MintCap<Ty0>>)
7LdConst[3](vector<u8>: "typ..)
8Call string::utf8(vector<u8>): String
9LdConst[4](vector<u8>: "Min..)
10Call string::utf8(vector<u8>): String
11Call display::add<MintCap<Ty0>>(&mut Display<MintCap<Ty0>>, String, String)
12MoveLoc[3](loc0: Display<MintCap<Ty0>>)
13Ret
}
Constants [
0 => u64: 1
1 => u64: 2
2 => u64: 3
3 => vector<u8>: "type" // interpreted as UTF8 string
4 => vector<u8>: "MintCap" // interpreted as UTF8 string
]
}