@rsksmart/safe-factory-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

logo

@rsksmart/safe-factory-sdk

RIF Safe Factory SDK

Coverage Status npm

npm i @rsksmart/safe-factory-sdk

Create a Safe account

It requires that both the GnosisSafeProxyFactory and the GnosisSafe have been deployed.

import { EthersSafeFactory } from '@rsksmart/safe-factory-sdk'

const proxyFactoryAddress = '0x<GnosisSafeProxyFactory address here>'
const safeSingletonAddress = '0x<GnosisSafe address here>'

const ethersSafeFactory = new EthersSafeFactory(
  signer,
  proxyFactoryAddress,
  safeSingletonAddress
)

const safeSdk = await ethersSafeFactory.createSafe({
  owners: ['0x1234...', '0xabcd...', '0x0987...'],
  threshold: 2
})

For the SafeSDK usage, please have a look at the official documentation.

Run for development

Install dependencies:

npm i

Run a local network

npx hardhat node

Tests

Run unit tests with

npx hardhat test

With Coverage:

npm run test:coverage

Lint & formatting

npm run format
npm run lint

Build

npm run build

Readme

Keywords

Package Sidebar

Install

npm i @rsksmart/safe-factory-sdk

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

5.25 MB

Total Files

9

Last publish

Collaborators

  • icalisalvo-iovlabs
  • jessgusclark