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

API

object_table

Module0x0000…0002
Move path
0x0000…0002::object_table
Functions
1010 public, 0 entry
Structs
1
Friend modules
None
object_table

Bytecode141 lines

The on-chain disassembly. Offsets are instruction numbers within each function.

// Move bytecode v7
module 2.object_table {
use 0000000000000000000000000000000000000000000000000000000000000001::option;
use 0000000000000000000000000000000000000000000000000000000000000002::dynamic_object_field;
use 0000000000000000000000000000000000000000000000000000000000000002::object;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
 
struct ObjectTable<phantom Ty0: copy + drop + store, phantom Ty1: store + key> has store, key {
id: UID,
size: u64
}
 
public new<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &mut TxContext): ObjectTable<Ty0, Ty1> {
B0:
0MoveLoc[0](Arg0: &mut TxContext)
1Call object::new(&mut TxContext): UID
2LdU64(0)
3PackGeneric[0](ObjectTable<Ty0, Ty1>)
4Ret
}
 
public add<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &mut ObjectTable<Ty0, Ty1>, Arg1: Ty0, Arg2: Ty1) {
B0:
0CopyLoc[0](Arg0: &mut ObjectTable<Ty0, Ty1>)
1MutBorrowFieldGeneric[0](ObjectTable.id: UID)
2MoveLoc[1](Arg1: Ty0)
3MoveLoc[2](Arg2: Ty1)
4Call dynamic_object_field::add<Ty0, Ty1>(&mut UID, Ty0, Ty1)
5CopyLoc[0](Arg0: &mut ObjectTable<Ty0, Ty1>)
6ImmBorrowFieldGeneric[1](ObjectTable.size: u64)
7ReadRef
8LdU64(1)
9Add
10MoveLoc[0](Arg0: &mut ObjectTable<Ty0, Ty1>)
11MutBorrowFieldGeneric[1](ObjectTable.size: u64)
12WriteRef
13Ret
}
 
public borrow<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &ObjectTable<Ty0, Ty1>, Arg1: Ty0): &Ty1 {
B0:
0MoveLoc[0](Arg0: &ObjectTable<Ty0, Ty1>)
1ImmBorrowFieldGeneric[0](ObjectTable.id: UID)
2MoveLoc[1](Arg1: Ty0)
3Call dynamic_object_field::borrow<Ty0, Ty1>(&UID, Ty0): &Ty1
4Ret
}
 
public borrow_mut<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &mut ObjectTable<Ty0, Ty1>, Arg1: Ty0): &mut Ty1 {
B0:
0MoveLoc[0](Arg0: &mut ObjectTable<Ty0, Ty1>)
1MutBorrowFieldGeneric[0](ObjectTable.id: UID)
2MoveLoc[1](Arg1: Ty0)
3Call dynamic_object_field::borrow_mut<Ty0, Ty1>(&mut UID, Ty0): &mut Ty1
4Ret
}
 
public remove<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &mut ObjectTable<Ty0, Ty1>, Arg1: Ty0): Ty1 {
L2: loc0: Ty1
B0:
0CopyLoc[0](Arg0: &mut ObjectTable<Ty0, Ty1>)
1MutBorrowFieldGeneric[0](ObjectTable.id: UID)
2MoveLoc[1](Arg1: Ty0)
3Call dynamic_object_field::remove<Ty0, Ty1>(&mut UID, Ty0): Ty1
4StLoc[2](loc0: Ty1)
5CopyLoc[0](Arg0: &mut ObjectTable<Ty0, Ty1>)
6ImmBorrowFieldGeneric[1](ObjectTable.size: u64)
7ReadRef
8LdU64(1)
9Sub
10MoveLoc[0](Arg0: &mut ObjectTable<Ty0, Ty1>)
11MutBorrowFieldGeneric[1](ObjectTable.size: u64)
12WriteRef
13MoveLoc[2](loc0: Ty1)
14Ret
}
 
public contains<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &ObjectTable<Ty0, Ty1>, Arg1: Ty0): bool {
B0:
0MoveLoc[0](Arg0: &ObjectTable<Ty0, Ty1>)
1ImmBorrowFieldGeneric[0](ObjectTable.id: UID)
2MoveLoc[1](Arg1: Ty0)
3Call dynamic_object_field::exists<Ty0>(&UID, Ty0): bool
4Ret
}
 
public length<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &ObjectTable<Ty0, Ty1>): u64 {
B0:
0MoveLoc[0](Arg0: &ObjectTable<Ty0, Ty1>)
1ImmBorrowFieldGeneric[1](ObjectTable.size: u64)
2ReadRef
3Ret
}
 
public is_empty<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &ObjectTable<Ty0, Ty1>): bool {
B0:
0MoveLoc[0](Arg0: &ObjectTable<Ty0, Ty1>)
1ImmBorrowFieldGeneric[1](ObjectTable.size: u64)
2ReadRef
3LdU64(0)
4Eq
5Ret
}
 
public destroy_empty<Ty0: copy + drop + store, Ty1: store + key>(Arg0: ObjectTable<Ty0, Ty1>) {
L1: loc0: UID
L2: loc1: u64
B0:
0MoveLoc[0](Arg0: ObjectTable<Ty0, Ty1>)
1UnpackGeneric[0](ObjectTable<Ty0, Ty1>)
2StLoc[2](loc1: u64)
3StLoc[1](loc0: UID)
4MoveLoc[2](loc1: u64)
5LdU64(0)
6Eq
7BrFalse(9)
B1:
8Branch(11)
B2:
9LdConst[0](u64: 0)
10Abort
B3:
11MoveLoc[1](loc0: UID)
12Call object::delete(UID)
13Ret
}
 
public value_id<Ty0: copy + drop + store, Ty1: store + key>(Arg0: &ObjectTable<Ty0, Ty1>, Arg1: Ty0): Option<ID> {
B0:
0MoveLoc[0](Arg0: &ObjectTable<Ty0, Ty1>)
1ImmBorrowFieldGeneric[0](ObjectTable.id: UID)
2MoveLoc[1](Arg1: Ty0)
3Call dynamic_object_field::id<Ty0>(&UID, Ty0): Option<ID>
4Ret
}
 
Constants [
0 => u64: 0
]
}