I'm developing a blockchain project where I have two separate contracts, the ERC20 token contract and the Main one that contains the application logic. I need to be able to move users' tokens as I like from the main contract without having them do anything. How can I control users balances from the external contract?

Thank you a lot, I'm new to Ethereum developing and trying to learn.


You just need to create a function in contracts which burns the tokens from current contract and another function which updates the token in mapping.

Keep the function only admin accessible, and call the functions.

  • Alternatively, just have the allowance for everyone from the main contract be unlimited, so it can always do a transferFrom
    – natewelch_
    Jul 21 '18 at 17: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.