RIF Multisig SDK - creation

Required packages:

There are two ways for creating Multisig accounts:

Important: all the SDKs and the sample apps described support Safe contracts v1.2.0 so far.

SafeFactory

It allows the creation of a safe account using the ProxyFactory and the SafeSingleton addresses.

Pre-requirements:

  • A) Contract addresses deployed on RSK
    • Developers interacting with the RSK networks can use the address of the contracts already deployed
      • MAINNET

        Contract Address
        SafeSingleton 0xc6cfa90ff601d6aac45d8dcf194cf38b91aca368
        ProxyFactory 0x4b1af52ea200baebf79450dbc996573a7b75f65a
      • TESTNET

        Contract Address
        SafeSingleton 0xffd41b816f2821e579b4da85c7352bf4f17e4fa5
        ProxyFactory 0x5b836117aed4ca4dee8e2e464f97f7f59b426c5a
  • B) Create a SafeFactory instance
    import { EthersSafeFactory } from '@gnosis.pm/safe-core-sdk'
    
    const safeFactory = new EthersSafeFactory(
      signer,
      proxyFactoryAddress,
      safeSingletonAddress
    )
    

    If you are working on RSK networks, you can use the contracts already deployed on MAINNET OR TESTNET.

  • C) Create a Safe
    • Parameters
      • owners: str[] - list of owner addresses
      • threshold: number - the minimum number of owner approvals required to execute a safe transaction.
    const safeSdk = await safeFactory.createSafe({
      owners: ['0x1234...', '0xabcd...', '0x0987...'],
      threshold: 2
    })
    

For further information on how to set up a safe account and how to choose the right parameters, please refer to the official guidelines.

UI

Please refer to the official Gnosis Safe guide