@exodus/ethereum-api 8.50.1 → 8.52.0

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,32 @@
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.52.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.51.0...@exodus/ethereum-api@8.52.0) (2025-09-26)
7
+
8
+
9
+ ### Features
10
+
11
+
12
+ * feat(ethereum): use methodId in new staking txs shape (#6335)
13
+
14
+
15
+
16
+ ## [8.51.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.50.1...@exodus/ethereum-api@8.51.0) (2025-09-25)
17
+
18
+
19
+ ### Features
20
+
21
+
22
+ * feat(ethereum): check Eip1191ChainId in displayAddress function (#6504)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+
28
+ * fix: removed contractAddress, keepTxInput and and resolve token amount when sending to a different contract (#6508)
29
+
30
+
31
+
6
32
  ## [8.50.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.50.0...@exodus/ethereum-api@8.50.1) (2025-09-22)
7
33
 
8
34
  **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.50.1",
3
+ "version": "8.52.0",
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",
@@ -28,7 +28,7 @@
28
28
  "@exodus/bip44-constants": "^195.0.0",
29
29
  "@exodus/crypto": "^1.0.0-rc.26",
30
30
  "@exodus/currency": "^6.0.1",
31
- "@exodus/ethereum-lib": "^5.17.0",
31
+ "@exodus/ethereum-lib": "^5.18.0",
32
32
  "@exodus/ethereum-meta": "^2.9.1",
33
33
  "@exodus/ethereumholesky-meta": "^2.0.5",
34
34
  "@exodus/ethereumjs": "^1.8.0",
@@ -66,5 +66,5 @@
66
66
  "type": "git",
67
67
  "url": "git+https://github.com/ExodusMovement/assets.git"
68
68
  },
69
- "gitHead": "e54f136a2e7ff694cd12dc1a7b0ef34eb707ef0e"
69
+ "gitHead": "cf881908a1cff88e98d2f9a7a3f29357474e3d0c"
70
70
  }
@@ -132,7 +132,8 @@ export const createAssetFactory = ({
132
132
  validate: validateFactory({ chainId, useEip1191ChainIdChecksum }),
133
133
  hasChecksum,
134
134
  isContract: server.isContract,
135
- displayAddress: (addr) => toChecksumAddress(addr),
135
+ displayAddress: (addr) =>
136
+ useEip1191ChainIdChecksum ? toChecksumAddress(addr, chainId) : toChecksumAddress(addr),
136
137
  }
137
138
 
138
139
  const bip44 = customBip44 || bip44Constants['ETH']
package/src/tx-create.js CHANGED
@@ -219,7 +219,6 @@ export const createTxFactory = ({ chainId, assetClientInterface, useAbsoluteNonc
219
219
  nft, // when sending nfts
220
220
  fromAddress: providedFromAddress, // wallet from address
221
221
  toAddress: providedToAddress, // user's to address, not the token or the dex contract
222
- contractAddress: providedContractAddress, // Provided when swapping a token via the DEX contract, not via the token's contract
223
222
  txInput: providedTxInput, // Provided when swapping via a DEX contract
224
223
  gasLimit: providedGasLimit, // Provided by exchange when known
225
224
  amount: providedAmount, // The NU amount to be sent, to be included in the tx value or tx input
@@ -230,7 +229,6 @@ export const createTxFactory = ({ chainId, assetClientInterface, useAbsoluteNonc
230
229
  customFee,
231
230
  isSendAll,
232
231
  bumpTxId,
233
- keepTxInput, // @deprecated this flag is used by swaps when swapping a token via DEX. The asset is token but the tx TO address is not the token address. Update swap to use `contractAddress`
234
232
  }) => {
235
233
  assert(asset, 'asset is required')
236
234
  assert(walletAccount, 'walletAccount is required')
@@ -273,8 +271,7 @@ export const createTxFactory = ({ chainId, assetClientInterface, useAbsoluteNonc
273
271
 
274
272
  const resolvedGasPrice = providedGasPrice ?? maybeGasPrice
275
273
 
276
- const txToAddress =
277
- providedContractAddress ?? (isToken && !keepTxInput ? asset.contract.address : toAddress)
274
+ const txToAddress = isToken && !providedTxInput ? asset.contract.address : toAddress
278
275
 
279
276
  const isContractToAddress = await isContractAddressCached({ asset, address: txToAddress })
280
277
 
@@ -41,6 +41,7 @@ export const getOptimisticTxLogEffects = async ({
41
41
  toAddress,
42
42
  tipGasPrice: maybeTipGasPrice,
43
43
  walletAccount,
44
+ methodId,
44
45
  }) => {
45
46
  assert(isNumberUnit(amount), 'expected NumberUnit amount')
46
47
  assert(asset, 'expected asset')
@@ -89,6 +90,7 @@ export const getOptimisticTxLogEffects = async ({
89
90
  replacedTxId,
90
91
  nonce,
91
92
  ...(maybeTipGasPrice ? { tipGasPrice: maybeTipGasPrice.toBaseString() } : null),
93
+ ...(methodId ? { methodId } : null),
92
94
  },
93
95
  }
94
96
 
@@ -1,4 +1,5 @@
1
1
  import { normalizeTxId, parseUnsignedTx, updateNonce } from '@exodus/ethereum-lib'
2
+ import { bufferToHex } from '@exodus/ethereumjs/util'
2
3
  import assert from 'minimalistic-assert'
3
4
 
4
5
  import * as ErrorWrapper from '../error-wrapper.js'
@@ -42,17 +43,14 @@ const txSendFactory = ({ assetClientInterface, createTx }) => {
42
43
  // this converts an transactionBuffer to values we can use when creating the tx logs
43
44
  const parsedTx = parseUnsignedTx({ asset, unsignedTx })
44
45
 
45
- // the txMeta.fee may include implicit l1 fees
46
- const feeAmount = unsignedTx.txMeta.fee
47
- ? asset.feeAsset.currency.parse(unsignedTx.txMeta.fee)
48
- : parsedTx.fee
49
-
50
46
  let nonce = parsedTx.nonce
51
47
 
52
48
  const tipGasPrice = parsedTx.tipGasPrice
49
+ const feeAmount = parsedTx.fee
53
50
  const gasLimit = parsedTx.gasLimit
54
51
  const amount = parsedTx.amount
55
52
  const toAddress = parsedTx.to
53
+ const data = parsedTx.data
56
54
 
57
55
  // unknown data from buffer...
58
56
  const fromAddress = unsignedTx.txMeta.fromAddress
@@ -146,6 +144,8 @@ const txSendFactory = ({ assetClientInterface, createTx }) => {
146
144
  }
147
145
  }
148
146
 
147
+ const methodId = data ? bufferToHex(data).slice(0, 10) : undefined
148
+
149
149
  const { optimisticTxLogEffects } = await getOptimisticTxLogEffects({
150
150
  amount,
151
151
  asset,
@@ -158,6 +158,7 @@ const txSendFactory = ({ assetClientInterface, createTx }) => {
158
158
  toAddress,
159
159
  tipGasPrice,
160
160
  walletAccount,
161
+ methodId,
161
162
  })
162
163
 
163
164
  // NOTE: `optimisticTxLogEffects` **must** be written sequentially.