Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

API

wit_table

Module0x45ba…fc70
Move path
0xfe1d…80bf::wit_table
Functions
110 public, 0 entry
Structs
1
wit_table

Bytecode191 lines

The on-chain disassembly. Offsets are bytecode positions within each function.

// Move bytecode v6
module fe1d8929d13b00aaecd7642dec1c6d41cab82882a1b139efa46bf61dfd6380bf.wit_table {
use 0000000000000000000000000000000000000000000000000000000000000001::option;
use 0000000000000000000000000000000000000000000000000000000000000002::object;
use 0000000000000000000000000000000000000000000000000000000000000002::table;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
use 0000000000000000000000000000000000000000000000000000000000000002::vec_set;
 
struct WitTable<phantom Ty0: drop, Ty1: copy + drop + store, phantom Ty2: store> has store, key {
id: UID,
table: Table<Ty1, Ty2>,
keys: Option<VecSet<Ty1>>,
with_keys: bool
}
 
public(friend) new<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: Ty0, Arg1: bool, Arg2: &mut TxContext): WitTable<Ty0, Ty1, Ty2> {
L3: loc0: Option<VecSet<Ty1>>
L4: loc1: Option<VecSet<Ty1>>
B0:
0CopyLoc[1](Arg1: bool)
1BrFalse(6)
B1:
2Call vec_set::empty<Ty1>(): VecSet<Ty1>
3Call option::some<VecSet<Ty1>>(VecSet<Ty1>): Option<VecSet<Ty1>>
4StLoc[3](loc0: Option<VecSet<Ty1>>)
5Branch(8)
B2:
6Call option::none<VecSet<Ty1>>(): Option<VecSet<Ty1>>
7StLoc[3](loc0: Option<VecSet<Ty1>>)
B3:
8MoveLoc[3](loc0: Option<VecSet<Ty1>>)
9StLoc[4](loc1: Option<VecSet<Ty1>>)
10CopyLoc[2](Arg2: &mut TxContext)
11Call object::new(&mut TxContext): UID
12MoveLoc[2](Arg2: &mut TxContext)
13Call table::new<Ty1, Ty2>(&mut TxContext): Table<Ty1, Ty2>
14MoveLoc[4](loc1: Option<VecSet<Ty1>>)
15MoveLoc[1](Arg1: bool)
16PackGeneric[0](WitTable<Ty0, Ty1, Ty2>)
17Ret
}
 
public(friend) add<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: Ty0, Arg1: &mut WitTable<Ty0, Ty1, Ty2>, Arg2: Ty1, Arg3: Ty2) {
B0:
0CopyLoc[1](Arg1: &mut WitTable<Ty0, Ty1, Ty2>)
1MutBorrowFieldGeneric[0](WitTable.table: Table<Ty1, Ty2>)
2CopyLoc[2](Arg2: Ty1)
3MoveLoc[3](Arg3: Ty2)
4Call table::add<Ty1, Ty2>(&mut Table<Ty1, Ty2>, Ty1, Ty2)
5CopyLoc[1](Arg1: &mut WitTable<Ty0, Ty1, Ty2>)
6ImmBorrowFieldGeneric[1](WitTable.with_keys: bool)
7ReadRef
8BrFalse(15)
B1:
9MoveLoc[1](Arg1: &mut WitTable<Ty0, Ty1, Ty2>)
10MutBorrowFieldGeneric[2](WitTable.keys: Option<VecSet<Ty1>>)
11Call option::borrow_mut<VecSet<Ty1>>(&mut Option<VecSet<Ty1>>): &mut VecSet<Ty1>
12MoveLoc[2](Arg2: Ty1)
13Call vec_set::insert<Ty1>(&mut VecSet<Ty1>, Ty1)
14Branch(17)
B2:
15MoveLoc[1](Arg1: &mut WitTable<Ty0, Ty1, Ty2>)
16Pop
B3:
17Ret
}
 
public(friend) keys<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: &WitTable<Ty0, Ty1, Ty2>): vector<Ty1> {
L1: loc0: vector<Ty1>
B0:
0CopyLoc[0](Arg0: &WitTable<Ty0, Ty1, Ty2>)
1ImmBorrowFieldGeneric[1](WitTable.with_keys: bool)
2ReadRef
3BrFalse(11)
B1:
4MoveLoc[0](Arg0: &WitTable<Ty0, Ty1, Ty2>)
5ImmBorrowFieldGeneric[2](WitTable.keys: Option<VecSet<Ty1>>)
6Call option::borrow<VecSet<Ty1>>(&Option<VecSet<Ty1>>): &VecSet<Ty1>
7ReadRef
8Call vec_set::into_keys<Ty1>(VecSet<Ty1>): vector<Ty1>
9StLoc[1](loc0: vector<Ty1>)
10Branch(15)
B2:
11MoveLoc[0](Arg0: &WitTable<Ty0, Ty1, Ty2>)
12Pop
13VecPack(15, 0)
14StLoc[1](loc0: vector<Ty1>)
B3:
15MoveLoc[1](loc0: vector<Ty1>)
16Ret
}
 
public(friend) borrow<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: &WitTable<Ty0, Ty1, Ty2>, Arg1: Ty1): &Ty2 {
B0:
0MoveLoc[0](Arg0: &WitTable<Ty0, Ty1, Ty2>)
1ImmBorrowFieldGeneric[0](WitTable.table: Table<Ty1, Ty2>)
2MoveLoc[1](Arg1: Ty1)
3Call table::borrow<Ty1, Ty2>(&Table<Ty1, Ty2>, Ty1): &Ty2
4Ret
}
 
public(friend) borrow_mut<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: Ty0, Arg1: &mut WitTable<Ty0, Ty1, Ty2>, Arg2: Ty1): &mut Ty2 {
B0:
0MoveLoc[1](Arg1: &mut WitTable<Ty0, Ty1, Ty2>)
1MutBorrowFieldGeneric[0](WitTable.table: Table<Ty1, Ty2>)
2MoveLoc[2](Arg2: Ty1)
3Call table::borrow_mut<Ty1, Ty2>(&mut Table<Ty1, Ty2>, Ty1): &mut Ty2
4Ret
}
 
public(friend) remove<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: Ty0, Arg1: &mut WitTable<Ty0, Ty1, Ty2>, Arg2: Ty1): Ty2 {
B0:
0CopyLoc[1](Arg1: &mut WitTable<Ty0, Ty1, Ty2>)
1ImmBorrowFieldGeneric[1](WitTable.with_keys: bool)
2ReadRef
3BrFalse(9)
B1:
4CopyLoc[1](Arg1: &mut WitTable<Ty0, Ty1, Ty2>)
5MutBorrowFieldGeneric[2](WitTable.keys: Option<VecSet<Ty1>>)
6Call option::borrow_mut<VecSet<Ty1>>(&mut Option<VecSet<Ty1>>): &mut VecSet<Ty1>
7ImmBorrowLoc[2](Arg2: Ty1)
8Call vec_set::remove<Ty1>(&mut VecSet<Ty1>, &Ty1)
B2:
9MoveLoc[1](Arg1: &mut WitTable<Ty0, Ty1, Ty2>)
10MutBorrowFieldGeneric[0](WitTable.table: Table<Ty1, Ty2>)
11MoveLoc[2](Arg2: Ty1)
12Call table::remove<Ty1, Ty2>(&mut Table<Ty1, Ty2>, Ty1): Ty2
13Ret
}
 
public(friend) contains<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: &WitTable<Ty0, Ty1, Ty2>, Arg1: Ty1): bool {
B0:
0MoveLoc[0](Arg0: &WitTable<Ty0, Ty1, Ty2>)
1ImmBorrowFieldGeneric[0](WitTable.table: Table<Ty1, Ty2>)
2MoveLoc[1](Arg1: Ty1)
3Call table::contains<Ty1, Ty2>(&Table<Ty1, Ty2>, Ty1): bool
4Ret
}
 
public(friend) length<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: &WitTable<Ty0, Ty1, Ty2>): u64 {
B0:
0MoveLoc[0](Arg0: &WitTable<Ty0, Ty1, Ty2>)
1ImmBorrowFieldGeneric[0](WitTable.table: Table<Ty1, Ty2>)
2Call table::length<Ty1, Ty2>(&Table<Ty1, Ty2>): u64
3Ret
}
 
public(friend) is_empty<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: &WitTable<Ty0, Ty1, Ty2>): bool {
B0:
0MoveLoc[0](Arg0: &WitTable<Ty0, Ty1, Ty2>)
1ImmBorrowFieldGeneric[0](WitTable.table: Table<Ty1, Ty2>)
2Call table::is_empty<Ty1, Ty2>(&Table<Ty1, Ty2>): bool
3Ret
}
 
public(friend) destroy_empty<Ty0: drop, Ty1: copy + drop + store, Ty2: store>(Arg0: Ty0, Arg1: WitTable<Ty0, Ty1, Ty2>) {
L2: loc0: UID
L3: loc1: Table<Ty1, Ty2>
B0:
0MoveLoc[1](Arg1: WitTable<Ty0, Ty1, Ty2>)
1UnpackGeneric[0](WitTable<Ty0, Ty1, Ty2>)
2Pop
3Pop
4StLoc[3](loc1: Table<Ty1, Ty2>)
5StLoc[2](loc0: UID)
6MoveLoc[3](loc1: Table<Ty1, Ty2>)
7Call table::destroy_empty<Ty1, Ty2>(Table<Ty1, Ty2>)
8MoveLoc[2](loc0: UID)
9Call object::delete(UID)
10Ret
}
 
public(friend) drop<Ty0: drop, Ty1: copy + drop + store, Ty2: drop + store>(Arg0: Ty0, Arg1: WitTable<Ty0, Ty1, Ty2>) {
L2: loc0: UID
L3: loc1: Table<Ty1, Ty2>
B0:
0MoveLoc[1](Arg1: WitTable<Ty0, Ty1, Ty2>)
1UnpackGeneric[0](WitTable<Ty0, Ty1, Ty2>)
2Pop
3Pop
4StLoc[3](loc1: Table<Ty1, Ty2>)
5StLoc[2](loc0: UID)
6MoveLoc[3](loc1: Table<Ty1, Ty2>)
7Call table::drop<Ty1, Ty2>(Table<Ty1, Ty2>)
8MoveLoc[2](loc0: UID)
9Call object::delete(UID)
10Ret
}
 
}