0

In my iOS app, I want the users simply mint their NFT and list on marketplace using their wallet and in return they will give me a tiny portion of fees when processing.

Is there any standards to do that ? Should I make it defined on the contract about how he pay the fee ? Or any other ideas ?

Also when the users need to fund their wallet, can I provide him the fund using in-app purchase ?

1 Answer 1

0

You should add that in the smart contract, otherwise, users would be able to circumvent it.

uint creatorFee = 0.0099 ether // creatorFee is 0.01, now we can save some gas in require statement

function mint() public payable {
    require(msg.value > creatorFee); // by only using > instead of >=
    
    // code ...
}

If you want users to be able to fund their wallets, Fiat -> Crypto, you can use a third party crypto payment API and integrate it into your app. You wont be allowed to do this otherwise, because of financial legislations.

2
  • Thanks a bunch @normal_human ! About funding users wallet , "Fiat -> Crypto" how does it work ? I don't know about fiat yet. Have any suitable resource you can share please ?
    – Imran Rony
    Apr 11, 2022 at 8:03
  • Here's an article to give you some base knowledge on fiat onramp API's link. One option is link. Most of them have a widget that you can embed in your website so users do not have to leave your site/app to buy crypto! Apr 11, 2022 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.