RIF Multisig SDK - creation
Required packages:
There are two ways for creating Multisig accounts:
- Safe Factory
- Manual creation through Gnosis Safe UI
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:
- ProxyFactory contract deployment
- SafeSingleton contract deployment
- Developers interacting with the RSK networks can use the address of the contracts already deployed
-
Parameters
-
signer: Signer
- ethers Signer -
proxyFactoryAddress: str
- address of the deployed ProxyFactory contract -
safeSingletonAddress: str
- address of the deployed SafeSingleton contract
-
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.
-
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