Using Predeployed Multisig

Instructions provided here are for general purposes only on how to transition a SKALE Chain from a single owner account to a multisig. You are highly encouraged to apply your own security evaluations, processes, and reviews to suit a multisig setup to your specific security needs.

To use Gnosis MultiSigWallet for SKALE Chain owner administration, follow the instructions below, which are based on the tools and steps provided here: https://github.com/gnosis/MultiSigWallet.

These instructions are for Gnosis' MultiSigWallet, which has been depreciated for Gnosis SAFE. See here for instructions using Gnosis SAFE.
Diagram

SKALE Chain Setup

Before proceeding, be sure your SKALE Chain is deployed and assigned ownership to a single account and is funded with sFUEL. The SKALE Chain will have several predeployed contracts including Marionette and a predeployed Gnosis MultiSigWallet. These instructions detail how to interact with the predeployed multisig.
  1. Add your SKALE Chain endpoint to Metamask.

  2. Setup a Gnosis MultiSigWallet local server or use a ready-made instance on IPFS using this link: https://github.com/gnosis/MultiSigWallet#an-instance-of-multisig-website-is-available-on-ipfs-at-httpsipfsinfuraioipfsqmfrd4guqzobni2nt2c77a3utq452ffwstr4fjejixugjf

  3. Select your SKALE Chain endpoint in Metamask.

  4. Click Unlock Metamask in the MultiSig UI.

  5. Click Add button.

  6. Click Restore deployed wallet to add the already deployed multisig.

  7. Add the name and address of the multisig and click OK.

From here,

  • You can now edit the required confirmations: multisig confirmations

  • Add additional owners by clicking the multisig name, multisig add owners

    And then add additional owners: multisig owners

Sending Multisig Transaction

  1. Click the name of your deployed multisig to view the multisig details.

  2. Click Add in the "Multisig transactions" box. A modal will appear with further inputs.

    multisig add

  3. Enter the contract address, name (optional), and paste in the contract ABI. For example, if you want to permit another address to deploy contracts, paste in the DeploymentControl ABI (https://github.com/skalenetwork/predeployed/blob/master/deploy-control/DeploymentController.abi) and contract address 0xD2002000000000000000000000000000000000D2.

  4. After a moment, the Method field should populate with the available methods.

  5. Select the method to execute, and add any additional information. For example, select addToWhitelist and enter the address to allow deployment permissions.

  6. Click Send multisig transaction.

  7. The multisig will then request the various owners to sign off on the transaction.

  8. Send the deployed multisig address to each owner so they each can load the multisig.

Signing transactions

Each multisig signer should follow the instructions for signing transactions:

  1. Add the SKALE Chain to Metamask.

  2. Setup a local server or use a ready-made instance on IPFS using this link: https://github.com/gnosis/MultiSigWallet#an-instance-of-multisig-website-is-available-on-ipfs-at-httpsipfsinfuraioipfsqmfrd4guqzobni2nt2c77a3utq452ffwstr4fjejixugjf

  3. Select the SKALE Chain endpoint in Metamask to which the multisig will be deployed.

  4. Click Unlock Metamask in the MultiSig UI.

  5. Click Add button to add a Multisig.

  6. Click Restore deployed wallet to add an already deployed multisig.

  7. Add the name and address of the multisig and click OK.

  8. Click the multisig name and you should see the pending transaction.

  9. Click Confirm to sign the transaction.

  10. Wait until the other required signers signoff, and then the transaction will finally execute. multisig signoff

SKALE Chain Administration with Multisig

Assuming that your Multisig is setup, the following example demonstrates performing administrative actions. Say you want to enableAutomaticDeploy in the TokenManagerERC20 IMA SKALE Chain contract.

  1. Transfer Admin role to the Multisig

    To transfer admin of the contract to the multisig, you can use Hardhat console (https://hardhat.org/guides/hardhat-console.html) using the SKALE Chain owner address assigned at deployment. First, grant the admin role to the multisig, then follow by revoking the admin role from the original owner address at deployment.

    > const multisigWalletAddress = '<DEPLOYED-MULTISIG-ADDRESS';
    undefined
    
    > await tokenManagerERC20.grantRole(await tokenManagerERC20.DEFAULT_ADMIN_ROLE(), multisigWalletAddress)
    undefined
    
    >await tokenManagerERC20.revokeRole(await tokenManagerERC20.DEFAULT_ADMIN_ROLE(), schainOwner.address);
    undefined
  2. Enable Automatic Deployment using Multisig

    Now that the multisig is granted the admin role, you can issue the transaction to enable automatic deployment. First you might want to check whether it’s enabled or now, again using Hardhat console:

    > await tokenManagerERC20.automaticDeploy()
    false

    Assuming this returns false, then proceed under Sending MultiSig Transaction and use the ABI for the TokenManagerERC20, and select enableAutomaticDeploy.