How to approve MATIC by using Moralis SDK

Do we have a function like this: Moralis.approve(options)?

This functionality needs to be done manually using standard web3. But thanks for the idea, we will add this functionality in the future.

Btw, you don’t need to approve native crypto. Approvig is needed only for erc20 tokens

My game idea is, when players get some tasks done, we reward them 10 our ERC20 token.
if they reach 50 token, we will enable “Claim token” button for them to transfer the token to their wallets.
So when they claim token, we need they pay us some MATIC as a fee for claim. then we check their reward token in the server database, if it’s enough (>= 50 token), we will call the transfer function on smart contract of our token to transfer the token for them.
Do you think its is a good idea? And do you have any suggestion for us to implement it?

the steps are:

  1. Users click on “Claim token” button
  2. They call transferTo(0x00…, 0.01 matic) -> receipt
  3. after get the receipt, user call our server api to claim token.
  4. our cloud function server transfer a number of our token to the users by calling transferTo(0x000, 100 token).
    the problem is how can we confirm the “receipt” is valid or not.