我如何接受ERC20代币进行NFT薄荷付款而不是ETH
我如何接受ERC 20代币,以根据我的智能合约铸造NFT。我目前正在使用ETH支付铸造,我想接受另一个ERC 20代币。
How do I accept an ERC 20 token for minting NFTS on my smart contract. I’m currently paying for the minting using ETH, and I will like to accept another ERC 20 token.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以更改薄荷功能,以接受首选的令牌类型作为付款。为了防止在ETH中支付天然气,您可以使用双科性前进。检查他们的文档。
https://docs.biconomy.io.io/products/enable-products/enable-pareing-product-product-product--product--enable-poaying--煤气中心20
You can change your mint function in order to accept the preferred token type as payment. And in order to prevent paying gas in eth, you can use biconomy forward.Check out their docs.
https://docs.biconomy.io/products/enable-paying-gas-in-erc20
您需要从NFT合同到令牌合同的参考。
假设我们有这两个合同:NFTContract,Tokencontract。
您可以检查一个示例,说明我是在为论文开发的回购中如何做到这一点的。
https://github.com/nickvanzo/nickvanzo/contracts_for_thesis
You need a reference from the NFT contract to your token contract.
Let's say we have these two contracts: NFTContract, TokenContract.
You can check an example of how I did this in my repo I'm developing for my thesis.
https://github.com/NickVanzo/Contracts_For_Thesis
也许它对您有用,但要小心您可能会因坚固版本而犯错误。
Maybe it will work for you but be careful you can take errors for solidity versions.