Add multisig contracts
Clarification and motivation
There are some multisig contracts that some people (including us) use in some projects. I think it would be nice to implement them in Lorentz (they are small, so it's easy, moreover we've already done that for one of them). The reasons for that are:
- It makes it easier to automate deployment of multisig contract, you don't have to copy-paste it to your repo and somehow embed into your code, you can simple depend on a library with it.
- It makes it easier to modify them for one's needs, e. g. make errors more descriptive. There is a concern that we shouldn't touch them because they are more or less trusted and if we modify them we'll lose some trust. But it depends on a particular case.
- It also makes it easier to use it with our testing eDSL.
- Even if you don't need to deploy it, you may need to interact with it, in which case you need its parameter type at least.
- Create a new package called
- Add three smart contracts (1 per each multisig contract).
- Add CLI to print them.
- Port tests from !74 (diffs), probably expand them to work with each contract.
- Reference contracts fail with unit, but we want more descriptive messages. But if we use descriptive messages, we lose "is the same as the reference contract" property which is nice to have. So I propose to add some sort of argument that specifies which errors to use and propagate it to CLI, so that I can print version with unit errors or with descriptive errors.
- I think it makes sense to also make kinda "golden" tests, i. e. put Michelson versions of those contracts into the repo and assert that our contracts are the same.
P. S. I heard that now multisig contracts also use
chain_id, but I can't find its usage in the linked repo. Maybe contracts there are obsolete and there are newer versions somewhere (e. g. in
tezos/tezos), please check that.