Skip to content

Commit

Permalink
chore: merge main into development (#424)
Browse files Browse the repository at this point in the history
* Update predictedSafe docs (#423)

* Update version numbers (#422)
  • Loading branch information
germartinez authored May 3, 2023
1 parent 545564c commit f2e8e82
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 23 deletions.
8 changes: 4 additions & 4 deletions packages/account-abstraction-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/account-abstraction-kit-poc",
"version": "0.1.0-alpha.1",
"version": "1.0.0",
"description": "Safe Account Abstraction Kit PoC",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -34,9 +34,9 @@
"access": "public"
},
"dependencies": {
"@safe-global/protocol-kit": "^0.1.1",
"@safe-global/relay-kit": "^0.1.1",
"@safe-global/safe-core-sdk-types": "^1.10.1",
"@safe-global/protocol-kit": "^1.0.0",
"@safe-global/relay-kit": "^1.0.0",
"@safe-global/safe-core-sdk-types": "^2.0.0",
"ethereumjs-util": "^7.1.5",
"ethers": "^5.7.2"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/api-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/api-kit",
"version": "1.0.1",
"version": "1.1.0",
"description": "Safe API Kit",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -38,7 +38,7 @@
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.2.2",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@safe-global/protocol-kit": "^0.1.1",
"@safe-global/protocol-kit": "^1.0.0",
"@types/chai": "^4.3.4",
"@types/chai-as-promised": "^7.1.5",
"@types/mocha": "^10.0.1",
Expand All @@ -56,7 +56,7 @@
},
"dependencies": {
"@ethersproject/abstract-signer": "^5.7.0",
"@safe-global/safe-core-sdk-types": "^1.10.1",
"@safe-global/safe-core-sdk-types": "^2.0.0",
"node-fetch": "^2.6.6"
}
}
6 changes: 3 additions & 3 deletions packages/auth-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/auth-kit",
"version": "0.1.1",
"version": "1.0.0",
"description": "Authentication library for web2 logins",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -43,8 +43,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@safe-global/api-kit": "^1.0.1",
"@safe-global/protocol-kit": "^0.1.1",
"@safe-global/api-kit": "^1.1.0",
"@safe-global/protocol-kit": "^1.0.0",
"@walletconnect/client": "^1.8.0",
"ethers": "^5.7.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/onramp-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/onramp-kit",
"version": "0.1.1",
"version": "1.0.0",
"description": "Onramp library",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
36 changes: 33 additions & 3 deletions packages/protocol-kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,29 @@ const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, callback })
### create
Returns an instance of the Protocol Kit connected to the `safeAddress`.
Returns an instance of the Protocol Kit connected to a Safe. The provided Safe must be a `safeAddress` or a `predictedSafe`.
Initialization of a deployed Safe using the `safeAddress` property:
```js
import Safe from '@safe-global/protocol-kit'

const safeSdk = await Safe.create({ ethAdapter, safeAddress })
```
Initialization of a not deployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to initialize the SDK with the Safe configuration and use it to some extent before it is deployed:
```js
import Safe, { PredictedSafeProps } from '@safe-global/protocol-kit'

const predictedSafe: PredictedSafeProps = {
safeAccountConfig,
safeDeploymentConfig
}

const safeSdk = await Safe.create({ ethAdapter, predictedSafe })
```
- The `isL1SafeMasterCopy` flag
There are two versions of the Safe contracts: [GnosisSafe.sol](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafe.sol) that does not trigger events in order to save gas and [GnosisSafeL2.sol](https://github.com/safe-global/safe-contracts/blob/v1.3.0/contracts/GnosisSafeL2.sol) that does, which is more appropriate for L2 networks.
Expand Down Expand Up @@ -330,10 +345,25 @@ const safeSdk = await Safe.create({ ethAdapter, safeAddress })
### connect
Returns a new instance of the Protocol Kit connected to the `safeAddress`.
Returns a new instance of the Protocol Kit connected to a new Safe or a new Signer. The new connected signer can be passed via the `ethAdapter` property while the new connected Safe can be passed using a `safeAddress` or a `predictedSafe`.
Connection of a deployed Safe using the `safeAddress` property:
```js
const safeSdk = await safeSdk.connect({ ethAdapter, safeAddress })
```
Connection of a not deployed Safe using the `predictedSafe` property. Because Safes are deployed in a deterministic way, passing a `predictedSafe` will allow to connect a Safe to the SDK with the Safe configuration:
```js
const safeSdk2 = await safeSdk.connect({ ethAdapter, safeAddress })
import { PredictedSafeProps } from '@safe-global/protocol-kit'

const predictedSafe: PredictedSafeProps = {
safeAccountConfig,
safeDeploymentConfig
}

const safeSdk = await safeSdk.connect({ ethAdapter, predictedSafe })
```
- The `isL1SafeMasterCopy` flag
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/protocol-kit",
"version": "0.1.1",
"version": "1.0.0",
"description": "SDK to interact with Safe smart contracts",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -53,7 +53,7 @@
"@nomiclabs/hardhat-ethers": "^2.2.2",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@safe-global/safe-core-sdk-types": "^1.10.1",
"@safe-global/safe-core-sdk-types": "^2.0.0",
"@typechain/ethers-v5": "^10.2.0",
"@typechain/web3-v1": "^6.0.2",
"@types/chai": "^4.3.4",
Expand Down
6 changes: 3 additions & 3 deletions packages/relay-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/relay-kit",
"version": "0.1.1",
"version": "1.0.0",
"description": "Safe Relay Kit",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -36,8 +36,8 @@
},
"dependencies": {
"@gelatonetwork/relay-sdk": "^3.1.0",
"@safe-global/protocol-kit": "^0.1.1",
"@safe-global/safe-core-sdk-types": "^1.10.1",
"@safe-global/protocol-kit": "^1.0.0",
"@safe-global/safe-core-sdk-types": "^2.0.0",
"ethers": "^5.7.2"
}
}
2 changes: 1 addition & 1 deletion packages/safe-core-sdk-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-core-sdk-types",
"version": "1.10.1",
"version": "2.0.0",
"description": "Safe Core SDK types",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/safe-ethers-adapters/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-ethers-adapters",
"version": "0.1.0-alpha.16",
"version": "0.2.0-alpha.0",
"description": "Safe Ethers Adapters",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down Expand Up @@ -56,8 +56,8 @@
"@ethersproject/properties": "^5.7.0"
},
"dependencies": {
"@safe-global/protocol-kit": "^0.1.1",
"@safe-global/safe-core-sdk-types": "^1.10.1",
"@safe-global/protocol-kit": "^1.0.0",
"@safe-global/safe-core-sdk-types": "^2.0.0",
"@safe-global/safe-deployments": "^1.22.0",
"axios": "^0.27.2"
}
Expand Down

0 comments on commit f2e8e82

Please sign in to comment.