0

I'm creating a game and I'm having a doubt about how I can work safely minting the coins. Taking AxieInfinity as a basis, you play and win the SLP, at some point you can redeem the SLP for your wallet, my question is being in this process. How could I implement something like that? I ask this because on the off-chain side (my database) I would have an X value of the currency that I could redeem, when my player redeems I need to take an amount from my ERC20 and transfer to him, the doubt is in this process , how to make ? and how to do it safely?

Does anyone have an example or something to guide me in this?

2
  • I already told you to use signatures ethereum.stackexchange.com/a/112578.
    – Ismael
    Nov 6, 2021 at 3:44
  • 1
    @Ismael I saw it and I'm grateful, but I'm still having a hard time understanding it, I'd like to see if anyone would have an example code for the real situation that I mentioned in the question.
    – Crazy
    Nov 9, 2021 at 15:49

1 Answer 1

0

I'm about to start this piece of code now, for now I'm finishing the deposit function, Token to (Virtual Token Game: Save Mysql). I recommend you do everything server-side.

what I'm reading you will need to get your private key and make the server-side code to make the transfer withdrawal automatically

4
  • Hi @Mateus, Can you share an example code with me? I've been looking for an example for days and I can't find anything, this doubt is killing me little by little... hahahah what I need is when the player will convert the virtual currency (my bank) to the blockchain (mint the currency in his wallet)
    – Crazy
    Nov 3, 2021 at 16:55
  • I recommend that you don't mint coins, this is horrible for the game's economy. It is better to transfer from a wallet that you are going to set aside for payments, to the wallet of the player who requested the withdrawal Nov 3, 2021 at 17:03
  • Porra tu é brasileiro kkkkkkkkkkkkkk me chama no discord Mateuus#7601 Nov 3, 2021 at 17:04
  • But the question is there, how is this done? How to transfer automatically?
    – Crazy
    Nov 3, 2021 at 17:05

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.