Skip to content

Commit f2e8e82

Browse files
authored
chore: merge main into development (#424)
* Update predictedSafe docs (#423) * Update version numbers (#422)
1 parent 545564c commit f2e8e82

File tree

9 files changed

+53
-23
lines changed

9 files changed

+53
-23
lines changed

packages/account-abstraction-kit/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/account-abstraction-kit-poc",
3-
"version": "0.1.0-alpha.1",
3+
"version": "1.0.0",
44
"description": "Safe Account Abstraction Kit PoC",
55
"main": "dist/src/index.js",
66
"typings": "dist/src/index.d.ts",
@@ -34,9 +34,9 @@
3434
"access": "public"
3535
},
3636
"dependencies": {
37-
"@safe-global/protocol-kit": "^0.1.1",
38-
"@safe-global/relay-kit": "^0.1.1",
39-
"@safe-global/safe-core-sdk-types": "^1.10.1",
37+
"@safe-global/protocol-kit": "^1.0.0",
38+
"@safe-global/relay-kit": "^1.0.0",
39+
"@safe-global/safe-core-sdk-types": "^2.0.0",
4040
"ethereumjs-util": "^7.1.5",
4141
"ethers": "^5.7.2"
4242
}

packages/api-kit/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/api-kit",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"description": "Safe API Kit",
55
"main": "dist/src/index.js",
66
"typings": "dist/src/index.d.ts",
@@ -38,7 +38,7 @@
3838
"devDependencies": {
3939
"@nomiclabs/hardhat-ethers": "^2.2.2",
4040
"@nomiclabs/hardhat-web3": "^2.0.0",
41-
"@safe-global/protocol-kit": "^0.1.1",
41+
"@safe-global/protocol-kit": "^1.0.0",
4242
"@types/chai": "^4.3.4",
4343
"@types/chai-as-promised": "^7.1.5",
4444
"@types/mocha": "^10.0.1",
@@ -56,7 +56,7 @@
5656
},
5757
"dependencies": {
5858
"@ethersproject/abstract-signer": "^5.7.0",
59-
"@safe-global/safe-core-sdk-types": "^1.10.1",
59+
"@safe-global/safe-core-sdk-types": "^2.0.0",
6060
"node-fetch": "^2.6.6"
6161
}
6262
}

packages/auth-kit/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/auth-kit",
3-
"version": "0.1.1",
3+
"version": "1.0.0",
44
"description": "Authentication library for web2 logins",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",
@@ -43,8 +43,8 @@
4343
"react-dom": "^18.2.0"
4444
},
4545
"dependencies": {
46-
"@safe-global/api-kit": "^1.0.1",
47-
"@safe-global/protocol-kit": "^0.1.1",
46+
"@safe-global/api-kit": "^1.1.0",
47+
"@safe-global/protocol-kit": "^1.0.0",
4848
"@walletconnect/client": "^1.8.0",
4949
"ethers": "^5.7.2"
5050
},

packages/onramp-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/onramp-kit",
3-
"version": "0.1.1",
3+
"version": "1.0.0",
44
"description": "Onramp library",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",

packages/protocol-kit/README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,29 @@ const safeSdk = await safeFactory.deploySafe({ safeAccountConfig, callback })
280280
281281
### create
282282
283-
Returns an instance of the Protocol Kit connected to the `safeAddress`.
283+
Returns an instance of the Protocol Kit connected to a Safe. The provided Safe must be a `safeAddress` or a `predictedSafe`.
284+
285+
Initialization of a deployed Safe using the `safeAddress` property:
284286
285287
```js
286288
import Safe from '@safe-global/protocol-kit'
287289

288290
const safeSdk = await Safe.create({ ethAdapter, safeAddress })
289291
```
290292
293+
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:
294+
295+
```js
296+
import Safe, { PredictedSafeProps } from '@safe-global/protocol-kit'
297+
298+
const predictedSafe: PredictedSafeProps = {
299+
safeAccountConfig,
300+
safeDeploymentConfig
301+
}
302+
303+
const safeSdk = await Safe.create({ ethAdapter, predictedSafe })
304+
```
305+
291306
- The `isL1SafeMasterCopy` flag
292307
293308
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.
@@ -330,10 +345,25 @@ const safeSdk = await Safe.create({ ethAdapter, safeAddress })
330345
331346
### connect
332347
333-
Returns a new instance of the Protocol Kit connected to the `safeAddress`.
348+
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`.
349+
350+
Connection of a deployed Safe using the `safeAddress` property:
351+
352+
```js
353+
const safeSdk = await safeSdk.connect({ ethAdapter, safeAddress })
354+
```
355+
356+
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:
334357
335358
```js
336-
const safeSdk2 = await safeSdk.connect({ ethAdapter, safeAddress })
359+
import { PredictedSafeProps } from '@safe-global/protocol-kit'
360+
361+
const predictedSafe: PredictedSafeProps = {
362+
safeAccountConfig,
363+
safeDeploymentConfig
364+
}
365+
366+
const safeSdk = await safeSdk.connect({ ethAdapter, predictedSafe })
337367
```
338368
339369
- The `isL1SafeMasterCopy` flag

packages/protocol-kit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/protocol-kit",
3-
"version": "0.1.1",
3+
"version": "1.0.0",
44
"description": "SDK to interact with Safe smart contracts",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",
@@ -53,7 +53,7 @@
5353
"@nomiclabs/hardhat-ethers": "^2.2.2",
5454
"@nomiclabs/hardhat-waffle": "^2.0.3",
5555
"@nomiclabs/hardhat-web3": "^2.0.0",
56-
"@safe-global/safe-core-sdk-types": "^1.10.1",
56+
"@safe-global/safe-core-sdk-types": "^2.0.0",
5757
"@typechain/ethers-v5": "^10.2.0",
5858
"@typechain/web3-v1": "^6.0.2",
5959
"@types/chai": "^4.3.4",

packages/relay-kit/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/relay-kit",
3-
"version": "0.1.1",
3+
"version": "1.0.0",
44
"description": "Safe Relay Kit",
55
"main": "dist/src/index.js",
66
"typings": "dist/src/index.d.ts",
@@ -36,8 +36,8 @@
3636
},
3737
"dependencies": {
3838
"@gelatonetwork/relay-sdk": "^3.1.0",
39-
"@safe-global/protocol-kit": "^0.1.1",
40-
"@safe-global/safe-core-sdk-types": "^1.10.1",
39+
"@safe-global/protocol-kit": "^1.0.0",
40+
"@safe-global/safe-core-sdk-types": "^2.0.0",
4141
"ethers": "^5.7.2"
4242
}
4343
}

packages/safe-core-sdk-types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/safe-core-sdk-types",
3-
"version": "1.10.1",
3+
"version": "2.0.0",
44
"description": "Safe Core SDK types",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",

packages/safe-ethers-adapters/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/safe-ethers-adapters",
3-
"version": "0.1.0-alpha.16",
3+
"version": "0.2.0-alpha.0",
44
"description": "Safe Ethers Adapters",
55
"main": "dist/src/index.js",
66
"typings": "dist/src/index.d.ts",
@@ -56,8 +56,8 @@
5656
"@ethersproject/properties": "^5.7.0"
5757
},
5858
"dependencies": {
59-
"@safe-global/protocol-kit": "^0.1.1",
60-
"@safe-global/safe-core-sdk-types": "^1.10.1",
59+
"@safe-global/protocol-kit": "^1.0.0",
60+
"@safe-global/safe-core-sdk-types": "^2.0.0",
6161
"@safe-global/safe-deployments": "^1.22.0",
6262
"axios": "^0.27.2"
6363
}

0 commit comments

Comments
 (0)