You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To update the metadata of a token created using Osmosis's Token Factory module, you can utilize the `osmosisd` command-line interface to execute the `tokenfactory set-denom-metadata` transaction. This operation allows the admin of a specific denomination (denom) to modify its associated metadata.
160
+
161
+
**Prerequisites:**
162
+
163
+
-**Admin Privileges:** Ensure that your account has admin rights over the denom whose metadata you intend to update.
164
+
165
+
-**Metadata Structure:** Prepare the new metadata in JSON format, adhering to the `Metadata` structure defined in the Cosmos SDK's bank module. This structure includes fields such as `description`, `denom_units`, `base`, `display`, `name`, and `symbol`.
166
+
167
+
168
+
**Steps to Update Token Metadata:**
169
+
170
+
1.**Create a Metadata JSON File:** Define the new metadata in a JSON file, for example, `metadata.json`.
- Replace `your_creator_address` with your Osmosis address.
194
+
- Replace `your_subdenom` with the subdenomination of your token.
195
+
- Customize the `description`, `denom_units`, `base`, `display`, `name`, and `symbol` fields as per your token's specifications.
196
+
197
+
2.**Execute the SetDenomMetadata Transaction:** Use the `osmosisd` CLI to submit the transaction.
198
+
```
199
+
osmosisd tx tokenfactory set-denom-metadata \
200
+
--metadata="$(cat metadata.json)" \
201
+
--from your_admin_account \
202
+
--chain-id your_chain_id \
203
+
--fees your_fee_amount \
204
+
--gas auto \
205
+
--gas-adjustment 1.5
206
+
```
207
+
1.- Ensure that `your_admin_account` is the account with admin privileges over the denom.
208
+
- Replace `your_chain_id` with your target chain's ID.
209
+
- Set `your_fee_amount` to an appropriate fee for the transaction.
210
+
211
+
**Important Considerations:**
212
+
213
+
-**Admin Verification:** The transaction will verify that the sender is the admin of the specified denom.
214
+
215
+
-**Metadata Overwrite:** Executing this transaction will overwrite the existing metadata associated with the denom.
216
+
217
+
218
+
For more detailed information, you can refer to the [Osmosis Token Factory module documentation](/osmosis-core/modules/tokenfactory/).
219
+
220
+
If you encounter any issues or need further assistance, consider reaching out to the Osmosis community or checking the [Osmosis GitHub repository](https://github.com/osmosis-labs/osmosis) for additional resources.
0 commit comments