Skip to content

x/managersplitter messages (create, update, delete, execute, update params) and the three queries, with fields, permission checks, and JSON examples.

Four messages are signed by the splitter's admin or an approved executor; MsgUpdateParams is signed by the governance authority. Type URLs use the managersplitter proto package, for example /managersplitter.MsgCreateManagerSplitter.

MessageSignerPurpose
MsgCreateManagerSplitteradminCreate a splitter and get its address
MsgUpdateManagerSplitteradminReplace the permission set
MsgDeleteManagerSplitteradminDelete a splitter
MsgExecuteUniversalUpdateCollectionexecutorRun a collection update through the splitter
MsgUpdateParamsauthorityGovernance: set module params

MsgCreateManagerSplitter

Creates a splitter with the given permissions and returns its module-derived address.

json
{
  "@type": "/managersplitter.MsgCreateManagerSplitter",
  "admin": "bb1p0rrel3365scadq5k9pv0x0zp9j22js6dnw70d",
  "permissions": {
    "canDeleteCollection": { "approvedAddresses": [] },
    "canArchiveCollection": { "approvedAddresses": [] },
    "canUpdateStandards": { "approvedAddresses": [] },
    "canUpdateCustomData": { "approvedAddresses": [] },
    "canUpdateManager": { "approvedAddresses": [] },
    "canUpdateCollectionMetadata": {
      "approvedAddresses": ["bb1py4mfpg6uf59qkyzg0nmau322c5873eeysp5ue"]
    },
    "canUpdateValidTokenIds": { "approvedAddresses": [] },
    "canUpdateTokenMetadata": {
      "approvedAddresses": ["bb1zc268nctj8xwslgw7q22cahs6k4y048agr6fvf"]
    },
    "canUpdateCollectionApprovals": { "approvedAddresses": [] }
  }
}
proto
message MsgCreateManagerSplitter {
  option (cosmos.msg.v1.signer) = "admin";
  option (amino.name) = "managersplitter/CreateManagerSplitter";

  string admin = 1;
  ManagerSplitterPermissions permissions = 2;
}

message MsgCreateManagerSplitterResponse {
  string address = 1;
}
FieldTypeRequiredDescription
adminstringyesPermanent admin. Full control, can always execute every permission, can update and delete the splitter, cannot be changed. Valid Bech32.
permissionsManagerSplitterPermissionsyesPer-permission approved address lists. The nine criteria canDeleteCollection, canArchiveCollection, canUpdateStandards, canUpdateCustomData, canUpdateManager, canUpdateCollectionMetadata, canUpdateValidTokenIds, canUpdateTokenMetadata, and canUpdateCollectionApprovals must all be present. canAddMoreAliasPaths and canAddMoreCosmosCoinWrapperPaths are optional.

Each PermissionCriteria.approvedAddresses is a Bech32 list. An empty list means only the admin can execute that permission. A missing permissions object fails with permissions cannot be nil, and a missing required criterion fails with, for example, permission criteria for canDeleteCollection cannot be nil.

Behavior:

  1. Validate that admin is a valid Bech32 address and that permissions contains the nine required criteria.
  2. Check that the derived address does not already exist (a safety check).
  3. Store the splitter with the next available ID, the admin, and the permissions (or empty).
  4. Increment the next splitter ID.

Response address is deterministic from the ID, derived as address.Module("managersplitter", []byte(id.String())), and is the value to set as a collection manager. Splitter ID 1 is bb139jr5akhnvum2t2qgg3tmku9ty6a3lxey425sz8auwgzn5j2u5rsyxffly.

MsgUpdateManagerSplitter

Replaces the whole permission set. Only the admin can send it.

json
{
  "@type": "/managersplitter.MsgUpdateManagerSplitter",
  "admin": "bb1p0rrel3365scadq5k9pv0x0zp9j22js6dnw70d",
  "address": "bb139jr5akhnvum2t2qgg3tmku9ty6a3lxey425sz8auwgzn5j2u5rsyxffly",
  "permissions": {
    "canDeleteCollection": { "approvedAddresses": [] },
    "canArchiveCollection": { "approvedAddresses": [] },
    "canUpdateStandards": { "approvedAddresses": [] },
    "canUpdateCustomData": { "approvedAddresses": [] },
    "canUpdateManager": { "approvedAddresses": [] },
    "canUpdateCollectionMetadata": {
      "approvedAddresses": ["bb1py4mfpg6uf59qkyzg0nmau322c5873eeysp5ue", "bb1zc268nctj8xwslgw7q22cahs6k4y048agr6fvf"]
    },
    "canUpdateValidTokenIds": { "approvedAddresses": [] },
    "canUpdateTokenMetadata": {
      "approvedAddresses": ["bb1zc268nctj8xwslgw7q22cahs6k4y048agr6fvf"]
    },
    "canUpdateCollectionApprovals": { "approvedAddresses": [] }
  }
}
proto
message MsgUpdateManagerSplitter {
  option (cosmos.msg.v1.signer) = "admin";
  option (amino.name) = "managersplitter/UpdateManagerSplitter";

  string admin = 1;
  string address = 2;
  ManagerSplitterPermissions permissions = 3;
}

message MsgUpdateManagerSplitterResponse {}
FieldTypeRequiredDescription
adminstringyesMust match the stored admin
addressstringyesSplitter address returned at creation
permissionsManagerSplitterPermissionsyesNew full permission set. The same nine criteria as in create are required.

Behavior: the update is a full replacement. To revoke a permission, send an empty approvedAddresses list for it; leaving one of the nine required criteria out fails validation. A mismatched admin fails with an unauthorized error. The response is empty on success.

MsgDeleteManagerSplitter

Deletes a splitter. Only the admin can send it.

json
{
  "@type": "/managersplitter.MsgDeleteManagerSplitter",
  "admin": "bb1p0rrel3365scadq5k9pv0x0zp9j22js6dnw70d",
  "address": "bb139jr5akhnvum2t2qgg3tmku9ty6a3lxey425sz8auwgzn5j2u5rsyxffly"
}
proto
message MsgDeleteManagerSplitter {
  option (cosmos.msg.v1.signer) = "admin";
  option (amino.name) = "managersplitter/DeleteManagerSplitter";

  string admin = 1;
  string address = 2;
}

message MsgDeleteManagerSplitterResponse {}
FieldTypeRequiredDescription
adminstringyesMust match the stored admin
addressstringyesSplitter to delete

Behavior: a mismatched admin fails with an unauthorized error. Deleting a splitter that is still the manager of any collection fails with transfer collection management before deleting the manager splitter. Set a different manager on those collections first (through MsgExecuteUniversalUpdateCollection with updateManager), then delete.

MsgExecuteUniversalUpdateCollection

Runs a MsgUniversalUpdateCollection through the splitter. The module checks every permission the inner message needs, then executes it with the splitter address as creator and manager.

json
{
  "@type": "/managersplitter.MsgExecuteUniversalUpdateCollection",
  "executor": "bb1py4mfpg6uf59qkyzg0nmau322c5873eeysp5ue",
  "managerSplitterAddress": "bb139jr5akhnvum2t2qgg3tmku9ty6a3lxey425sz8auwgzn5j2u5rsyxffly",
  "universalUpdateCollectionMsg": {
    "creator": "bb139jr5akhnvum2t2qgg3tmku9ty6a3lxey425sz8auwgzn5j2u5rsyxffly",
    "collectionId": "1",
    "updateCollectionMetadata": true,
    "collectionMetadata": { "uri": "ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/collection.json", "customData": "" }
  }
}
proto
message MsgExecuteUniversalUpdateCollection {
  option (cosmos.msg.v1.signer) = "executor";
  option (amino.name) = "managersplitter/ExecuteUniversalUpdateCollection";

  string executor = 1;
  string managerSplitterAddress = 2;
  tokenization.MsgUniversalUpdateCollection universalUpdateCollectionMsg = 3;
}

message MsgExecuteUniversalUpdateCollectionResponse {
  string collectionId = 1;
}
FieldTypeRequiredDescription
executorstringyesThe admin, or an address approved for every permission the update needs
managerSplitterAddressstringyesSplitter to execute through
universalUpdateCollectionMsgMsgUniversalUpdateCollectionyesThe update. Set only the fields you may update; leave every other update* flag false.

Permission checks, by update flag on the inner message:

Inner fieldPermission required
updateValidTokenIdscanUpdateValidTokenIds
updateCollectionPermissionsadmin only, cannot be delegated
updateManagercanUpdateManager
updateCollectionMetadatacanUpdateCollectionMetadata
updateTokenMetadatacanUpdateTokenMetadata
updateCustomDatacanUpdateCustomData
updateCollectionApprovalscanUpdateCollectionApprovals
updateStandardscanUpdateStandards
updateIsArchivedcanArchiveCollection
cosmosCoinWrapperPathsToAdd (non-empty)canAddMoreCosmosCoinWrapperPaths
aliasPathsToAdd (non-empty)canAddMoreAliasPaths

Behavior:

  1. Validate executor and managerSplitterAddress as Bech32.
  2. Load the splitter; fail if it does not exist.
  3. For each flag above, check that the executor is the admin or is in that permission's approvedAddresses. Any missing permission fails the whole transaction with a permission denied error.
  4. Validate the inner message and execute it through x/tokenization with the splitter address as creator.
  5. Return the updated collectionId.

The collection's own collectionPermissions still apply after the splitter check; a permanently forbidden action fails in x/tokenization regardless of splitter approval.

CLI

Each message has a bitbadgeschaind tx managersplitter subcommand that takes the message JSON as one inline argument. Drop the @type key, and pass the JSON itself, not a file path:

bash
FLAGS="--chain-id bitbadges-1 --gas auto --gas-adjustment 1.5 --gas-prices 10ubadge"
bitbadgeschaind tx managersplitter create-manager-splitter "$(cat splitter.json)" --from alice $FLAGS
bitbadgeschaind tx managersplitter execute-universal-update-collection "$(cat execute.json)" --from alice $FLAGS
bitbadgeschaind query managersplitter manager-splitter bb139jr5akhnvum2t2qgg3tmku9ty6a3lxey425sz8auwgzn5j2u5rsyxffly
bitbadgeschaind query managersplitter all-manager-splitters

The CLI overwrites admin (create, update, delete) and executor (execute) with the --from address, but the JSON still needs a valid Bech32 value there: an empty admin fails validation before the overwrite.

MsgUpdateParams

Governance message that sets module params. The Params message currently has no fields, so this exists for forward compatibility.

json
{
  "@type": "/managersplitter.MsgUpdateParams",
  "authority": "bb10d07y265gmmuvt4z0w9aw880jnsr700jelmk2z",
  "params": {}
}
proto
message MsgUpdateParams {
  option (cosmos.msg.v1.signer) = "authority";
  option (amino.name) = "managersplitter/MsgUpdateParams";

  string authority = 1;
  Params params = 2;   // all parameters must be supplied
}

message MsgUpdateParamsResponse {}
FieldTypeRequiredDescription
authoritystringyesModule authority; defaults to the x/gov module account
paramsParamsyesFull parameter set (currently empty)

Queries

QueryLCD pathReturns
ParamsGET /bitbadges/bitbadgeschain/managersplitter/paramsModule params (empty object)
ManagerSplitterGET /bitbadges/bitbadgeschain/managersplitter/{address}One splitter by address
AllManagerSplittersGET /bitbadges/bitbadgeschain/managersplitterPaginated list
bash
curl "https://lcd.bitbadges.io/bitbadges/bitbadgeschain/managersplitter?pagination.limit=10"
json
{"managerSplitters":[],"pagination":{"next_key":null,"total":"0"}}
bash
curl https://lcd.bitbadges.io/bitbadges/bitbadgeschain/managersplitter/bb139jr5akhnvum2t2qgg3tmku9ty6a3lxey425sz8auwgzn5j2u5rsyxffly
json
{
  "managerSplitter": {
    "address": "bb139jr5akhnvum2t2qgg3tmku9ty6a3lxey425sz8auwgzn5j2u5rsyxffly",
    "admin": "bb1p0rrel3365scadq5k9pv0x0zp9j22js6dnw70d",
    "permissions": {
      "canUpdateCollectionMetadata": { "approvedAddresses": ["bb1py4mfpg6uf59qkyzg0nmau322c5873eeysp5ue"] }
    }
  }
}

AllManagerSplitters takes pagination (PageRequest) and returns managerSplitters plus pagination. ManagerSplitter takes address.

Edit this page on GitHub