smart_contract icon indicating copy to clipboard operation
smart_contract copied to clipboard

Separate ERC223 contract

Open JonathonDunford opened this issue 7 years ago • 0 comments

So, ERC223 brought about a new transfer function that cuts the gas necessary in half.

However, we can't bundle both ERC20's old transfer methods and ERC223's new transfer as solidity doesn't allow us to check what type the requested token is AFAIK.

The current smart_contract.sol in this repo "supports" ERC223 by using a fallback, but it still goes through approve and transferFrom .

I propose that, for future proofing, we create some sort of system where each protocol (ERC20, ERC223) can have a separate contract. Then, the interface calls the contracts based on the type of token. That way, we can utilize each protocol's benefits. This would also allow us to add future protocols with ease as we would simply create a new contract for the protocol instead of editing an old one.

This is not necessary NOW, but would be a welcome addition in the future.

JonathonDunford avatar Mar 05 '18 03:03 JonathonDunford