@exodus/ethereum-lib 5.18.4 → 5.18.6
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,26 @@
|
|
|
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
|
+
## [5.18.6](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.18.5...@exodus/ethereum-lib@5.18.6) (2025-11-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: correct response to insufficient evm nonce during txSend (#6901)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [5.18.5](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.18.4...@exodus/ethereum-lib@5.18.5) (2025-11-03)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* fix: enable `update-nonce` to work for `unsignedTx`s that lack a `transactionBuffer` (#6832)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [5.18.4](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.18.3...@exodus/ethereum-lib@5.18.4) (2025-10-29)
|
|
7
27
|
|
|
8
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-lib",
|
|
3
|
-
"version": "5.18.
|
|
3
|
+
"version": "5.18.6",
|
|
4
4
|
"description": "Ethereum utils, such as for cryptography, address encoding/decoding, transaction building, etc.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"type": "git",
|
|
52
52
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "342bc790d18d382ec34f846446d678a3b6342ab7"
|
|
55
55
|
}
|
|
@@ -59,7 +59,7 @@ export const getEthereumJsTxByTransactionProps = ({
|
|
|
59
59
|
})
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const
|
|
62
|
+
export const parseUnsignedTxTransactionBufferToJsTx = ({ unsignedTx }) => {
|
|
63
63
|
const { transactionBuffer, chainId, ...legacyTxData } = unsignedTx.txData
|
|
64
64
|
assert(
|
|
65
65
|
isEmpty(legacyTxData),
|
|
@@ -78,7 +78,7 @@ export default function createEthereumJsTx(unsignedTx) {
|
|
|
78
78
|
txData: { transactionBuffer, ...legacyTxData },
|
|
79
79
|
} = unsignedTx
|
|
80
80
|
|
|
81
|
-
if (transactionBuffer) return
|
|
81
|
+
if (transactionBuffer) return parseUnsignedTxTransactionBufferToJsTx({ unsignedTx })
|
|
82
82
|
|
|
83
83
|
const {
|
|
84
84
|
chainId,
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
+
import { FeeMarketEIP1559Transaction } from '@exodus/ethereumjs/tx'
|
|
1
2
|
import assert from 'minimalistic-assert'
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import createEthereumJsTx, { getEthereumJsTxByTransactionProps } from './create-ethereumjs-tx.js'
|
|
4
5
|
|
|
5
|
-
const updateNonce = ({ chainId,
|
|
6
|
-
assert(
|
|
6
|
+
const updateNonce = ({ chainId, newNonce, unsignedTx }) => {
|
|
7
|
+
assert(unsignedTx, 'expected unsignedTx')
|
|
7
8
|
assert(typeof newNonce === 'number', 'expected number newNonce')
|
|
8
9
|
assert(typeof chainId === 'number', 'expected number chainId')
|
|
9
10
|
|
|
10
|
-
const
|
|
11
|
-
chainId,
|
|
12
|
-
transactionBuffer,
|
|
13
|
-
})
|
|
11
|
+
const ethereumJsTx = createEthereumJsTx(unsignedTx)
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
return getEthereumJsTxByTransactionProps({
|
|
14
|
+
chainId,
|
|
15
|
+
eip1559Enabled: ethereumJsTx instanceof FeeMarketEIP1559Transaction,
|
|
16
|
+
transactionProps: { ...ethereumJsTx.toJSON(), nonce: newNonce },
|
|
17
|
+
}).serialize()
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
export default updateNonce
|