File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
aptos-move/framework/aptos-framework Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -624,7 +624,7 @@ Exceeds maximum nesting for an object transfer.
624
624
625
625
626
626
627
- <a id =" 0x1_object_ENOT_OBJECT_OWNER " ></a >
627
+ <a id =" 0x1_object_ENOT_ " ></a >
628
628
629
629
The caller does not have ownership permissions
630
630
Original file line number Diff line number Diff line change @@ -644,6 +644,7 @@ module aptos_framework::object {
644
644
borrow_global <ObjectCore >(object.inner).allow_ungated_transfer
645
645
}
646
646
647
+ #[view]
647
648
/// Return the current owner.
648
649
public fun owner <T : key >(object: Object <T >): address acquires ObjectCore {
649
650
assert !(
@@ -653,11 +654,13 @@ module aptos_framework::object {
653
654
borrow_global <ObjectCore >(object.inner).owner
654
655
}
655
656
657
+ #[view]
656
658
/// Return true if the provided address is the current owner.
657
659
public fun is_owner <T : key >(object: Object <T >, owner: address ): bool acquires ObjectCore {
658
660
owner (object) == owner
659
661
}
660
662
663
+ #[view]
661
664
/// Return true if the provided address has indirect or direct ownership of the provided object.
662
665
public fun owns <T : key >(object: Object <T >, owner: address ): bool acquires ObjectCore {
663
666
let current_address = object_address (&object);
@@ -687,6 +690,7 @@ module aptos_framework::object {
687
690
true
688
691
}
689
692
693
+ #[view]
690
694
/// Returns the root owner of an object. As objects support nested ownership, it can be useful
691
695
/// to determine the identity of the starting point of ownership.
692
696
public fun root_owner <T : key >(object: Object <T >): address acquires ObjectCore {
You can’t perform that action at this time.
0 commit comments