@safe-global/protocol-kit 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE.md +9 -9
  2. package/README.md +1033 -1033
  3. package/dist/src/Safe.d.ts +51 -1
  4. package/dist/src/Safe.js +174 -17
  5. package/dist/src/Safe.js.map +1 -1
  6. package/dist/src/adapters/ethers/EthersAdapter.js +9 -10
  7. package/dist/src/adapters/ethers/EthersAdapter.js.map +1 -1
  8. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/SafeProxyFactoryEthersContract.js +1 -2
  9. package/dist/src/adapters/ethers/contracts/SafeProxyFactory/SafeProxyFactoryEthersContract.js.map +1 -1
  10. package/dist/src/adapters/web3/Web3Adapter.js +17 -17
  11. package/dist/src/adapters/web3/Web3Adapter.js.map +1 -1
  12. package/dist/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.js +1 -2
  13. package/dist/src/adapters/web3/contracts/SafeProxyFactory/SafeProxyFactoryWeb3Contract.js.map +1 -1
  14. package/dist/src/contracts/config.d.ts +1 -1
  15. package/dist/src/contracts/config.js +2 -2
  16. package/dist/src/contracts/config.js.map +1 -1
  17. package/dist/src/contracts/safeDeploymentContracts.js +16 -16
  18. package/dist/src/contracts/safeDeploymentContracts.js.map +1 -1
  19. package/dist/src/contracts/utils.js +26 -2
  20. package/dist/src/contracts/utils.js.map +1 -1
  21. package/dist/src/index.d.ts +4 -3
  22. package/dist/src/index.js +10 -2
  23. package/dist/src/index.js.map +1 -1
  24. package/dist/src/managers/contractManager.js +20 -15
  25. package/dist/src/managers/contractManager.js.map +1 -1
  26. package/dist/src/managers/ownerManager.js +2 -2
  27. package/dist/src/managers/ownerManager.js.map +1 -1
  28. package/dist/src/safeFactory/index.js +5 -7
  29. package/dist/src/safeFactory/index.js.map +1 -1
  30. package/dist/src/utils/eip-3770/config.js +8 -0
  31. package/dist/src/utils/eip-3770/config.js.map +1 -1
  32. package/dist/src/utils/erc-20/index.d.ts +33 -0
  33. package/dist/src/utils/erc-20/index.js +77 -0
  34. package/dist/src/utils/erc-20/index.js.map +1 -0
  35. package/dist/src/utils/signatures/utils.js +1 -1
  36. package/dist/src/utils/transactions/SafeTransaction.js +2 -2
  37. package/dist/src/utils/transactions/SafeTransaction.js.map +1 -1
  38. package/dist/src/utils/transactions/gas.d.ts +48 -1
  39. package/dist/src/utils/transactions/gas.js +308 -32
  40. package/dist/src/utils/transactions/gas.js.map +1 -1
  41. package/dist/src/utils/transactions/utils.js +7 -9
  42. package/dist/src/utils/transactions/utils.js.map +1 -1
  43. package/dist/tsconfig.build.tsbuildinfo +1 -1
  44. package/package.json +98 -96
package/package.json CHANGED
@@ -1,96 +1,98 @@
1
- {
2
- "name": "@safe-global/protocol-kit",
3
- "version": "1.1.0",
4
- "description": "SDK to interact with Safe smart contracts",
5
- "main": "dist/src/index.js",
6
- "types": "dist/src/index.d.ts",
7
- "keywords": [
8
- "Ethereum",
9
- "Safe",
10
- "SDK"
11
- ],
12
- "scripts": {
13
- "safe-deployments": "ts-node scripts/checkSafeDeployments.ts",
14
- "typechain": "ts-node ./scripts/generateTypechainFiles.ts",
15
- "test:ganache:web3:v1.0.0": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.0.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
16
- "test:ganache:web3:v1.1.1": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.1.1 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
17
- "test:ganache:web3:v1.2.0": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.2.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
18
- "test:ganache:web3:v1.3.0": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.3.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
19
- "test:ganache:web3:v1.4.1": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.4.1 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
20
- "test:ganache:ethers:v1.0.0": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.0.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
21
- "test:ganache:ethers:v1.1.1": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.1.1 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
22
- "test:ganache:ethers:v1.2.0": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.2.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
23
- "test:ganache:ethers:v1.3.0": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.3.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
24
- "test:ganache:ethers:v1.4.1": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.4.1 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
25
- "test:hardhat:web3:v1.0.0": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.0.0 && hardhat deploy && nyc hardhat test",
26
- "test:hardhat:web3:v1.1.1": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.1.1 && hardhat deploy && nyc hardhat test",
27
- "test:hardhat:web3:v1.2.0": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.2.0 && hardhat deploy && nyc hardhat test",
28
- "test:hardhat:web3:v1.3.0": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.3.0 && hardhat deploy && nyc hardhat test",
29
- "test:hardhat:web3:v1.4.1": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.4.1 && hardhat deploy && nyc hardhat test",
30
- "test:hardhat:ethers:v1.0.0": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.0.0 && hardhat deploy && nyc hardhat test",
31
- "test:hardhat:ethers:v1.1.1": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.1.1 && hardhat deploy && nyc hardhat test",
32
- "test:hardhat:ethers:v1.2.0": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.2.0 && hardhat deploy && nyc hardhat test",
33
- "test:hardhat:ethers:v1.3.0": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.3.0 && hardhat deploy && nyc hardhat test",
34
- "test:hardhat:ethers:v1.4.1": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.4.1 && hardhat deploy && nyc hardhat test",
35
- "coverage": "nyc report --reporter=lcov",
36
- "format:check": "prettier --check \"*/**/*.{js,json,md,ts}\"",
37
- "format": "prettier --write \"*/**/*.{js,json,md,ts}\"",
38
- "unbuild": "rimraf dist artifacts deployments cache .nyc_output typechain *.tsbuildinfo",
39
- "build": "yarn unbuild && hardhat compile && yarn typechain && yarn safe-deployments && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json"
40
- },
41
- "repository": {
42
- "type": "git",
43
- "url": "git+https://github.com/safe-global/safe-core-sdk.git"
44
- },
45
- "author": "Safe (https://safe.global)",
46
- "license": "MIT",
47
- "bugs": {
48
- "url": "https://github.com/safe-global/safe-core-sdk/issues"
49
- },
50
- "files": [
51
- "dist"
52
- ],
53
- "homepage": "https://github.com/safe-global/safe-core-sdk#readme",
54
- "devDependencies": {
55
- "@gnosis.pm/safe-contracts-v1.2.0": "npm:@gnosis.pm/safe-contracts@1.2.0",
56
- "@gnosis.pm/safe-contracts-v1.3.0": "npm:@gnosis.pm/safe-contracts@1.3.0",
57
- "@nomiclabs/hardhat-ethers": "^2.2.2",
58
- "@nomiclabs/hardhat-waffle": "^2.0.3",
59
- "@nomiclabs/hardhat-web3": "^2.0.0",
60
- "@safe-global/safe-contracts-v1.4.1": "npm:@safe-global/safe-contracts@1.4.1",
61
- "@safe-global/safe-core-sdk-types": "^2.1.0",
62
- "@typechain/ethers-v5": "^10.2.0",
63
- "@typechain/web3-v1": "^6.0.2",
64
- "@types/chai": "^4.3.4",
65
- "@types/chai-as-promised": "^7.1.5",
66
- "@types/mocha": "^10.0.1",
67
- "@types/semver": "^7.3.13",
68
- "@types/web3": "1.0.19",
69
- "@types/yargs": "^16.0.1",
70
- "chai": "^4.3.7",
71
- "chai-as-promised": "^7.1.1",
72
- "coveralls": "^3.1.1",
73
- "dotenv": "^16.0.3",
74
- "ethereum-waffle": "^4.0.10",
75
- "ethers": "5.7.2",
76
- "hardhat": "^2.12.6",
77
- "hardhat-deploy": "^0.11.22",
78
- "mocha": "^10.2.0",
79
- "nyc": "^15.1.0",
80
- "ts-generator": "^0.1.1",
81
- "tsconfig-paths": "^4.1.2",
82
- "typechain": "^8.1.1",
83
- "yargs": "^17.6.2"
84
- },
85
- "dependencies": {
86
- "@ethersproject/address": "^5.7.0",
87
- "@ethersproject/bignumber": "^5.7.0",
88
- "@ethersproject/solidity": "^5.7.0",
89
- "@safe-global/safe-deployments": "^1.25.0",
90
- "ethereumjs-util": "^7.1.5",
91
- "semver": "^7.3.8",
92
- "web3": "^1.8.1",
93
- "web3-core": "^1.8.1",
94
- "web3-utils": "^1.8.1"
95
- }
96
- }
1
+ {
2
+ "name": "@safe-global/protocol-kit",
3
+ "version": "1.3.0",
4
+ "description": "SDK to interact with Safe smart contracts",
5
+ "main": "dist/src/index.js",
6
+ "types": "dist/src/index.d.ts",
7
+ "keywords": [
8
+ "Ethereum",
9
+ "Safe",
10
+ "SDK"
11
+ ],
12
+ "scripts": {
13
+ "safe-deployments": "ts-node scripts/checkSafeDeployments.ts",
14
+ "typechain": "ts-node ./scripts/generateTypechainFiles.ts",
15
+ "test": "mocha -r ts-node/register -r tsconfig-paths/register tests/unit/**/*.ts",
16
+ "test:ganache:web3:v1.0.0": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.0.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
17
+ "test:ganache:web3:v1.1.1": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.1.1 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
18
+ "test:ganache:web3:v1.2.0": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.2.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
19
+ "test:ganache:web3:v1.3.0": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.3.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
20
+ "test:ganache:web3:v1.4.1": "export TEST_NETWORK=ganache && export ETH_LIB=web3 && export SAFE_VERSION=1.4.1 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
21
+ "test:ganache:ethers:v1.0.0": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.0.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
22
+ "test:ganache:ethers:v1.1.1": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.1.1 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
23
+ "test:ganache:ethers:v1.2.0": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.2.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
24
+ "test:ganache:ethers:v1.3.0": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.3.0 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
25
+ "test:ganache:ethers:v1.4.1": "export TEST_NETWORK=ganache && export ETH_LIB=ethers && export SAFE_VERSION=1.4.1 && hardhat --network localhost deploy && nyc hardhat --network localhost test",
26
+ "test:hardhat:web3:v1.0.0": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.0.0 && hardhat deploy && nyc hardhat test",
27
+ "test:hardhat:web3:v1.1.1": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.1.1 && hardhat deploy && nyc hardhat test",
28
+ "test:hardhat:web3:v1.2.0": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.2.0 && hardhat deploy && nyc hardhat test",
29
+ "test:hardhat:web3:v1.3.0": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.3.0 && hardhat deploy && nyc hardhat test",
30
+ "test:hardhat:web3:v1.4.1": "export TEST_NETWORK=hardhat && export ETH_LIB=web3 && export SAFE_VERSION=1.4.1 && hardhat deploy && nyc hardhat test",
31
+ "test:hardhat:ethers:v1.0.0": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.0.0 && hardhat deploy && nyc hardhat test",
32
+ "test:hardhat:ethers:v1.1.1": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.1.1 && hardhat deploy && nyc hardhat test",
33
+ "test:hardhat:ethers:v1.2.0": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.2.0 && hardhat deploy && nyc hardhat test",
34
+ "test:hardhat:ethers:v1.3.0": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.3.0 && hardhat deploy && nyc hardhat test",
35
+ "test:hardhat:ethers:v1.4.1": "export TEST_NETWORK=hardhat && export ETH_LIB=ethers && export SAFE_VERSION=1.4.1 && hardhat deploy && nyc hardhat test",
36
+ "coverage": "nyc report --reporter=lcov",
37
+ "format:check": "prettier --check \"*/**/*.{js,json,md,ts}\"",
38
+ "format": "prettier --write \"*/**/*.{js,json,md,ts}\"",
39
+ "unbuild": "rimraf dist artifacts deployments cache .nyc_output typechain *.tsbuildinfo",
40
+ "build": "yarn unbuild && hardhat compile && yarn typechain && yarn safe-deployments && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/safe-global/safe-core-sdk.git"
45
+ },
46
+ "author": "Safe (https://safe.global)",
47
+ "license": "MIT",
48
+ "bugs": {
49
+ "url": "https://github.com/safe-global/safe-core-sdk/issues"
50
+ },
51
+ "files": [
52
+ "dist"
53
+ ],
54
+ "homepage": "https://github.com/safe-global/safe-core-sdk#readme",
55
+ "devDependencies": {
56
+ "@gnosis.pm/safe-contracts-v1.2.0": "npm:@gnosis.pm/safe-contracts@1.2.0",
57
+ "@gnosis.pm/safe-contracts-v1.3.0": "npm:@gnosis.pm/safe-contracts@1.3.0",
58
+ "@nomiclabs/hardhat-ethers": "^2.2.3",
59
+ "@nomiclabs/hardhat-waffle": "^2.0.6",
60
+ "@nomiclabs/hardhat-web3": "^2.0.0",
61
+ "@safe-global/safe-contracts-v1.4.1": "npm:@safe-global/safe-contracts@1.4.1",
62
+ "@safe-global/safe-core-sdk-types": "^2.3.0",
63
+ "@typechain/ethers-v5": "^10.2.0",
64
+ "@typechain/web3-v1": "^6.0.3",
65
+ "@types/chai": "^4.3.5",
66
+ "@types/chai-as-promised": "^7.1.5",
67
+ "@types/mocha": "^10.0.1",
68
+ "@types/semver": "^7.5.0",
69
+ "@types/web3": "1.0.20",
70
+ "@types/yargs": "^16.0.1",
71
+ "chai": "^4.3.7",
72
+ "chai-as-promised": "^7.1.1",
73
+ "coveralls": "^3.1.1",
74
+ "dotenv": "^16.3.1",
75
+ "ethereum-waffle": "^4.0.10",
76
+ "ethers": "5.7.2",
77
+ "hardhat": "^2.16.1",
78
+ "hardhat-deploy": "^0.11.34",
79
+ "mocha": "^10.2.0",
80
+ "nyc": "^15.1.0",
81
+ "ts-generator": "^0.1.1",
82
+ "tsconfig-paths": "^4.2.0",
83
+ "typechain": "^8.2.0",
84
+ "yargs": "^17.7.2"
85
+ },
86
+ "dependencies": {
87
+ "@ethersproject/address": "^5.7.0",
88
+ "@ethersproject/bignumber": "^5.7.0",
89
+ "@ethersproject/solidity": "^5.7.0",
90
+ "@safe-global/safe-deployments": "^1.26.0",
91
+ "ethereumjs-util": "^7.1.5",
92
+ "semver": "^7.5.4",
93
+ "web3": "^1.8.1",
94
+ "web3-core": "^1.8.1",
95
+ "web3-utils": "^1.8.1",
96
+ "zksync-web3": "^0.14.3"
97
+ }
98
+ }