0

I'm trying to make something similar to alien worlds, how can I transfer tokens from the contract to the user but have the resource costs go to the user using EOSJS?

0

please consult this documentation page, it should answer your question: https://developers.eos.io/manuals/eosio.cdt/latest/features/resource_payer

an alternative is via noops and ONLY_BILL_FIRST_AUTHORIZER upgrade protocol feature. you can read about it here: https://cmichel.io/eosio-how-to-pay-for-users-cpu/

6
  • 1
    Thanks for your answer! So that's the only way? I have actually read about it and have tried it but the testnet doesn't seem to support it yet. I actually asked about the resource payer a few weeks ago: eosio.stackexchange.com/questions/6023/… and I got to know that testnets do not support this yet so I was wondering how others handled it when resource_payer feature wasn't in yet. Thanks for the help! Aug 5 at 14:43
  • 1
    I have updated my answer to give the old alternative way
    – ovi
    Aug 5 at 15:58
  • 1
    Thank you very much for your answer, I'll try it out, have an awesome day, awesome person! :) Aug 6 at 2:52
  • Hi @ovi, I tried your suggestion but what I really wanted was to have the users pay for the cpu and the account in the server will transfer tokens to the user. I have tried reversing it but the problem is that I just can't get to make the signatures work together (I'm using UAL with react). Do you have some suggested resources for this? I've spent around 8+ hours trying to find a solution but I couldn't make it work, sorry for bugging you and thank you again! Aug 6 at 15:45
  • hi @JesseDwight I am not sure I fully understand your problem you try to solve. I see now you are talking about UAL and client side implementation. you can try to formulate a more elaborate text for your problem and post it in the EOSIO dev telegram channel t.me/joinchat/0uhWYfXVpPlkNTA1
    – ovi
    Aug 9 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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