Safe Ethers Adapters
Ethers adapter that facilitates the interaction with the Safe Services
Getting StartedThe only adapter currently provided is the
SafeEthersSignerwhich implements the
Signerinterface from Ethers.
SafeEthersSignercan be used with Ethers Contracts to deploy and interact with them. Each of these interactions will create a Safe transaction that is published to the Safe transaction service.
For this to work it is required to initialize the
SafeEthersSignerwith an account that is either an owner of the specified Safe or a delegate of one of the owners.
An example for such an account would be the private key of one of the owners that is used with an Ethers Wallet
const signer = new Wallet("some_private_key", ethereumProvider)
It is also necessary to specify a service instance that should be used to publish the Safe transactions. An example for this would be the Mainnet instance of the Safe Transaction Service:
const service = new SafeService("some_service_url")
Using these components it is possible to create an instance of the
const safeSigner = await SafeEthersSigner.create("some_safe_address", signer, service)
See examples for more information.
InstallationSelect correct nvm version:
Install the package with yarn or npm:
yarn install npm install
BuildBuild the package with yarn or npm:
yarn build npm build