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.
It allows the creation of a safe account using the ProxyFactory
and the SafeSingleton
addresses.
Pre-requirements:
Contract | Address |
---|---|
SafeSingleton | 0xc6cfa90ff601d6aac45d8dcf194cf38b91aca368 |
ProxyFactory | 0x4b1af52ea200baebf79450dbc996573a7b75f65a |
Contract | Address |
---|---|
SafeSingleton | 0xffd41b816f2821e579b4da85c7352bf4f17e4fa5 |
ProxyFactory | 0x5b836117aed4ca4dee8e2e464f97f7f59b426c5a |
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 Rootstock networks, you can use the contracts already deployed on MAINNET OR TESTNET.
owners: str[]
- list of owner addressesthreshold: 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.
Please refer to the official Gnosis Safe guide
Go to top