I implemented the function tokenFallback from ERC223 (https://github.com/ethereum/EIPs/issues/223) as a way to receive ERC20 tokens from transfers. This works in a similar way as onERC721Received. Also implemented the bytes _data version of transfer from ERC223 that works with tokenFallback.
The getToken function was implemented as a way to support ERC20 tokens that do support ERC223. This is a two step process. The composable is first approved to transfer tokens and then getToken is called to get the tokens. This works the same ways as getChild.
I fixed the tests with these changes and I uncommented some tests and fixed those too.
I am not sure that using "token" in a plural way is a good idea. Maybe it should be "tokens" or some other name scheme.
Changes to ERC998PossessERC20.sol
tokenFallback
from ERC223 (https://github.com/ethereum/EIPs/issues/223) as a way to receive ERC20 tokens from transfers. This works in a similar way asonERC721Received
. Also implemented thebytes _data
version oftransfer
from ERC223 that works withtokenFallback
.getToken
function was implemented as a way to support ERC20 tokens that do support ERC223. This is a two step process. The composable is first approved to transfer tokens and thengetToken
is called to get the tokens. This works the same ways asgetChild
.