you deposit tokens into the contract... should first transferFrom and then add the value to the contract variable, isn't it?
oldbalance = token.balanceOf(address(this)); token.transferFrom(); amount = token.balanceOf(address(this)) - oldbalance;
Обсуждают сегодня