@skalenetwork/upgrade-tools 3.0.0-develop.3 → 3.0.0-develop.5

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.
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.createMultiSendTransaction = void 0;
30
- const chalk_1 = __importDefault(require("chalk"));
31
30
  const hardhat_1 = require("hardhat");
32
31
  const api_kit_1 = __importDefault(require("@safe-global/api-kit"));
33
32
  const protocol_kit_1 = __importStar(require("@safe-global/protocol-kit"));
@@ -66,25 +65,10 @@ async function createMultiSendTransaction(safeAddress, transactions) {
66
65
  refundReceiver: hardhat_1.ethers.constants.AddressZero,
67
66
  nonce: nonce // Nonce of the Safe, transaction cannot be executed until Safe's nonce is not equal to this nonce
68
67
  }, ethAdapter = await getEthAdapter(), safeSdk = await protocol_kit_1.default.create({ ethAdapter, safeAddress }), safeTransaction = await safeSdk.createTransaction({ safeTransactionData, options });
69
- await estimateSafeTransaction(safeAddress, safeTransactionData);
70
68
  await proposeTransaction(safeAddress, safeTransaction);
71
69
  }
72
70
  exports.createMultiSendTransaction = createMultiSendTransaction;
73
71
  // private functions
74
- async function estimateSafeTransaction(safeAddress, safeTransactionData) {
75
- console.log("Estimate gas");
76
- const safeService = await getSafeService();
77
- for (const transaction of safeTransactionData) {
78
- const estimateResponse = await safeService.estimateSafeTransaction(safeAddress, {
79
- to: transaction.to,
80
- value: transaction.value,
81
- data: transaction.data,
82
- operation: transaction.operation || 0,
83
- });
84
- console.log(chalk_1.default.cyan(`Recommend to set gas limit to ${parseInt(estimateResponse.safeTxGas, 10)}`));
85
- }
86
- console.log(chalk_1.default.green("Send transaction to gnosis safe"));
87
- }
88
72
  async function proposeTransaction(safeAddress, safeTransaction) {
89
73
  const [safeOwner] = await hardhat_1.ethers.getSigners(), ethAdapter = await getEthAdapter(), safeSdk = await protocol_kit_1.default.create({ ethAdapter, safeAddress }), safeTxHash = await safeSdk.getTransactionHash(safeTransaction), senderSignature = await safeSdk.signTransactionHash(safeTxHash), safeService = await getSafeService();
90
74
  await safeService.proposeTransaction({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skalenetwork/upgrade-tools",
3
- "version": "3.0.0-develop.3",
3
+ "version": "3.0.0-develop.5",
4
4
  "description": "Scripts to support upgrades of smart contracts",
5
5
  "files": [
6
6
  "dist/**/*"
@@ -52,6 +52,6 @@
52
52
  "@openzeppelin/upgrades-core": "^1.27.1",
53
53
  "@types/mocha": "^9.1.0",
54
54
  "ethers": "^5.7.2",
55
- "hardhat": "2.8.3 - 2.16.1"
55
+ "hardhat": "^2.16.1"
56
56
  }
57
57
  }