# MsgExecuteUniversalUpdateCollection

## Overview

`MsgExecuteUniversalUpdateCollection` allows an approved address (or admin) to execute a `UniversalUpdateCollection` message from the tokenization module through a Manager Splitter. The message checks permissions before execution and uses the manager splitter address as the collection manager.

## Message Structure

```protobuf
message MsgExecuteUniversalUpdateCollection {
  option (cosmos.msg.v1.signer) = "executor";
  option (amino.name) = "managersplitter/ExecuteUniversalUpdateCollection";

  // Address executing the message (must be approved or admin).
  string executor = 1;

  // Address of the manager splitter to execute through.
  string managerSplitterAddress = 2;

  // The UniversalUpdateCollection message to execute.
  tokenization.MsgUniversalUpdateCollection universalUpdateCollectionMsg = 3;
}
```

## Fields

### `executor` (string, required)

The address that is executing the message. This address must be:

* The admin of the manager splitter, OR
* An approved address for all permissions required by the `UniversalUpdateCollection` message

Must be a valid Bech32 address.

### `managerSplitterAddress` (string, required)

The address of the manager splitter to execute through. This is the module-derived address returned when the manager splitter was created. Must be a valid Bech32 address.

### `universalUpdateCollectionMsg` (tokenization.MsgUniversalUpdateCollection, required)

The `UniversalUpdateCollection` message from the tokenization module to execute. This message will be executed with the manager splitter address as the creator/manager.

Note that you should only set the fields you are allowed to update. Use the update flag approach = false for all others.

## Permission Checking

The module checks permissions based on which fields are being updated in the `UniversalUpdateCollection` message:

* **UpdateValidTokenIds**: Requires `canUpdateValidTokenIds` permission
* **UpdateCollectionPermissions**: Admin only (cannot be delegated to approved addresses)
* **UpdateManager**: Requires `canUpdateManager` permission
* **UpdateCollectionMetadata**: Requires `canUpdateCollectionMetadata` permission
* **UpdateTokenMetadata**: Requires `canUpdateTokenMetadata` permission
* **UpdateCustomData**: Requires `canUpdateCustomData` permission
* **UpdateCollectionApprovals**: Requires `canUpdateCollectionApprovals` permission
* **UpdateStandards**: Requires `canUpdateStandards` permission
* **UpdateIsArchived**: Requires `canArchiveCollection` permission
* **CosmosCoinWrapperPathsToAdd**: Requires `canAddMoreCosmosCoinWrapperPaths` permission
* **AliasPathsToAdd**: Requires `canAddMoreAliasPaths` permission

**Important**: All required permissions are checked. If the executor is not approved for any required permission (and is not the admin), the transaction will fail.

## Response

```protobuf
message MsgExecuteUniversalUpdateCollectionResponse {
  // ID of the collection that was updated.
  string collectionId = 1 [(gogoproto.customtype) = "Uint", (gogoproto.nullable) = false];
}
```

### `collectionId` (Uint)

The ID of the collection that was updated, returned from the tokenization module's `UniversalUpdateCollection` execution.

## Validation

The message is validated to ensure:

1. The `executor` address is a valid Bech32 address
2. The `managerSplitterAddress` is a valid Bech32 address
3. The manager splitter exists
4. The executor has permission to execute all required actions
5. The `universalUpdateCollectionMsg` is valid

## Authorization

The executor must be:

* The admin of the manager splitter (has full permissions), OR
* An approved address for all permissions required by the update

If the executor doesn't have the required permissions, the transaction will fail with a permission denied error.

**Note**: `UpdateCollectionPermissions` is the one operation that cannot be delegated to approved addresses, even if they hold specific permissions. Only the admin of the manager splitter can update collection permissions.

## Usage Example

```json
{
  "executor": "bb1...",
  "managerSplitterAddress": "bb1managersplitter...",
  "universalUpdateCollectionMsg": {
    "creator": "bb1managersplitter...",
    "collectionId": "1",
    ...
    "updateCollectionMetadata": true,
    "collectionMetadata": {...}
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bitbadges.io/other-modules/x-managersplitter/messages/msg-execute-universal-update-collection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
