Multisig Wrapper

While there is a Generic Multisig Contract that allows a quorum of signers to approve arbitrary Michelson commands on the blockchain, it behaves more like a user whose arbitrary action is voted upon than a gatekeeper.

What is meant by "arbitrary action"? That generic multisig contract accepts arbitrary Michelson code as its main input: signers need to know what this code is doing to know what they're voting on.

We use another approach: the multisig contract is specialized to the particular contract you'd like to use it with and will only perform:

  • The exact actions your contract expects
  • Two actions to maintain the multisig functionality.

This prevents any action that the base contract does not support from being executed.

There are four main steps to setting up and interacting with a wrapped multisig contract:

  1. Use lorentz-contract with lorentz-contract-storage command line tools to originate your contract with multisig functionality

  2. Make a parameter file for an action you want to perform

  3. Sign the file with a quorum of users

  4. Submit the file to the multisig-wrapped contract

Setting up

Don't forget to set ALICE_ADDRESS to the address of the test network wallet!

ALICE_ADDRESS="tz1L2UAwwU4k2nxjzB2mTnxW61wCcWaZeYkp"

Getting your public key

We'll want our public/private keys to work with the client:

Here's a convenient way to get them, assuming tezos-client has registered/activated your account:

get_public_key(){ tezos-client show address $1 2>/dev/null | tail -n 1 | cut -d " " -f 3;}
get_secret_key(){ tezos-client show address $1 -S 2>/dev/null | tail -n 1 | cut -d ":" -f 3;}
$ get_public_key alice
edpktkQJBwKE8kVMgppcMkBtThaRx4uJm37qcuEKAL4hC4Hn579YDW