Nettle Pie Market

    This package has been deprecated

    Author message:

    Package no longer supported. It has been migrated to @safe-global/safe-ethers-lib. Please, update your dependencies.

    @gnosis.pm/safe-ethers-lib
    TypeScript icon, indicating that this package has built-in type declarations

    1.7.0 • Public • Published

    Safe Ethers Lib

    NPM Version GitHub Release GitHub

    Ethers.js wrapper that contains some utilities and the Safe contracts types (generated with typechain ethers-v5). It is used to initialize the Safe Core SDK.

    Table of contents

    Installation

    Install the package with yarn or npm:

    yarn install
    npm install

    Build

    Build the package with yarn or npm:

    yarn build
    npm build

    Initialization

    If the app integrating the SDK is using Ethers v5, create an instance of the EthersAdapter, where signer is the Ethereum account we are connecting and the one who will sign the transactions.

    import { ethers } from 'ethers'
    import EthersAdapter from '@gnosis.pm/safe-ethers-lib'
    
    const web3Provider = // ...
    const provider = new ethers.providers.Web3Provider(web3Provider)
    const safeOwner = provider.getSigner(0)
    
    const ethAdapter = new EthersAdapter({
      ethers,
      signer: safeOwner
    })

    In case the ethAdapter instance is only used to execute read-only methods the signerAddress property can be omitted.

    const readOnlyEthAdapter = new EthersAdapter({ ethers })

    License

    This library is released under MIT.

    Contributors

    Install

    npm i @gnosis.pm/safe-ethers-lib

    DownloadsWeekly Downloads

    6,421

    Version

    1.7.0

    License

    MIT

    Unpacked Size

    550 kB

    Total Files

    171

    Last publish

    Collaborators

    • alfetopito
    • anxolin
    • auryn
    • bh2smith
    • dasanra
    • fedgiac
    • fleupold
    • germartinez
    • giacomo.licari
    • gnosisdex
    • josojo
    • katspaugh
    • luarx
    • mikheevm
    • nlordell
    • rmeissner
    • stefan.george
    • w3stside