0

I'm working on a game PoC and I've got questions about player rewards good practices.

Sure I understand that those functions cannot be public and onlyOwner-restricted, but how does it work actually ?

I'm thinking about running a server that would handle players reward queries and "relay" those claim and reward functions through the Owner account if the calls are valid. But I can't find any resources about this. I suppose the server needs to have access to the network through its own Metamask account ??

Any pointers would be really appreciated 🙂

1 Answer 1

0

You can store owner's private key and run scripts to call only-owner functions regularly. Please be sure those functions do not cost too much gas. To avoid gas over-consumption, you need to be careful and loops, storage variables and so on. You can find more details here

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.