Quantcast
Channel: Custom token smart contract in Solana - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 3

Answer by Callum M for Custom token smart contract in Solana

$
0
0

First of all, msol and jitosol are both owned by the standard token program, so they don't use a custom program. You can see this by calling getProgramAccount, eg:

curl https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '  {"jsonrpc": "2.0","id": 1,"method": "getAccountInfo","params": ["mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So",      {"encoding": "jsonParsed"      }    ]  }' | grep owner

You'll see the owner is TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA. Jito SOL's mint is J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn and you'll see the same there.

So you might be slightly mis-understanding where various functionality lives, or needs to live. Marinade and Jito absolutely have custom programs on the network, but their mint itself is just a token and doesn't have custom capabilities.

To answer your question directly, generally wallets, explorers, etc. only support mints owned by the token program and the new token extensions program. They can support others of course, but those are generally the ones everyone supports. You'd need to convince various players in the ecosystem to support your new standard if you created one.

Token extensions likely provide what you're looking for. This is a new token program with various new capabilities that can be added to tokens, which provides a huge amount of new flexibility. For example you can add metadata, or add a transfer hook to add custom logic on every transfer. See https://solana.com/developers/guides/token-extensions/getting-started

There's also a great video introducing them with some example use cases here: https://www.youtube.com/watch?v=CEuKahqOYbs


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images