2

想找份 通过token支付来铸造nft的合约 | 登链社区 | 技术问答

 2 years ago
source link: https://learnblockchain.cn/question/2806
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

50 想找份 通过token支付来铸造nft的合约

eth的支付很简单 通过msg.value能做到
但是 自己发的token不知道怎么去支付
有大佬知道这是怎么支付的吗

最佳答案 18小时前

这里是通过token铸造另一种token的代码,可以参考。 调用之前需要先调用token的approve方法,然后在合约里面调用transferFrom

https://github.com/liyue201/stock-contract/blob/f4a18e42dc92191b94e3d78b0ffa42d97f4bd224/stock.sol#L105

stirlingx - 去中心化搬砖工
采纳率 17% | 回答于 2天前

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK