@skalenetwork/upgrade-tools 3.0.0-remove-async-calls.1 → 3.0.0-remove-async-calls.2

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.
@@ -11,17 +11,20 @@ class EoaSubmitter extends submitter_1.Submitter {
11
11
  async submit(transactions) {
12
12
  EoaSubmitter.atomicityWarning();
13
13
  const [deployer] = await hardhat_1.ethers.getSigners();
14
- let nonce = await deployer.getNonce();
15
14
  console.log(`Send transaction via ${this.name}`);
15
+ /*
16
+ * TODO: Refactor this section.
17
+ * Now sending transactions sequentially.
18
+ * Previously, concurrent eth_estimateGas calls during initialize()
19
+ * could invoke unavailable functions (pre-upgrade), causing failures.
20
+ */
16
21
  for (const tx of transactions) {
17
22
  /* eslint-disable no-await-in-loop */
18
23
  const receipt = await (await deployer.sendTransaction({
19
24
  data: tx.data,
20
- nonce,
21
25
  to: tx.to,
22
26
  value: tx.value
23
27
  })).wait();
24
- ++nonce;
25
28
  console.log(`Sent transaction with hash: ${receipt?.hash}`);
26
29
  }
27
30
  console.log("All transactions sent and confirmed");
@@ -1 +1 @@
1
- {"version":3,"file":"eoa-submitter.js","sourceRoot":"","sources":["../../../src/submitters/eoa-submitter.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAEtC,qCAA+B;AAG/B,MAAa,YAAa,SAAQ,qBAAS;IAA3C;;QACI,SAAI,GAAG,eAAe,CAAC;IAsB3B,CAAC;IApBG,KAAK,CAAC,MAAM,CAAE,YAA2B;QACrC,YAAY,CAAC,gBAAgB,EAAE,CAAC;QAChC,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,gBAAM,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,KAAK,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAEjD,KAAK,MAAM,EAAE,IAAI,YAAY,EAAE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AAE,CAAC,CAAC;QAChE,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IACvD,CAAC;CACJ;AA1BD,oCA0BC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skalenetwork/upgrade-tools",
3
- "version": "3.0.0-remove-async-calls.1",
3
+ "version": "3.0.0-remove-async-calls.2",
4
4
  "description": "Scripts to support upgrades of smart contracts",
5
5
  "files": [
6
6
  "dist/**/*"