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

Fix the type in V2 event name: Change CollectionMaxiumMutate to CollectionMaximumMutate #15416

Merged
merged 1 commit into from
Nov 27, 2024
Merged
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
58 changes: 53 additions & 5 deletions aptos-move/framework/aptos-token/doc/token_event_store.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This module provides utils to add and emit new token events that are not in toke
- [Struct `CollectionUriMutateEvent`](#0x3_token_event_store_CollectionUriMutateEvent)
- [Struct `CollectionUriMutate`](#0x3_token_event_store_CollectionUriMutate)
- [Struct `CollectionMaxiumMutateEvent`](#0x3_token_event_store_CollectionMaxiumMutateEvent)
- [Struct `CollectionMaxiumMutate`](#0x3_token_event_store_CollectionMaxiumMutate)
- [Struct `CollectionMaximumMutate`](#0x3_token_event_store_CollectionMaximumMutate)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link in the table of contents needs to be updated to match the renamed struct. The current link points to #0x3_token_event_store_CollectionMaxiumMutate but should point to #0x3_token_event_store_CollectionMaximumMutate.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

- [Struct `OptInTransferEvent`](#0x3_token_event_store_OptInTransferEvent)
- [Struct `OptInTransfer`](#0x3_token_event_store_OptInTransfer)
- [Struct `UriMutationEvent`](#0x3_token_event_store_UriMutationEvent)
Expand All @@ -25,6 +25,7 @@ This module provides utils to add and emit new token events that are not in toke
- [Struct `MaxiumMutateEvent`](#0x3_token_event_store_MaxiumMutateEvent)
- [Struct `MaximumMutate`](#0x3_token_event_store_MaximumMutate)
- [Resource `TokenEventStoreV1`](#0x3_token_event_store_TokenEventStoreV1)
- [Struct `CollectionMaxiumMutate`](#0x3_token_event_store_CollectionMaxiumMutate)
- [Function `initialize_token_event_store`](#0x3_token_event_store_initialize_token_event_store)
- [Function `emit_collection_uri_mutate_event`](#0x3_token_event_store_emit_collection_uri_mutate_event)
- [Function `emit_collection_description_mutate_event`](#0x3_token_event_store_emit_collection_description_mutate_event)
Expand Down Expand Up @@ -292,15 +293,15 @@ Event emitted when the collection maximum is mutated

</details>

<a id="0x3_token_event_store_CollectionMaxiumMutate"></a>
<a id="0x3_token_event_store_CollectionMaximumMutate"></a>

## Struct `CollectionMaxiumMutate`
## Struct `CollectionMaximumMutate`

Event emitted when the collection maximum is mutated


<pre><code>#[<a href="../../aptos-framework/doc/event.md#0x1_event">event</a>]
<b>struct</b> <a href="token_event_store.md#0x3_token_event_store_CollectionMaxiumMutate">CollectionMaxiumMutate</a> <b>has</b> drop, store
<b>struct</b> <a href="token_event_store.md#0x3_token_event_store_CollectionMaximumMutate">CollectionMaximumMutate</a> <b>has</b> drop, store
</code></pre>


Expand Down Expand Up @@ -1066,6 +1067,53 @@ Event emitted when the token maximum is mutated
</dl>


</details>

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

## Struct `CollectionMaxiumMutate`



<pre><code>#[<a href="../../aptos-framework/doc/event.md#0x1_event">event</a>]
#[deprecated]
<b>struct</b> <a href="token_event_store.md#0x3_token_event_store_CollectionMaxiumMutate">CollectionMaxiumMutate</a> <b>has</b> drop, store
</code></pre>



<details>
<summary>Fields</summary>


<dl>
<dt>
<code>creator_addr: <b>address</b></code>
</dt>
<dd>

</dd>
<dt>
<code>collection_name: <a href="../../aptos-framework/../aptos-stdlib/../move-stdlib/doc/string.md#0x1_string_String">string::String</a></code>
</dt>
<dd>

</dd>
<dt>
<code>old_maximum: u64</code>
</dt>
<dd>

</dd>
<dt>
<code>new_maximum: u64</code>
</dt>
<dd>

</dd>
</dl>


</details>

<a id="0x3_token_event_store_initialize_token_event_store"></a>
Expand Down Expand Up @@ -1226,7 +1274,7 @@ Emit the collection maximum mutation event
<b>let</b> <a href="token_event_store.md#0x3_token_event_store">token_event_store</a> = <b>borrow_global_mut</b>&lt;<a href="token_event_store.md#0x3_token_event_store_TokenEventStoreV1">TokenEventStoreV1</a>&gt;(<a href="../../aptos-framework/../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer_address_of">signer::address_of</a>(creator));
<b>if</b> (std::features::module_event_migration_enabled()) {
<a href="../../aptos-framework/doc/event.md#0x1_event_emit">event::emit</a>(
<a href="token_event_store.md#0x3_token_event_store_CollectionMaxiumMutate">CollectionMaxiumMutate</a> {
<a href="token_event_store.md#0x3_token_event_store_CollectionMaximumMutate">CollectionMaximumMutate</a> {
creator_addr: <a href="../../aptos-framework/../aptos-stdlib/../move-stdlib/doc/signer.md#0x1_signer_address_of">signer::address_of</a>(creator),
collection_name: collection,
old_maximum,
Expand Down
13 changes: 11 additions & 2 deletions aptos-move/framework/aptos-token/sources/token_event_store.move
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module aptos_token::token_event_store {

#[event]
/// Event emitted when the collection maximum is mutated
struct CollectionMaxiumMutate has drop, store {
struct CollectionMaximumMutate has drop, store {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't we need both of these though... since this is already on mainnet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah... I think I just remove the suffix blindly w/o checking the spelling...

creator_addr: address,
collection_name: String,
old_maximum: u64,
Expand Down Expand Up @@ -295,7 +295,7 @@ module aptos_token::token_event_store {
let token_event_store = borrow_global_mut<TokenEventStoreV1>(signer::address_of(creator));
if (std::features::module_event_migration_enabled()) {
event::emit(
CollectionMaxiumMutate {
CollectionMaximumMutate {
creator_addr: signer::address_of(creator),
collection_name: collection,
old_maximum,
Expand Down Expand Up @@ -529,4 +529,13 @@ module aptos_token::token_event_store {
);
};
}

#[deprecated]
#[event]
struct CollectionMaxiumMutate has drop, store {
creator_addr: address,
collection_name: String,
old_maximum: u64,
new_maximum: u64,
}
}
Loading