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

API

derived_object

Module0x0000…0002
Move path
0x0000…0002::derived_object
Functions
33 public, 0 entry
Structs
3
Friend modules
None
derived_object

Bytecode90 lines

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

// Move bytecode v7
module 2.derived_object {
use 0000000000000000000000000000000000000000000000000000000000000002::dynamic_field;
use 0000000000000000000000000000000000000000000000000000000000000002::object;
 
struct Claimed has copy, drop, store {
pos0: ID
}
 
struct DerivedObjectKey<Ty0: copy + drop + store> has copy, drop, store {
pos0: Ty0
}
 
enum ClaimedStatus has store {
Reserved { }
}
 
public claim<Ty0: copy + drop + store>(Arg0: &mut UID, Arg1: Ty0): UID {
L2: loc0: address
L3: loc1: ID
B0:
0CopyLoc[0](Arg0: &mut UID)
1FreezeRef
2Call object::uid_to_inner(&UID): ID
3MoveLoc[1](Arg1: Ty0)
4Call derive_address<Ty0>(ID, Ty0): address
5StLoc[2](loc0: address)
6CopyLoc[2](loc0: address)
7Call object::id_from_address(address): ID
8StLoc[3](loc1: ID)
9CopyLoc[0](Arg0: &mut UID)
10FreezeRef
11CopyLoc[3](loc1: ID)
12Pack[0](Claimed)
13Call dynamic_field::exists<Claimed>(&UID, Claimed): bool
14Not
15BrFalse(17)
B1:
16Branch(21)
B2:
17MoveLoc[0](Arg0: &mut UID)
18Pop
19LdU64(13835058231375822849)
20Abort
B3:
21CopyLoc[0](Arg0: &mut UID)
22MoveLoc[3](loc1: ID)
23Pack[0](Claimed)
24PackVariant(VariantHandleIndex(0))
25Call dynamic_field::add<Claimed, ClaimedStatus>(&mut UID, Claimed, ClaimedStatus)
26MoveLoc[0](Arg0: &mut UID)
27FreezeRef
28Call object::uid_to_address(&UID): address
29MoveLoc[2](loc0: address)
30Call object::new_uid_from_hash(address, address): UID
31Ret
}
 
public exists<Ty0: copy + drop + store>(Arg0: &UID, Arg1: Ty0): bool {
L2: loc0: address
B0:
0CopyLoc[0](Arg0: &UID)
1Call object::uid_to_inner(&UID): ID
2MoveLoc[1](Arg1: Ty0)
3Call derive_address<Ty0>(ID, Ty0): address
4StLoc[2](loc0: address)
5MoveLoc[0](Arg0: &UID)
6MoveLoc[2](loc0: address)
7Call object::id_from_address(address): ID
8Pack[0](Claimed)
9Call dynamic_field::exists<Claimed>(&UID, Claimed): bool
10Ret
}
 
public derive_address<Ty0: copy + drop + store>(Arg0: ID, Arg1: Ty0): address {
B0:
0ImmBorrowLoc[0](Arg0: ID)
1Call object::id_to_address(&ID): address
2MoveLoc[1](Arg1: Ty0)
3PackGeneric[0](DerivedObjectKey<Ty0>)
4Call dynamic_field::hash_type_and_key<DerivedObjectKey<Ty0>>(address, DerivedObjectKey<Ty0>): address
5Ret
}
 
Constants [
0 => vector<u8>: "EObjectAlreadyExists" // interpreted as UTF8 string
1 => vector<u8>: "Derived object is already claimed." // interpreted as UTF8 string
]
}