@exodus/ethereum-api 8.29.1 → 8.29.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 +10 -0
- package/package.json +2 -2
- package/src/eth-like-util.js +1 -1
- package/src/tx-log/clarity-monitor.js +3 -3
- package/src/tx-log/ethereum-monitor.js +2 -2
- package/src/tx-log/ethereum-no-history-monitor.js +1 -1
- package/src/tx-log/monitor-utils/exclude-unchanged-token-balances.js +1 -1
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.29.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.29.1...@exodus/ethereum-api@8.29.2) (2025-02-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: security hardening (#5035)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## [8.29.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.29.0...@exodus/ethereum-api@8.29.1) (2025-02-10)
|
|
7
17
|
|
|
8
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-api",
|
|
3
|
-
"version": "8.29.
|
|
3
|
+
"version": "8.29.2",
|
|
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",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"type": "git",
|
|
65
65
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "d9dacbc9ccadf109a2a2b10e97c35c46759e803e"
|
|
68
68
|
}
|
package/src/eth-like-util.js
CHANGED
|
@@ -119,7 +119,7 @@ export const getIsForwarderContract = memoizeLruCache(
|
|
|
119
119
|
const ERC20 = new SolidityContract(ABI.erc20)
|
|
120
120
|
const ERC20BytesParams = new SolidityContract(ABI.erc20BytesParams)
|
|
121
121
|
const DEFAULT_PARAM_NAMES = ['decimals', 'name', 'symbol']
|
|
122
|
-
const erc20ParamsCache =
|
|
122
|
+
const erc20ParamsCache = Object.create(null)
|
|
123
123
|
|
|
124
124
|
export const getERC20Params = async ({ asset, address, paramNames = DEFAULT_PARAM_NAMES } = {}) => {
|
|
125
125
|
assert(asset, 'getERC20Params(): asset required')
|
|
@@ -176,7 +176,7 @@ export class ClarityMonitor extends BaseMonitor {
|
|
|
176
176
|
|
|
177
177
|
async getNewAccountState({ tokens, currentTokenBalances, ourWalletAddress }) {
|
|
178
178
|
const asset = this.asset
|
|
179
|
-
const newAccountState =
|
|
179
|
+
const newAccountState = Object.create(null)
|
|
180
180
|
const balances = await this.getBalances({ tokens, ourWalletAddress })
|
|
181
181
|
if (isRpcBalanceAsset(asset)) {
|
|
182
182
|
const balance = balances[asset.name]
|
|
@@ -199,7 +199,7 @@ export class ClarityMonitor extends BaseMonitor {
|
|
|
199
199
|
|
|
200
200
|
async getReceiveAddressesByWalletAccount() {
|
|
201
201
|
const walletAccounts = await this.aci.getWalletAccounts({ assetName: this.asset.name })
|
|
202
|
-
const addressesByAccount =
|
|
202
|
+
const addressesByAccount = Object.create(null)
|
|
203
203
|
for (const walletAccount of walletAccounts) {
|
|
204
204
|
addressesByAccount[walletAccount] = await this.aci.getReceiveAddresses({
|
|
205
205
|
assetName: this.asset.name,
|
|
@@ -220,7 +220,7 @@ export class ClarityMonitor extends BaseMonitor {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
async getBalances({ tokens, ourWalletAddress }) {
|
|
223
|
-
const batch =
|
|
223
|
+
const batch = Object.create(null)
|
|
224
224
|
if (isRpcBalanceAsset(this.asset)) {
|
|
225
225
|
const request = this.server.getBalanceRequest(ourWalletAddress)
|
|
226
226
|
batch[this.asset.name] = request
|
|
@@ -230,7 +230,7 @@ export class EthereumMonitor extends BaseMonitor {
|
|
|
230
230
|
|
|
231
231
|
async getNewAccountState({ tokens, currentTokenBalances, ourWalletAddress }) {
|
|
232
232
|
const asset = this.asset
|
|
233
|
-
const newAccountState =
|
|
233
|
+
const newAccountState = Object.create(null)
|
|
234
234
|
const server = this.server
|
|
235
235
|
if (isRpcBalanceAsset(asset)) {
|
|
236
236
|
const result = await server.getBalanceProxied(ourWalletAddress)
|
|
@@ -255,7 +255,7 @@ export class EthereumMonitor extends BaseMonitor {
|
|
|
255
255
|
|
|
256
256
|
async getReceiveAddressesByWalletAccount() {
|
|
257
257
|
const walletAccounts = await this.aci.getWalletAccounts({ assetName: this.asset.name })
|
|
258
|
-
const addressesByAccount =
|
|
258
|
+
const addressesByAccount = Object.create(null)
|
|
259
259
|
for (const walletAccount of walletAccounts) {
|
|
260
260
|
addressesByAccount[walletAccount] = await this.aci.getReceiveAddresses({
|
|
261
261
|
assetName: this.asset.name,
|
|
@@ -63,7 +63,7 @@ export class EthereumNoHistoryMonitor extends BaseMonitor {
|
|
|
63
63
|
|
|
64
64
|
async getNewAccountState({ tokens, currentTokenBalances, ourWalletAddress }) {
|
|
65
65
|
const asset = this.asset
|
|
66
|
-
const newAccountState =
|
|
66
|
+
const newAccountState = Object.create(null)
|
|
67
67
|
const balances = await this.getBalances({ tokens, ourWalletAddress })
|
|
68
68
|
const balance = balances[asset.name]
|
|
69
69
|
newAccountState.balance = asset.currency.baseUnit(balance)
|