1

On Ubuntu I made a coin, this coin whenever I send it is called unknown token or BERJW how can I change this name to something else? Like is there a code snippet or a site that allows me to change it?

1 Answer 1

1

If you are familiar with JS, you could use Metaplex UMI with the token metadata plugin to update your token details

import {
    keypairIdentity,
    publicKey,
} from "@metaplex-foundation/umi";
import {
    clusterApiUrl,
    Connection,
} from "@solana/web3.js";
import {
    fetchMetadataFromSeeds,
    findMasterEditionPda,
    mplTokenMetadata,
    updateV1,
} from "@metaplex-foundation/mpl-token-metadata";

export const connection = new Connection(clusterApiUrl("devnet"));

const umi = createUmi(connection);

export const keypair = umi.eddsa.createKeypairFromSecretKey(Uint8Array.from([ <UPDATE WITH SECRET KEY>]));

umi.use(keypairIdentity(keypair)).use(mplTokenMetadata());

async function updateTMDAsset() {
    const mint = publicKey(" "); // update with mint address
    const edition = findMasterEditionPda(umi, { mint });

    const initialMetadata = await fetchMetadataFromSeeds(umi, { mint });

    await updateV1(umi, {
        mint,
        authority: umi.identity,
        data: { ...initialMetadata, name: "Updated Asset" },
        primarySaleHappened: true,
        edition,
        isMutable: true,
    }).sendAndConfirm(umi);
}

ref: https://developers.metaplex.com/token-metadata/update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.