-
Ivan Gromakovskii authored
Problem: some contracts contain functionality present in our AbstractLedger and ManagedLedger contracts. If we want to reuse that functionality we have to depend on whole `lorentz-contracts` package which contains some stuff besides these ledgers. So current structure of packages adds unnecessary dependencies to contracts that reuse ledger code. Solution: 1. Create `morley-ledgers` package. I decided to avoid naming Lorentz there because one day it may be implemented with Indigo. Probably it will always be based on `morley`, hence it is in the name. It contains ManagedLedger and AbstractLedger. 2. Move `contractConsumer` into `Lorentz.Test`. It is pretty small and is generally useful for testing. 3. Also rename `lorentz-contracts-test` to `morley-ledgers-test` because it contains tests only for `morley-ledgers`. Note that I mostly preserve module names even if they refer to Lorentz. Currently contracts are still implemented using Lorentz and we don't want to make unnecessary breaking changes. Also note that I didn't bother changing anything in pkgs.nix and didn't test `nix` side of things because primary user of it is George and according to him he will nixify the repo differently.