@exodus/ethereum-lib 5.24.1 → 5.24.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.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.24.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.24.1...@exodus/ethereum-lib@5.24.2) (2026-05-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix(ethereum-lib): avoid float precision loss in legacy unsigned-tx fee (#7918)
|
|
13
|
+
|
|
14
|
+
* fix(ethereum-lib): use .gte() instead of >= for currency comparison (#7961)
|
|
15
|
+
|
|
16
|
+
* fix: stale truncated balances after new transaction (#7897)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
6
20
|
## [5.24.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.24.0...@exodus/ethereum-lib@5.24.1) (2026-05-12)
|
|
7
21
|
|
|
8
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-lib",
|
|
3
|
-
"version": "5.24.
|
|
3
|
+
"version": "5.24.2",
|
|
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": "8cf5e6a5fc7d235c2c57ea51219bb1e3469329c5"
|
|
55
55
|
}
|
|
@@ -11,6 +11,7 @@ export default function createEthereumLikeAccountState({ asset, extraData = {},
|
|
|
11
11
|
balance: asset.currency.ZERO,
|
|
12
12
|
tokenBalances: {},
|
|
13
13
|
nonce: 0,
|
|
14
|
+
truncatedAccountState: { balance: asset.currency.ZERO, tokenBalances: Object.create(null) },
|
|
14
15
|
index: 0,
|
|
15
16
|
isBlacklisted: null,
|
|
16
17
|
eip7702Delegation: null,
|
|
@@ -222,7 +222,10 @@ const calculateBumpedGasPriceEip1559 = ({
|
|
|
222
222
|
prevMaxFeePerGas,
|
|
223
223
|
})
|
|
224
224
|
|
|
225
|
-
assert(
|
|
225
|
+
assert(
|
|
226
|
+
bumpedGasPrice.gte(currentBaseFeePerGas),
|
|
227
|
+
'bumpedGasPrice must be >= currentBaseFeePerGas'
|
|
228
|
+
)
|
|
226
229
|
|
|
227
230
|
// Since `calculateBumpedGasPriceNonEip1559` will guarantee that
|
|
228
231
|
// the returned `bumpedGasPrice` will be greater than the
|
|
@@ -36,7 +36,6 @@ export default function createUnsignedTxFactory({ chainId }) {
|
|
|
36
36
|
eip1559Enabled,
|
|
37
37
|
}) => {
|
|
38
38
|
console.warn('createUnsignedTxFactory is deprecated, use createTxFactory instead')
|
|
39
|
-
const baseAsset = asset.baseAsset
|
|
40
39
|
assert(chainId, 'chainId is required')
|
|
41
40
|
|
|
42
41
|
txValue = assertValidTxValue({ asset, amount, txValue })
|
|
@@ -70,7 +69,9 @@ export default function createUnsignedTxFactory({ chainId }) {
|
|
|
70
69
|
|
|
71
70
|
const txMeta = {
|
|
72
71
|
assetName: asset.name,
|
|
73
|
-
|
|
72
|
+
// Use NumberUnit#mul (BN-backed) to avoid float-precision loss when
|
|
73
|
+
// gasPrice (in wei) * gasLimit exceeds Number.MAX_SAFE_INTEGER (~9e15).
|
|
74
|
+
fee: gasPrice.mul(gasLimit),
|
|
74
75
|
eip1559Enabled: !!eip1559Enabled,
|
|
75
76
|
fromAddress,
|
|
76
77
|
}
|