web3.swift
web3.swift copied to clipboard
Refactored code to protocol oriented
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