自2022年6月20日起,注册代币的规则发生变化: https: //github.com/solana-labs/token-list
我已经尝试过以下方法:
1)。通过服务创建新令牌:
创建这些代币并尝试通过网络应用程序(web3js)将它们转移到另一个钱包后,它们被定义为 NFT:
同样在 Solscan 上,这些令牌显示为“无法识别的令牌”:
2)。然后我尝试通过 Metaplex 注册令牌,但不断遇到各种错误。我的代码(JavaScript):
import { createCreateMetadataAccountV2Instruction} from '@metaplex-foundation/mpl-token-metadata';
const tokenMetadata = {
name: 'EUR demo-stablecoin',
symbol: 'EURX',
uri: {
name: 'EUR demo-stablecoin',
symbol: 'EURX',
description: 'Fully for testing purposes only',
image: 'https://raw.githubusercontent.com/.../logo.png',
},
sellerFeeBasisPoints: 0,
creators: null,
collection: null,
uses: null,
};
const createNewTokenTransaction = new solanaWeb3.Transaction().add(
createCreateMetadataAccountV2Instruction(
{
metadata: 'https://vxmxabesb3yfewwf4jcplmstg2fe3cngsphlgnrvwp46iftqdm.arweave.net/.../arweave-metadata-JSON',
mint: mintKeypair.publicKey,
mintAuthority: provider.publicKey,
payer: provider.publicKey,
updateAuthority: provider.publicKey,
},
{
createMetadataAccountArgsV2:
{
data: tokenMetadata, …Run Code Online (Sandbox Code Playgroud)