Fabric 2.0 alpha里FabToken作为重大新特新引入,它提供了让用户在通道使用令牌环呈现资源的能力。FabToken是一个令牌环管理系统,它使用Unspent Transaction Output(UTXO)模型结合Fabric自身msp架构等发起,转换和赎回采访令牌环, 具体可参考以前文章 Hyperledger Fabric 2.0 Alpha新特性

可惜在beta和release版本,FabToken被彻底删除, 笔者fabric-sample-2.0-alpha下的fabtoken跑不起来了,原生支持token暂时是不行了,估计只能自己写链码造了。

而具体删除的原因,官方JIRA没给出具体原因,还是google给力些。参考链接https://lists.hyperledger.org/g/fabric/topic/fabtoken/34150195?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,34150195

Gari Singh:Not quite sure what you mean by “there is no clear (unobfuscated) answer”. Dave Enyeart posted https://lists.hyperledger.org/g/fabric/message/6228 to the mailing list back in June. Perhaps the message was not clear … the net-net is that the way FabToken was implemented revealed some underlying issues which need to be addressed (primarily around post-order execution where the endorsed transaction model is not used). And then as we started to look more deeply, we think there is a different way of actually implementing token and other post-order execution use cases so we actually removed the code. Yuval - you don’t actually need FabToken to implement tokens for Fabric. You can use implement tokens using chaincode. People have been doing this for quite a while.

Garic Singh是IBM的大佬, 应该是底层的实现的一些争议,post-order背书交易模型没被用上, 建议自己使用chaincode实现。

Christopher Ferris: Tubal, you could also try the Fabric EVM chaincode to implement ERC20 or ERC721 tokens, etc. Use the #fabric-evm channel for discussion.

而后面的一个哥们是建议使用Fabric EVM去实现, hyperledger基金会确实还有是有这个组件, 参考https://github.com/hyperledger/fabric-chaincode-evm 实际市场的对token是刚需, 有空我们去探讨下。