-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can my SC detect if the incoming transaction has attached NEO, GAS or other NEP-5 token? (Neo 3) #2035
Comments
Maybe neo-project/proposals#108 and associated PRs? Otherwise it's about notifications, either |
Hi @lock9, good to see you :) |
Hi Shargon, good to see you too. Is it safe to use notifications only? Why the invocation counter must be 1? Can you explain it to me @shargon ? |
Yes, because we check the originator's script hash
It's mandatory because if you call again to this method you will earn twice. This prevent reentrancy. |
I'll try that then. Thanks @shargon |
Hi @lock9, good to see you active as well. @shargon, if the Notification comes from another contract B that dynamic invoked called A. Could the notification be forged on B and verified on A and have the properties that simulate NEO or GAS? I believe that "onPayment" will be a better generic solution. However, the notifications are also good as well. |
@shargon Will that scale with dynamic invokes which are nested within the second contract? Question: I make an initial call to a |
Hi,
I would like to have my contract to behave differently if it is invoked with attached tokens. On Neo 2, we could view the 'attachments', but I don't think this is possible on Neo 3.
How can I detect if my contract is receiving tokens? How can we mimic the ICO behavior on Neo 3?
Thanks.
The text was updated successfully, but these errors were encountered: