This is a great article (Example on how to use ERC20 token in another contract) thank you, really clear.
However I am still struggling to understand how transferFrom can be used with addresses other than the contract’s own. For instance let’s say I hardcode an address at this line:
_token.transferFrom(from, 0x281Dc55606849A9BC00CeA79E2d657fCE6756A30, 1000);
I approve that address on truffle console:
But still I get the “ERC20: transfer amount exceeds allowance” error. I also get this error if I pass the address as an argument rather than hard code. Not exactly sure what mistake I am making here?