MsgExecuteUniversalUpdateCollection
Overview
MsgExecuteUniversalUpdateCollection allows an approved address (or admin) to execute a UniversalUpdateCollection message from the Badges module through a Manager Splitter. The message checks permissions before execution and uses the manager splitter address as the collection manager.
Message Structure
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.
badges.MsgUniversalUpdateCollection universalUpdateCollectionMsg = 3;
}Fields
executor (string, required)
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
UniversalUpdateCollectionmessage
Must be a valid Bech32 address.
managerSplitterAddress (string, required)
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 (badges.MsgUniversalUpdateCollection, required)
universalUpdateCollectionMsg (badges.MsgUniversalUpdateCollection, required)The UniversalUpdateCollection message from the Badges 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
canUpdateValidTokenIdspermissionUpdateCollectionPermissions: Requires
canUpdateCollectionApprovalspermissionUpdateManagerTimeline: Requires
canUpdateManagerpermissionUpdateCollectionMetadataTimeline: Requires
canUpdateCollectionMetadatapermissionUpdateTokenMetadataTimeline: Requires
canUpdateTokenMetadatapermissionUpdateCustomDataTimeline: Requires
canUpdateCustomDatapermissionUpdateCollectionApprovals: Requires
canUpdateCollectionApprovalspermissionUpdateStandardsTimeline: Requires
canUpdateStandardspermissionUpdateIsArchivedTimeline: Requires
canArchiveCollectionpermission
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
message MsgExecuteUniversalUpdateCollectionResponse {
// ID of the collection that was updated.
string collectionId = 1 [(gogoproto.customtype) = "Uint", (gogoproto.nullable) = false];
}collectionId (Uint)
collectionId (Uint)The ID of the collection that was updated, returned from the Badges module's UniversalUpdateCollection execution.
Validation
The message is validated to ensure:
The
executoraddress is a valid Bech32 addressThe
managerSplitterAddressis a valid Bech32 addressThe manager splitter exists
The executor has permission to execute all required actions
The
universalUpdateCollectionMsgis 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.
Usage Example
{
"executor": "bb1...",
"managerSplitterAddress": "bb1managersplitter...",
"universalUpdateCollectionMsg": {
"creator": "bb1managersplitter...",
"collectionId": "1",
...
"updateCollectionMetadataTimeline": true,
"collectionMetadataTimeline": [...]
}
}Last updated