Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

exchange tokens by transfer does not work #5623

Closed
wsdfz opened this issue Sep 12, 2018 · 2 comments
Closed

exchange tokens by transfer does not work #5623

wsdfz opened this issue Sep 12, 2018 · 2 comments
Assignees
Labels

Comments

@wsdfz
Copy link

wsdfz commented Sep 12, 2018

In my old contract, when someone transfer token to contract, contract will transfer back another token to exchange within tokens. But now it can not work with error:

Error 3100006: Subjective exception thrown during block production
Error Details:
Cannot charge RAM to other accounts during notify.

Maybe it is related to new RAM rules: #5451

But it will error too when the account already have both tokens. In this case, no new RAM is needed.

Question:
1, Is these any way to exchange tokens by transfer after this change?

2, If not, what is the common new way ?

And when I tested in my local machine, all transfers are working fine. Is there any settings to open it in config.ini ?

I tried to add:
disable-ram-billing-notify-checks = false

It still works.

@taokayan
Copy link
Contributor

In the new versions it's not allow to charge the user RAM in the notification code by default, this is by design and will stop hacker from stealing user's RAM. Contract owners are advised to change their contract so that the RAM is billed by the contract owner in their notification code.

@wsdfz
Copy link
Author

wsdfz commented Sep 12, 2018

Ignore it.
It is only because one of the modify operation in contract code.

@wsdfz wsdfz closed this as completed Sep 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants