Skip to content

Commit

Permalink
Merge pull request #163 from gnosis/update-docs
Browse files Browse the repository at this point in the history
Update imports and docs
  • Loading branch information
germartinez authored Jan 31, 2022
2 parents eed8493 + 9231806 commit 85bb9b7
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 20 deletions.
8 changes: 4 additions & 4 deletions packages/guides/integrating-the-safe-core-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ The [Safe Core SDK](https://github.com/gnosis/safe-core-sdk/tree/main/packages/s

* **Using ethers.js**

We can use the class `EthersAdapter` from `@gnosis.pm/safe-core-sdk` as the wrapper for `ethers.js`.
We can use the class `EthersAdapter` from `@gnosis.pm/safe-ethers-lib` as the wrapper for `ethers.js`.

```js
import { EthersAdapter } from '@gnosis.pm/safe-core-sdk'
import EthersAdapter from '@gnosis.pm/safe-ethers-lib'
import { ethers } from 'ethers'

const web3Provider = // ...
Expand All @@ -59,10 +59,10 @@ The [Safe Core SDK](https://github.com/gnosis/safe-core-sdk/tree/main/packages/s

* **Using web3.js**

We can use the class `Web3Adapter` from `@gnosis.pm/safe-core-sdk` as the wrapper for `web3.js`.
We can use the class `Web3Adapter` from `@gnosis.pm/safe-web3-lib` as the wrapper for `web3.js`.

```js
import { Web3Adapter } from '@gnosis.pm/safe-core-sdk'
import Web3Adapter from '@gnosis.pm/safe-web3-lib'
import Web3 from 'web3'

const ethAdapter = new Web3Adapter({
Expand Down
4 changes: 2 additions & 2 deletions packages/safe-core-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The following steps show how to set up the Safe Core SDK, deploy a new Safe, cre

```js
import { ethers } from 'ethers'
import { EthersAdapter } from '@gnosis.pm/safe-core-sdk'
import EthersAdapter from '@gnosis.pm/safe-ethers-lib'

const web3Provider = // ...
const provider = new ethers.providers.Web3Provider(web3Provider)
Expand All @@ -61,7 +61,7 @@ The following steps show how to set up the Safe Core SDK, deploy a new Safe, cre

```js
import Web3 from 'web3'
import { Web3Adapter } from '@gnosis.pm/safe-core-sdk'
import Web3Adapter from '@gnosis.pm/safe-web3-lib'

const ethAdapterOwner1 = new Web3Adapter({
web3,
Expand Down
4 changes: 2 additions & 2 deletions packages/safe-core-sdk/tests/utils/setupEthAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Signer } from '@ethersproject/abstract-signer'
import { EthAdapter } from '@gnosis.pm/safe-core-sdk-types'
import { EthersAdapter, EthersAdapterConfig } from '@gnosis.pm/safe-ethers-lib'
import { Web3Adapter, Web3AdapterConfig } from '@gnosis.pm/safe-web3-lib'
import EthersAdapter, { EthersAdapterConfig } from '@gnosis.pm/safe-ethers-lib'
import Web3Adapter, { Web3AdapterConfig } from '@gnosis.pm/safe-web3-lib'
import { ethers, web3 } from 'hardhat'

export async function getEthAdapter(signer: Signer): Promise<EthAdapter> {
Expand Down
3 changes: 2 additions & 1 deletion packages/safe-ethers-adapters/examples/creation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { JsonRpcProvider } from '@ethersproject/providers'
import { Wallet } from '@ethersproject/wallet'
import Safe, { EthersAdapter } from '@gnosis.pm/safe-core-sdk'
import Safe from '@gnosis.pm/safe-core-sdk'
import EthersAdapter from '@gnosis.pm/safe-ethers-lib'
import dotenv from 'dotenv'
import { ethers } from 'ethers'
import { SafeEthersSigner, SafeService } from '../src'
Expand Down
3 changes: 2 additions & 1 deletion packages/safe-ethers-adapters/examples/interaction.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Contract } from '@ethersproject/contracts'
import { JsonRpcProvider } from '@ethersproject/providers'
import { Wallet } from '@ethersproject/wallet'
import Safe, { EthersAdapter } from '@gnosis.pm/safe-core-sdk'
import Safe from '@gnosis.pm/safe-core-sdk'
import EthersAdapter from '@gnosis.pm/safe-ethers-lib'
import dotenv from 'dotenv'
import { ethers } from 'ethers'
import { SafeEthersSigner, SafeService } from '../src'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { MultiSendContract } from '@gnosis.pm/safe-core-sdk-types'
import { MultiSend as MultiSend_V1_1_1 } from '../../../typechain/src/ethers-v5/v1.1.1/MultiSend'
import {
MultiSend as MultiSend_V1_3_0,
MultiSendInterface
} from '../../../typechain/src/ethers-v5/v1.3.0/MultiSend'
import MultiSendContract from './MultiSendContract'

abstract class MultiSendEthersContract implements MultiSendContract {
constructor(public contract: MultiSend_V1_1_1 | MultiSend_V1_3_0) {}
Expand Down
2 changes: 1 addition & 1 deletion packages/safe-ethers-lib/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EthersAdapter, { EthersAdapterConfig } from './EthersAdapter'

export default EthersAdapter
export { EthersAdapterConfig, EthersAdapter }
export { EthersAdapterConfig }
2 changes: 1 addition & 1 deletion packages/safe-service-client/tests/endpoint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getDefaultProvider } from '@ethersproject/providers'
import { Wallet } from '@ethersproject/wallet'
import Safe from '@gnosis.pm/safe-core-sdk'
import { SafeTransactionDataPartial } from '@gnosis.pm/safe-core-sdk-types'
import { EthersAdapter } from '@gnosis.pm/safe-ethers-lib'
import EthersAdapter from '@gnosis.pm/safe-ethers-lib'
import chai from 'chai'
import chaiAsPromised from 'chai-as-promised'
import { ethers } from 'hardhat'
Expand Down
2 changes: 1 addition & 1 deletion packages/safe-web3-lib/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3Adapter, { Web3AdapterConfig } from './Web3Adapter'

export default Web3Adapter
export { Web3AdapterConfig, Web3Adapter }
export { Web3AdapterConfig }

0 comments on commit 85bb9b7

Please sign in to comment.