如何将NFT特征牢固地传递给智能合约
我有一份NFT订立合同,该合同根据NFT的财产稀有性而发出奖励。四个属性层是1,2,3和4。
当用户单击“ stakenft”(Tokenid,nfttier)时,我使用Tokenid将元数据JSON属性从IPF中拉出,并将NFT层发送到智能合约。
这里的问题是,当这在我们网站的用户界面上工作时,任何人都可以直接使用etherscan并输入不在其NFT中的层,以赚取更多的奖励。
如何基于代币的链核实NFT层?
I have an NFT staking contract that issues rewards based on the property rarity of the NFT staked. The four property tiers are 1,2,3 and 4.
When a user clicks stakeNFT(tokenId, nftTier), I use the tokenId to pull the metadata json property from IPFS and send the NFT tier to the smart contract.
The issue here is while this works on the user interface of our website, anyone can use Etherscan directly and input an tier that isn’t in their NFT so as to earn more rewards.
How do I verify the NFT tier based on the tokenId onchain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论