@exodus/ethereum-api 8.61.2 → 8.61.3

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,16 @@
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.61.3](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.61.2...@exodus/ethereum-api@8.61.3) (2025-12-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: prevent acceleration of replaced evm transactions (#6964)
13
+
14
+
15
+
6
16
  ## [8.61.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.61.1...@exodus/ethereum-api@8.61.2) (2025-12-15)
7
17
 
8
18
  **Note:** Version bump only for package @exodus/ethereum-api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.61.2",
3
+ "version": "8.61.3",
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.20.0",
32
+ "@exodus/ethereum-lib": "^5.20.2",
33
33
  "@exodus/ethereum-meta": "^2.9.1",
34
34
  "@exodus/ethereumholesky-meta": "^2.0.5",
35
35
  "@exodus/ethereumjs": "^1.8.0",
@@ -67,5 +67,5 @@
67
67
  "type": "git",
68
68
  "url": "git+https://github.com/ExodusMovement/assets.git"
69
69
  },
70
- "gitHead": "0205169eadf194fa5a97cbac124f0fcb0a701206"
70
+ "gitHead": "8c3e94c96818b1ce8ce10cb75da29db2c9fe9ab9"
71
71
  }
package/src/tx-create.js CHANGED
@@ -1,4 +1,8 @@
1
- import { currency2buffer, isEthereumLikeToken } from '@exodus/ethereum-lib'
1
+ import {
2
+ currency2buffer,
3
+ getHighestIncentiveTxByNonce,
4
+ isEthereumLikeToken,
5
+ } from '@exodus/ethereum-lib'
2
6
  import createEthereumJsTx from '@exodus/ethereum-lib/src/unsigned-tx/create-ethereumjs-tx.js'
3
7
  import assert from 'minimalistic-assert'
4
8
 
@@ -6,7 +10,6 @@ import { ensureSaneEip1559GasPriceForTipGasPrice } from './fee-utils.js'
6
10
  import { fetchGasLimit } from './gas-estimation.js'
7
11
  import { getAggregateTransactionPricing, getExtraFeeData } from './get-fee.js'
8
12
  import { getNftArguments } from './nft-utils.js'
9
- import { getHighestIncentiveTxByNonce } from './tx-log/index.js'
10
13
  import {
11
14
  assertTxAttributes,
12
15
  isValidTxType,
@@ -1,6 +1,10 @@
1
1
  import { SynchronizedTime } from '@exodus/basic-utils'
2
2
  import NumberUnit from '@exodus/currency'
3
- import { isEthereumLikeToken, parseUnsignedTx } from '@exodus/ethereum-lib'
3
+ import {
4
+ getHighestIncentiveTxByNonce,
5
+ isEthereumLikeToken,
6
+ parseUnsignedTx,
7
+ } from '@exodus/ethereum-lib'
4
8
  import { bufferToHex } from '@exodus/ethereumjs/util'
5
9
  import assert from 'minimalistic-assert'
6
10
 
@@ -10,49 +14,6 @@ import {
10
14
  maticDelegateOptimisticSideEffectTxLogs,
11
15
  } from '../staking/matic/matic-staking-utils.js'
12
16
 
13
- // Returns the most competitively priced pending
14
- // transaction from the `TxLog` for a given `nonce`.
15
- //
16
- // NOTE: If a transaction was successfully included,
17
- // it is the de-facto highest incentive
18
- // transaction - irrespective of other
19
- // attempts for that nonce.
20
- export const getHighestIncentiveTxByNonce = async ({
21
- assetClientInterface,
22
- asset,
23
- nonce,
24
- walletAccount,
25
- }) => {
26
- assert(assetClientInterface, 'expected assetClientInterface')
27
- assert(asset, 'expected asset')
28
- assert(Number.isInteger(nonce), 'expected integer nonce')
29
- assert(walletAccount, 'expected walletAccount')
30
-
31
- const txLogSendsByFeeAmountDesc = [
32
- ...(await assetClientInterface.getTxLog({ assetName: asset.name, walletAccount })),
33
- ]
34
- .filter((tx) => tx.data.nonce === nonce && tx.sent)
35
- .sort((a, b) => (a.feeAmount.gt(b.feeAmount) ? -1 : b.feeAmount.gt(a.feeAmount) ? 1 : 0))
36
-
37
- // If any of the transactions competing for this `nonce`
38
- // were successful, then we can return this transaction
39
- // as it effectively had the highest game-theoretical
40
- // incentive regardless of other (potentially higher fee)
41
- // transactions that were sent.
42
- //
43
- // https://github.com/ExodusMovement/exodus-hydra/blob/e59004097f15974a975d14e1823de5d7b1c28308/features/activity-txs/redux/utils/activity-formatters/format-tx-activity.js#L13
44
- const maybeConfirmedTx = txLogSendsByFeeAmountDesc.find((tx) => !tx.failed && !tx.pending)
45
- if (maybeConfirmedTx) return maybeConfirmedTx
46
-
47
- // https://github.com/ExodusMovement/assets/blob/fbe3702861cba3b21885a65b15f038fcd8541891/shield/asset-lib/src/balances-utils.js#L26
48
- const isUnconfirmed = (tx) => !tx.failed && tx.pending
49
-
50
- // NOTE: When trying to find the highest incentive of a
51
- // transaction, consider those which are either still
52
- // pending.
53
- return txLogSendsByFeeAmountDesc.find(isUnconfirmed)
54
- }
55
-
56
17
  export const getOptimisticTxLogEffects = async ({
57
18
  asset,
58
19
  assetClientInterface,
@@ -1,7 +1,4 @@
1
1
  export { EthereumMonitor } from './ethereum-monitor.js'
2
2
  export { EthereumNoHistoryMonitor } from './ethereum-no-history-monitor.js'
3
3
  export { ClarityMonitor } from './clarity-monitor.js'
4
- export {
5
- getOptimisticTxLogEffects,
6
- getHighestIncentiveTxByNonce,
7
- } from './get-optimistic-txlog-effects.js'
4
+ export { getOptimisticTxLogEffects } from './get-optimistic-txlog-effects.js'