@atomiqlabs/chain-evm 1.0.0-dev.102 → 1.0.0-dev.103

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.
@@ -4,6 +4,7 @@ exports.EVMTransactions = void 0;
4
4
  const EVMModule_1 = require("../EVMModule");
5
5
  const ethers_1 = require("ethers");
6
6
  const Utils_1 = require("../../../utils/Utils");
7
+ const base_1 = require("@atomiqlabs/base");
7
8
  const MAX_UNCONFIRMED_TXNS = 10;
8
9
  class EVMTransactions extends EVMModule_1.EVMModule {
9
10
  constructor() {
@@ -68,7 +69,7 @@ class EVMTransactions extends EVMModule_1.EVMModule {
68
69
  this.latestConfirmedNonces[tx.from] = nextAccountNonce;
69
70
  }
70
71
  if (state === "reverted")
71
- throw new Error("Transaction reverted!");
72
+ throw new base_1.TransactionRevertedError("Transaction reverted!");
72
73
  return confirmedTxId;
73
74
  }
74
75
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-evm",
3
- "version": "1.0.0-dev.102",
3
+ "version": "1.0.0-dev.103",
4
4
  "description": "EVM specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "author": "adambor",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@atomiqlabs/base": "^10.0.0-dev.20",
26
+ "@atomiqlabs/base": "^10.0.0-dev.21",
27
27
  "@noble/hashes": "^1.8.0",
28
28
  "@scure/btc-signer": "^1.6.0",
29
29
  "buffer": "6.0.3",
@@ -2,6 +2,7 @@ import {EVMModule} from "../EVMModule";
2
2
  import {Transaction, TransactionRequest, TransactionResponse} from "ethers";
3
3
  import {timeoutPromise} from "../../../utils/Utils";
4
4
  import {EVMSigner} from "../../wallet/EVMSigner";
5
+ import {TransactionRevertedError} from "@atomiqlabs/base";
5
6
 
6
7
  export type EVMTx = TransactionRequest;
7
8
 
@@ -87,7 +88,7 @@ export class EVMTransactions extends EVMModule<any> {
87
88
  if(currentConfirmedNonce==null || nextAccountNonce > currentConfirmedNonce) {
88
89
  this.latestConfirmedNonces[tx.from] = nextAccountNonce;
89
90
  }
90
- if(state==="reverted") throw new Error("Transaction reverted!");
91
+ if(state==="reverted") throw new TransactionRevertedError("Transaction reverted!");
91
92
 
92
93
  return confirmedTxId;
93
94
  }