Hi guys. I am trying to implement a dividend system for my trc20 token. My plan is to accept the token from holders from the beginning of the month (virtual staking). Then tron is distributed to the people who staked the coin along with the full amount of token they staked at the end of month. The problem is, how do I detect incoming token transaction?

Sep 17, 2020, 8:47 AM
I am not using the owner address to receive the token and distribute dividend on tron
Also is it not possible to do that without a web interface?
Anyone??
Sep 17, 2020, 1:11 PM
You can't detect incoming token transfers in a contract. The only thing you can do is check whether the contract has higher token balance than last time
Sep 17, 2020, 1:33 PM
Hmm I thought so too
What if I create a web page with a button, on button press tokens will be send from client to owner
That'll probably work right?
Sep 17, 2020, 2:04 PM
Sure, assuming the user has AN Ethereum client like Metamask
Sep 17, 2020, 2:33 PM
Ooh crap, didn't thought of that😐. What if they are sending from other wallets
How does those defi things work. Like if we send some ether to their address, it will automatically send back token...
Sep 17, 2020, 3:25 PM
I suggest you do some research into DeFi first and then think of what you would like to do with it
Sep 17, 2020, 3:42 PM
Check openzepplin
Sep 17, 2020, 5:01 PM

© 2024 Draquery.com All rights reserved.