We will be using the below set of instructions as a conversation piece.
- Fork this repo on your own github account and clone your forked repo.
- Work inside this cloned folder. Don't push anything as others shouldn't see your work (for now).
- You will need to install truffle globally: https://www.trufflesuite.com/docs/truffle/getting-started/installation
- We will be using an ERC20 contract: /~https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md. There is already a sample ERC20 implementation included under the contracts folder.
- Do a couple of transfers between addresses, this can be in a truffle test. Explore the contract, I will be asking questions about it.
- Next, migrate the
balances
into its own contract. The goal is to separate state (balances) and logic (rules around what balances can do). This does not mean that the balances contract won't have any rules, think about permissions. Ideally I will want to see the original ERC20 contract as well as the new ones. - Think about why 6 is a good/bad idea.
- Deploy your new contracts and do some transfers, add some tests.
- Spend some time thinking/googling about all of the above.