@exodus/ethereum-api 8.74.0 → 8.74.1

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [8.74.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.74.0...@exodus/ethereum-api@8.74.1) (2026-05-12)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * validate polygon unstake state before gas estimation ([#8002](https://github.com/ExodusMovement/assets/issues/8002)) ([f63a244](https://github.com/ExodusMovement/assets/commit/f63a2441868c6226fe14085c0f7d9587131e69e0))
12
+
13
+
14
+
6
15
  ## [8.74.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.73.6...@exodus/ethereum-api@8.74.0) (2026-05-12)
7
16
 
8
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.74.0",
3
+ "version": "8.74.1",
4
4
  "description": "Transaction monitors, fee monitors, RPC with the blockchain node, and other networking code for Ethereum and EVM-based blockchains",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -29,7 +29,7 @@
29
29
  "@exodus/bip44-constants": "^195.0.0",
30
30
  "@exodus/crypto": "^1.0.0-rc.26",
31
31
  "@exodus/currency": "^6.0.1",
32
- "@exodus/ethereum-lib": "^5.24.0",
32
+ "@exodus/ethereum-lib": "^5.24.1",
33
33
  "@exodus/ethereum-meta": "^2.9.1",
34
34
  "@exodus/ethereumholesky-meta": "^2.0.5",
35
35
  "@exodus/ethereumjs": "^1.11.0",
@@ -67,5 +67,5 @@
67
67
  "type": "git",
68
68
  "url": "git+https://github.com/ExodusMovement/assets.git"
69
69
  },
70
- "gitHead": "f841266053c82af6c3aecb3196b9ae20f4d5340c"
70
+ "gitHead": "7f184588091acba3b358e4af13783ee1e2bab4ba"
71
71
  }
@@ -5,6 +5,7 @@ export const EVM_ERROR_TYPES = {
5
5
  NODE_STATE_READ: safeString`NODE_STATE_READ`, // RPC-level read operations
6
6
  CONTRACT_CALL: safeString`CONTRACT_CALL`, // Smart contract calls (eth_call, estimateGas)
7
7
  BROADCAST: safeString`BROADCAST`, // Transaction broadcast errors (includes reverts)
8
+ PREFLIGHT_VALIDATION: safeString`PREFLIGHT_VALIDATION`, // Logic/state validation before contract gasEstimation & broadcast
8
9
  }
9
10
 
10
11
  // Operation-specific reasons
package/src/index.js CHANGED
@@ -57,6 +57,7 @@ export {
57
57
  isPolygonUndelegate,
58
58
  isPolygonReward,
59
59
  isPolygonClaimUndelegate,
60
+ isPendingPolygonUndelegateTxInEthereumTxLog,
60
61
  } from './staking/index.js'
61
62
 
62
63
  export { fetchTxPreview, maybeRemoveDuplicates, retrieveSideEffects } from './simulate-tx/index.js'
@@ -5,4 +5,5 @@ export {
5
5
  isPolygonUndelegate,
6
6
  isPolygonReward,
7
7
  isPolygonClaimUndelegate,
8
+ isPendingPolygonUndelegateTxInEthereumTxLog,
8
9
  } from './matic-staking-utils.js'
@@ -1,5 +1,5 @@
1
1
  import NumberUnit from '@exodus/currency'
2
- import { parseUnsignedTx } from '@exodus/ethereum-lib'
2
+ import { getMethodIdFromEthTx, isPendingTxInLog, parseUnsignedTx } from '@exodus/ethereum-lib'
3
3
  import assetsList, { asset as ethereum } from '@exodus/ethereum-meta'
4
4
  import { Tx } from '@exodus/models'
5
5
  import assert from 'minimalistic-assert'
@@ -52,6 +52,17 @@ const isPolygonUndelegateTxInEthreumTxLog = (tx) =>
52
52
  export const isPolygonUndelegateTxInEthereumTxLog = (tx) =>
53
53
  isPolygonStakingContractTxInEthereumTxLog(tx) && isPolygonUndelegateTxInEthreumTxLog(tx)
54
54
 
55
+ // Pending variant intended for client-side selectors (e.g. "show Unstaking… as
56
+ // soon as the tx hits the log"). Composes the shared tx-log lifecycle and
57
+ // method-ID helpers so this and the asset-side preflight in
58
+ // @exodus/ethereum-plugin/staking/polygon/staking-utils agree on what "pending"
59
+ // means from a single definition.
60
+ export const isPendingPolygonUndelegateTxInEthereumTxLog = (tx) =>
61
+ !!tx &&
62
+ isPendingTxInLog(tx) &&
63
+ tx.to?.toLowerCase() === MaticStakingApi.EVERSTAKE_VALIDATOR_CONTRACT_ADDR &&
64
+ getMethodIdFromEthTx(tx, UNDELEGATE) === UNDELEGATE
65
+
55
66
  export const createUndelegateTx = (tx) => {
56
67
  return Tx.fromJSON({
57
68
  ...tx,