简体   繁体   English

我应该使用 Pallet_membership 来处理 dapp 用户成员资格吗? (智能合约和区块链运行时的区别)

[英]Should I use the pallet_membership to handle dapp user membership? (Differences between smart contracts and blockchain runtime)

I'm building a dapp based on substrate blockchain runtime and smart contracts.我正在构建一个基于底层区块链运行时和智能合约的 dapp。 The pallet_membership rust module handles adding, removing and tracking accounts membership in a blockchain. Pallet_membership rust 模块处理在区块链中添加、删除和跟踪帐户成员资格。 Would I use the pallet_membership to handle this or should I create a smart contract instead and create the logic in there to handle user membership in my dapp?我会使用pallet_membership 来处理这个问题,还是应该创建一个智能合约并在其中创建逻辑来处理我的dapp 中的用户成员资格?

Having trouble distinguishing between smart contracts and blockchain runtimes and what different roles they should assume for a dapp.难以区分智能合约和区块链运行时以及它们应该为 dapp 承担的不同角色。 I know smart contracts are deployed to blockchains and the runtime is the underlying logic of a blockchain, but what are some examples of distinct use cases for each that would be used by the dapp itself.我知道智能合约被部署到区块链上,运行时是区块链的底层逻辑,但是对于每个将由 dapp 本身使用的不同用例,有哪些不同的用例示例。

Here is a list of features my dapp would have and which component I believe should handle:以下是我的 dapp 将具有的功能列表以及我认为应该处理的组件:

  • User posts, comments, upvotes |用户帖子、评论、点赞 | Smart contract智能合约
  • User membership |用户会员 | Blockchain runtime区块链运行时
  • User posts sold and bought as NFT's |用户帖子作为 NFT 出售和购买 | No idea...不知道...

There is this entry on substrate.io which may clarify your doubts.在substrate.io上有这个条目可能会澄清你的疑惑。 https://docs.substrate.io/v3/runtime/smart-contracts/#smart-contracts-vs-runtime-development https://docs.substrate.io/v3/runtime/smart-contracts/#smart-contracts-vs-runtime-development

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM