MsgUpdateDynamicStore
Updates an existing dynamic store's default value, global kill switch status, and optional metadata fields.
Proto Definition
message MsgUpdateDynamicStore {
string creator = 1; // Address updating the store (must be creator)
string storeId = 2; // ID of dynamic store to update
bool defaultValue = 3; // New default value for uninitialized addresses
bool globalEnabled = 4; // Global kill switch. When false, all approvals using this store fail immediately
string uri = 5; // Optional: URI for additional metadata or resources
string customData = 6; // Optional: Custom data field for arbitrary data
}
message MsgUpdateDynamicStoreResponse {}Usage Example
# CLI command
bitbadgeschaind tx badges update-dynamic-store [store-id] [default-value] [global-enabled] --from creator-keyJSON Examples
Update default value only (keep globalEnabled unchanged):
Disable global kill switch (halt all approvals using this store):
Re-enable global kill switch:
Update metadata fields:
Clear metadata fields (set to empty strings):
Global Kill Switch
The globalEnabled field acts as a global kill switch for the dynamic store. When globalEnabled = false:
All approvals using this store via
DynamicStoreChallengewill fail immediatelyThe error message will be: "dynamic store storeId {id} is globally disabled"
Per-address values are ignored when the kill switch is disabled
This is useful for quickly halting all approvals that depend on a specific dynamic store (e.g., if a protocol is compromised).
Note: When updating a store, you must pass the current globalEnabled value if you want to keep it unchanged. Proto3 bools default to false, so you must explicitly pass true to maintain an enabled state.
Metadata Fields
The uri and customData fields can be updated along with other store properties:
uri: URI for additional metadata or resources. Can be set, updated, or cleared (set to empty string).customData: Custom data field for arbitrary string data. Can be set, updated, or cleared (set to empty string).
Important Notes:
Both fields are optional and default to empty strings if not provided
To keep existing values unchanged, you can omit the fields or pass the current values
To clear a field, explicitly set it to an empty string (
"")Fields are stored and persisted with the DynamicStore
Fields are included in EIP712 schemas for Ethereum signature compatibility
Last updated