web3.swift icon indicating copy to clipboard operation
web3.swift copied to clipboard

Refactored code to protocol oriented

Open acoroian opened this issue 7 years ago • 0 comments

Hello,

I have refactored the code to protocol oriented. This cleaned up some single responsibility issues.

EthTypeEncoder - can be broken up to separate files for each extension Everything conforms to EthEncodable. The benefits are:

  • no more need to throw error if type is not encodable.
  • issues are seen at compile time
  • cleaner usage of encoder functions
  • people can extend their type to make it encodable and usable by library.

Code has not been tested but should work the same (unless i missed someting). TODO: Write tests to confirm everything is working

acoroian avatar May 31 '18 23:05 acoroian