dynamic_field
Module0x0000…0002
- Move path
- 0x0000…0002::dynamic_field
- Functions
- 1910 public, 0 entry
- Structs
- 1
dynamic_field
- accumulator18
- accumulator_metadata2
- accumulator_settlement8
- address10
- address_alias5
- allowance40
- authenticator_state13
- bag10
- balance18
- bcs30
- bls1238143
- borrow4
- clock3
- coin54
- coin_registry43
- config11
- deny_list21
- derived_object3
- display14
- display_registry18
- dynamic_field19
- dynamic_object_field15
- ecdsa_k13
- ecdsa_r12
- ecvrf1
- ed255191
- event3
- forwarding_address1
- funds_accumulator12
- groth1610
- group_ops23
- hash2
- hex3
- hmac1
- kiosk41
- kiosk_extension14
- linked_table19
- math7
- nitro_attestation11
- object32
- object_bag11
- object_table10
- package26
- party5
- pay8
- poseidon2
- priority_queue8
- protocol_config1
- prover0
- random20
- rangeproofs3
- ristretto25518
- scratch18
- sui2
- table10
- table_vec12
- token45
- transfer16
- transfer_policy18
- tx_context19
- types1
- url4
- vdf4
- vec_map20
- vec_set11
- versioned7
- zklogin_verified_id9
- zklogin_verified_issuer6
Bytecode278 lines
The on-chain disassembly. Offsets are bytecode positions within each function.
// Move bytecode v7
module 2.dynamic_field {
use 0000000000000000000000000000000000000000000000000000000000000001::option;
use 0000000000000000000000000000000000000000000000000000000000000002::object;
struct Field<Ty0: copy + drop + store, Ty1: store> has key {
id: UID,
name: Ty0,
value: Ty1
}
public add<Ty0: copy + drop + store, Ty1: store>(Arg0: &mut UID, Arg1: Ty0, Arg2: Ty1) {
L3: loc0: Field<Ty0, Ty1>
L4: loc1: address
L5: loc2: address
B0:
0MoveLoc[0](Arg0: &mut UID)
1FreezeRef
2Call object::uid_to_address(&UID): address
3StLoc[5](loc2: address)
4CopyLoc[5](loc2: address)
5CopyLoc[1](Arg1: Ty0)
6Call hash_type_and_key<Ty0>(address, Ty0): address
7StLoc[4](loc1: address)
8CopyLoc[5](loc2: address)
9CopyLoc[4](loc1: address)
10Call has_child_object(address, address): bool
11Not
12BrFalse(14)
B1:
13Branch(16)
B2:
14LdConst[0](u64: 0)
15Abort
B3:
16CopyLoc[5](loc2: address)
17MoveLoc[4](loc1: address)
18Call object::new_uid_from_hash(address, address): UID
19MoveLoc[1](Arg1: Ty0)
20MoveLoc[2](Arg2: Ty1)
21PackGeneric[0](Field<Ty0, Ty1>)
22StLoc[3](loc0: Field<Ty0, Ty1>)
23MoveLoc[5](loc2: address)
24MoveLoc[3](loc0: Field<Ty0, Ty1>)
25Call add_child_object<Field<Ty0, Ty1>>(address, Field<Ty0, Ty1>)
26Ret
}
public borrow<Ty0: copy + drop + store, Ty1: store>(Arg0: &UID, Arg1: Ty0): &Ty1 {
L2: loc0: address
B0:
0CopyLoc[0](Arg0: &UID)
1Call object::uid_to_address(&UID): address
2MoveLoc[1](Arg1: Ty0)
3Call hash_type_and_key<Ty0>(address, Ty0): address
4StLoc[2](loc0: address)
5MoveLoc[0](Arg0: &UID)
6MoveLoc[2](loc0: address)
7Call borrow_child_object<Field<Ty0, Ty1>>(&UID, address): &Field<Ty0, Ty1>
8ImmBorrowFieldGeneric[0](Field.value: Ty1)
9Ret
}
public borrow_mut<Ty0: copy + drop + store, Ty1: store>(Arg0: &mut UID, Arg1: Ty0): &mut Ty1 {
L2: loc0: address
B0:
0CopyLoc[0](Arg0: &mut UID)
1FreezeRef
2Call object::uid_to_address(&UID): address
3MoveLoc[1](Arg1: Ty0)
4Call hash_type_and_key<Ty0>(address, Ty0): address
5StLoc[2](loc0: address)
6MoveLoc[0](Arg0: &mut UID)
7MoveLoc[2](loc0: address)
8Call borrow_child_object_mut<Field<Ty0, Ty1>>(&mut UID, address): &mut Field<Ty0, Ty1>
9MutBorrowFieldGeneric[0](Field.value: Ty1)
10Ret
}
public remove<Ty0: copy + drop + store, Ty1: store>(Arg0: &mut UID, Arg1: Ty0): Ty1 {
L2: loc0: address
L3: loc1: address
L4: loc2: Ty1
B0:
0MoveLoc[0](Arg0: &mut UID)
1FreezeRef
2Call object::uid_to_address(&UID): address
3StLoc[3](loc1: address)
4CopyLoc[3](loc1: address)
5MoveLoc[1](Arg1: Ty0)
6Call hash_type_and_key<Ty0>(address, Ty0): address
7StLoc[2](loc0: address)
8MoveLoc[3](loc1: address)
9MoveLoc[2](loc0: address)
10Call remove_child_object<Field<Ty0, Ty1>>(address, address): Field<Ty0, Ty1>
11UnpackGeneric[0](Field<Ty0, Ty1>)
12StLoc[4](loc2: Ty1)
13Pop
14Call object::delete(UID)
15MoveLoc[4](loc2: Ty1)
16Ret
}
public exists<Ty0: copy + drop + store>(Arg0: &UID, Arg1: Ty0): bool {
L2: loc0: address
L3: loc1: address
B0:
0MoveLoc[0](Arg0: &UID)
1Call object::uid_to_address(&UID): address
2StLoc[3](loc1: address)
3CopyLoc[3](loc1: address)
4MoveLoc[1](Arg1: Ty0)
5Call hash_type_and_key<Ty0>(address, Ty0): address
6StLoc[2](loc0: address)
7MoveLoc[3](loc1: address)
8MoveLoc[2](loc0: address)
9Call has_child_object(address, address): bool
10Ret
}
public remove_opt<Ty0: copy + drop + store, Ty1: store>(Arg0: &mut UID, Arg1: Ty0): Option<Ty1> {
L2: loc0: Option<Ty1>
B0:
0CopyLoc[0](Arg0: &mut UID)
1FreezeRef
2CopyLoc[1](Arg1: Ty0)
3Call exists<Ty0>(&UID, Ty0): bool
4BrFalse(11)
B1:
5MoveLoc[0](Arg0: &mut UID)
6MoveLoc[1](Arg1: Ty0)
7Call remove<Ty0, Ty1>(&mut UID, Ty0): Ty1
8Call option::some<Ty1>(Ty1): Option<Ty1>
9StLoc[2](loc0: Option<Ty1>)
10Branch(15)
B2:
11MoveLoc[0](Arg0: &mut UID)
12Pop
13Call option::none<Ty1>(): Option<Ty1>
14StLoc[2](loc0: Option<Ty1>)
B3:
15MoveLoc[2](loc0: Option<Ty1>)
16Ret
}
public replace<Ty0: copy + drop + store, Ty1: store, Ty2: store>(Arg0: &mut UID, Arg1: Ty0, Arg2: Ty1): Option<Ty2> {
L3: loc0: Option<Ty2>
B0:
0CopyLoc[0](Arg0: &mut UID)
1CopyLoc[1](Arg1: Ty0)
2Call remove_opt<Ty0, Ty2>(&mut UID, Ty0): Option<Ty2>
3StLoc[3](loc0: Option<Ty2>)
4MoveLoc[0](Arg0: &mut UID)
5MoveLoc[1](Arg1: Ty0)
6MoveLoc[2](Arg2: Ty1)
7Call add<Ty0, Ty1>(&mut UID, Ty0, Ty1)
8MoveLoc[3](loc0: Option<Ty2>)
9Ret
}
public exists_with_type<Ty0: copy + drop + store, Ty1: store>(Arg0: &UID, Arg1: Ty0): bool {
L2: loc0: address
L3: loc1: address
B0:
0MoveLoc[0](Arg0: &UID)
1Call object::uid_to_address(&UID): address
2StLoc[3](loc1: address)
3CopyLoc[3](loc1: address)
4MoveLoc[1](Arg1: Ty0)
5Call hash_type_and_key<Ty0>(address, Ty0): address
6StLoc[2](loc0: address)
7MoveLoc[3](loc1: address)
8MoveLoc[2](loc0: address)
9Call has_child_object_with_ty<Field<Ty0, Ty1>>(address, address): bool
10Ret
}
public exists_<Ty0: copy + drop + store>(Arg0: &UID, Arg1: Ty0): bool {
B0:
0MoveLoc[0](Arg0: &UID)
1MoveLoc[1](Arg1: Ty0)
2Call exists<Ty0>(&UID, Ty0): bool
3Ret
}
public remove_if_exists<Ty0: copy + drop + store, Ty1: store>(Arg0: &mut UID, Arg1: Ty0): Option<Ty1> {
B0:
0MoveLoc[0](Arg0: &mut UID)
1MoveLoc[1](Arg1: Ty0)
2Call remove_opt<Ty0, Ty1>(&mut UID, Ty0): Option<Ty1>
3Ret
}
public(friend) field_info<Ty0: copy + drop + store>(Arg0: &UID, Arg1: Ty0): &UID * address {
L2: loc0: &Field<Ty0, ID>
L3: loc1: address
L4: loc2: &UID
L5: loc3: &ID
B0:
0CopyLoc[0](Arg0: &UID)
1Call object::uid_to_address(&UID): address
2MoveLoc[1](Arg1: Ty0)
3Call hash_type_and_key<Ty0>(address, Ty0): address
4StLoc[3](loc1: address)
5MoveLoc[0](Arg0: &UID)
6MoveLoc[3](loc1: address)
7Call borrow_child_object<Field<Ty0, ID>>(&UID, address): &Field<Ty0, ID>
8StLoc[2](loc0: &Field<Ty0, ID>)
9CopyLoc[2](loc0: &Field<Ty0, ID>)
10ImmBorrowFieldGeneric[1](Field.id: UID)
11StLoc[4](loc2: &UID)
12CopyLoc[2](loc0: &Field<Ty0, ID>)
13ImmBorrowFieldGeneric[2](Field.name: Ty0)
14Pop
15MoveLoc[2](loc0: &Field<Ty0, ID>)
16ImmBorrowFieldGeneric[3](Field.value: ID)
17StLoc[5](loc3: &ID)
18MoveLoc[4](loc2: &UID)
19MoveLoc[5](loc3: &ID)
20Call object::id_to_address(&ID): address
21Ret
}
public(friend) field_info_mut<Ty0: copy + drop + store>(Arg0: &mut UID, Arg1: Ty0): &mut UID * address {
L2: loc0: &mut Field<Ty0, ID>
L3: loc1: address
L4: loc2: &mut UID
L5: loc3: &mut ID
B0:
0CopyLoc[0](Arg0: &mut UID)
1FreezeRef
2Call object::uid_to_address(&UID): address
3MoveLoc[1](Arg1: Ty0)
4Call hash_type_and_key<Ty0>(address, Ty0): address
5StLoc[3](loc1: address)
6MoveLoc[0](Arg0: &mut UID)
7MoveLoc[3](loc1: address)
8Call borrow_child_object_mut<Field<Ty0, ID>>(&mut UID, address): &mut Field<Ty0, ID>
9StLoc[2](loc0: &mut Field<Ty0, ID>)
10CopyLoc[2](loc0: &mut Field<Ty0, ID>)
11MutBorrowFieldGeneric[1](Field.id: UID)
12StLoc[4](loc2: &mut UID)
13CopyLoc[2](loc0: &mut Field<Ty0, ID>)
14MutBorrowFieldGeneric[2](Field.name: Ty0)
15Pop
16MoveLoc[2](loc0: &mut Field<Ty0, ID>)
17MutBorrowFieldGeneric[3](Field.value: ID)
18StLoc[5](loc3: &mut ID)
19MoveLoc[4](loc2: &mut UID)
20MoveLoc[5](loc3: &mut ID)
21FreezeRef
22Call object::id_to_address(&ID): address
23Ret
}
native public(friend) hash_type_and_key<Ty0: copy + drop>(Arg0: address, Arg1: Ty0): address;
native public(friend) add_child_object<Ty0: key>(Arg0: address, Arg1: Ty0);
native public(friend) borrow_child_object<Ty0: key>(Arg0: &UID, Arg1: address): &Ty0;
native public(friend) borrow_child_object_mut<Ty0: key>(Arg0: &mut UID, Arg1: address): &mut Ty0;
native public(friend) remove_child_object<Ty0: key>(Arg0: address, Arg1: address): Ty0;
native public(friend) has_child_object(Arg0: address, Arg1: address): bool;
native public(friend) has_child_object_with_ty<Ty0: key>(Arg0: address, Arg1: address): bool;
Constants [
0 => u64: 0
1 => u64: 1
2 => u64: 2
3 => u64: 3
4 => u64: 4
]
}