Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[framework] Add support for compressing and decompressing TokenV2 #15579

Draft
wants to merge 1 commit into
base: igor/compressed_object
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions aptos-move/framework/aptos-token-objects/doc/property_map.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ represent types and storing values in bcs format.
- [Function `update_typed`](#0x4_property_map_update_typed)
- [Function `update_internal`](#0x4_property_map_update_internal)
- [Function `remove`](#0x4_property_map_remove)
- [Function `exists_at`](#0x4_property_map_exists_at)
- [Function `delete`](#0x4_property_map_delete)
- [Function `assert_end_to_end_input`](#0x4_property_map_assert_end_to_end_input)


Expand Down Expand Up @@ -1262,6 +1264,54 @@ Removes a property from the map, ensuring that it does in fact exist



</details>

<a id="0x4_property_map_exists_at"></a>

## Function `exists_at`



<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="property_map.md#0x4_property_map_exists_at">exists_at</a>(addr: <b>address</b>): bool
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="property_map.md#0x4_property_map_exists_at">exists_at</a>(addr: <b>address</b>): bool {
<b>exists</b>&lt;<a href="property_map.md#0x4_property_map_PropertyMap">PropertyMap</a>&gt;(addr)
}
</code></pre>



</details>

<a id="0x4_property_map_delete"></a>

## Function `delete`



<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="property_map.md#0x4_property_map_delete">delete</a>(addr: <b>address</b>): <a href="property_map.md#0x4_property_map_PropertyMap">property_map::PropertyMap</a>
</code></pre>



<details>
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="property_map.md#0x4_property_map_delete">delete</a>(addr: <b>address</b>): <a href="property_map.md#0x4_property_map_PropertyMap">PropertyMap</a> <b>acquires</b> <a href="property_map.md#0x4_property_map_PropertyMap">PropertyMap</a> {
<b>move_from</b>&lt;<a href="property_map.md#0x4_property_map_PropertyMap">PropertyMap</a>&gt;(addr)
}
</code></pre>



</details>

<a id="0x4_property_map_assert_end_to_end_input"></a>
Expand Down
8 changes: 4 additions & 4 deletions aptos-move/framework/aptos-token-objects/doc/royalty.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ by (numerator / denominator) * 100%


<pre><code>#[resource_group_member(#[group = <a href="../../aptos-framework/doc/object.md#0x1_object_ObjectGroup">0x1::object::ObjectGroup</a>])]
<b>struct</b> <a href="royalty.md#0x4_royalty_Royalty">Royalty</a> <b>has</b> <b>copy</b>, drop, key
<b>struct</b> <a href="royalty.md#0x4_royalty_Royalty">Royalty</a> <b>has</b> <b>copy</b>, drop, store, key
</code></pre>


Expand Down Expand Up @@ -277,7 +277,7 @@ Creates a new royalty, verifying that it is a valid percentage



<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="royalty.md#0x4_royalty_delete">delete</a>(addr: <b>address</b>)
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="royalty.md#0x4_royalty_delete">delete</a>(addr: <b>address</b>): <a href="royalty.md#0x4_royalty_Royalty">royalty::Royalty</a>
</code></pre>


Expand All @@ -286,9 +286,9 @@ Creates a new royalty, verifying that it is a valid percentage
<summary>Implementation</summary>


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="royalty.md#0x4_royalty_delete">delete</a>(addr: <b>address</b>) <b>acquires</b> <a href="royalty.md#0x4_royalty_Royalty">Royalty</a> {
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="royalty.md#0x4_royalty_delete">delete</a>(addr: <b>address</b>): <a href="royalty.md#0x4_royalty_Royalty">Royalty</a> <b>acquires</b> <a href="royalty.md#0x4_royalty_Royalty">Royalty</a> {
<b>assert</b>!(<b>exists</b>&lt;<a href="royalty.md#0x4_royalty_Royalty">Royalty</a>&gt;(addr), <a href="../../aptos-framework/../aptos-stdlib/../move-stdlib/doc/error.md#0x1_error_not_found">error::not_found</a>(<a href="royalty.md#0x4_royalty_EROYALTY_DOES_NOT_EXIST">EROYALTY_DOES_NOT_EXIST</a>));
<b>move_from</b>&lt;<a href="royalty.md#0x4_royalty_Royalty">Royalty</a>&gt;(addr);
<b>move_from</b>&lt;<a href="royalty.md#0x4_royalty_Royalty">Royalty</a>&gt;(addr)
}
</code></pre>

Expand Down
Loading
Loading