检查令牌是否为NFT,并确保它不是骗局。是否可以局部脱链?
我试图了解Metaplex标准。在版本1.1中,已添加了token_standard
添加到元数据中,在这种情况下,很容易检查薄荷是否可易于函数(在Metaplex的定义上)。
但是在版本1.0中,我需要检查mint_authority
Mint帐户(可能代表NFT)。我的问题是:是否足以将其检查离链,还是我还必须确保该帐户存在并由令牌元数据拥有?
// assume that this mint has decimals = 0 and supply = 1.
let edition_pda = Pubkey::find_program_address(['metadata', token_metadata_program_id, mint_id, 'edition']);
if mint_authority == edition_pda {
// This is NFT
} else {
// This can be SCAM
}
也许我完全错了?
I am trying to understand metaplex standard. And in version 1.1 there was added filed token_standard
to metadata acount and in that case it's easy to check if mint is fungible or not (in definition of metaplex).
But in version 1.0 I need to checked mint_authority
filed of mint account (possible representing NFT). My question is: is it enough to check it off-chain or I must also ensure that this account exist and is owned by Token Metadata Program?
// assume that this mint has decimals = 0 and supply = 1.
let edition_pda = Pubkey::find_program_address(['metadata', token_metadata_program_id, mint_id, 'edition']);
if mint_authority == edition_pda {
// This is NFT
} else {
// This can be SCAM
}
Or maybe I am completely wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于Solana计划是无状态的,因此最好验证所有进出计划的内容
Since Solana Program's are stateless it is best to validate all the things in and out of your program