@exodus/ethereum-plugin 2.4.2 → 2.6.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,36 @@
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
+ ## [2.6.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-plugin@2.5.0...@exodus/ethereum-plugin@2.6.0) (2024-12-02)
7
+
8
+
9
+ ### Features
10
+
11
+
12
+ * feat: gasPriceMaximumRate in evm fee data (#4578)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+
18
+ * fix: polygon staking rewards typo (#4481)
19
+
20
+
21
+
22
+ ## [2.5.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-plugin@2.4.2...@exodus/ethereum-plugin@2.5.0) (2024-11-05)
23
+
24
+
25
+ ### Features
26
+
27
+ * introduce exodus/ethereumjs ([#4339](https://github.com/ExodusMovement/assets/issues/4339)) ([e81d577](https://github.com/ExodusMovement/assets/commit/e81d5771c4956a22cfcf434a999310bbb5be81a3))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * ethereum create asset config initialization ([#4483](https://github.com/ExodusMovement/assets/issues/4483)) ([8a596d5](https://github.com/ExodusMovement/assets/commit/8a596d598c855203b6a5cac91c7fa36fb46f2842))
33
+
34
+
35
+
6
36
  ## [2.4.2](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-plugin@2.4.1...@exodus/ethereum-plugin@2.4.2) (2024-10-09)
7
37
 
8
38
 
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @exodus/ethereum-plugin
2
+
3
+ Ethereum plugin for Exodus SDK powered wallets. See [Asset Packages](../../docs/asset-packages.md) for more detail on this package's role.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-plugin",
3
- "version": "2.4.2",
4
- "description": "Exodus ethereum-plugin",
3
+ "version": "2.6.0",
4
+ "description": "Ethereum plugin for Exodus SDK powered wallets",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "files": [
@@ -20,12 +20,11 @@
20
20
  "lint:fix": "yarn lint --fix"
21
21
  },
22
22
  "dependencies": {
23
- "@exodus/asset-lib": "^5.0.0",
24
- "@exodus/currency": "^5.0.2",
25
- "@exodus/ethereum-api": "^8.20.0",
23
+ "@exodus/currency": "^6.0.1",
24
+ "@exodus/ethereum-api": "^8.22.0",
26
25
  "@exodus/ethereum-lib": "^5.4.0",
27
26
  "@exodus/ethereum-meta": "^2.0.0",
28
- "@exodus/ethereumjs-util": "^7.1.0-exodus.7",
27
+ "@exodus/ethereumjs": "^1.0.0",
29
28
  "@exodus/simple-retry": "^0.0.6",
30
29
  "bn.js": "^5.2.1",
31
30
  "minimalistic-assert": "^1.0.1"
@@ -43,5 +42,5 @@
43
42
  "type": "git",
44
43
  "url": "git+https://github.com/ExodusMovement/assets.git"
45
44
  },
46
- "gitHead": "a3826445e762843c0bccc5d9f94ecbb9dfe9648d"
45
+ "gitHead": "9888fd7b7356fd52f0bf92e505071565c8fa19ce"
47
46
  }
package/src/index.js CHANGED
@@ -2,12 +2,24 @@
2
2
  import { createAssetFactory } from '@exodus/ethereum-api'
3
3
  import assetsList from '@exodus/ethereum-meta'
4
4
 
5
- import feeData from './fee-data.js'
6
5
  import { stakingConfiguration, stakingDependencies } from './staking.js'
7
6
 
8
7
  const createAsset = createAssetFactory({
9
8
  assetsList,
10
- feeData,
9
+ feeDataConfig: {
10
+ gasPrice: '75 Gwei',
11
+ baseFeePerGas: '50 Gwei',
12
+ max: '250 Gwei',
13
+ min: '1 Gwei',
14
+ fuelThreshold: '0.025 ETH',
15
+ swapFee: '0.05 ETH',
16
+ gasPriceEconomicalRate: 0.7,
17
+ gasPriceMinimumRate: 0.5,
18
+ enableFeeDelegation: false,
19
+ tipGasPrice: '2 Gwei',
20
+ eip1559Enabled: true,
21
+ rbfEnabled: true,
22
+ },
11
23
  nfts: true,
12
24
  isMaxFeeAsset: true,
13
25
  erc20FuelBuffer: 1.1, // 10% more than the required fee
@@ -1,6 +1,6 @@
1
1
  import { fromHexToBN, fromHexToString, splitIn32BytesArray } from '@exodus/ethereum-api'
2
2
  import { createContract } from '@exodus/ethereum-lib'
3
- import { bufferToHex } from '@exodus/ethereumjs-util'
3
+ import { bufferToHex } from '@exodus/ethereumjs/util'
4
4
  import { retry } from '@exodus/simple-retry'
5
5
  import BN from 'bn.js'
6
6
 
@@ -55,16 +55,16 @@ const calculateRewardsFromStakeTxFactory =
55
55
  ({ decodeStakingTxAmount }) =>
56
56
  ({ tx, currency }) => {
57
57
  const stakedAmount = currency.baseUnit(decodeStakingTxAmount(tx))
58
- const { reward } = tx.data
58
+ const { rewards } = tx.data
59
59
  // stake tx might have rewards in it,
60
60
  // i.e: https://etherscan.io/tx/0x0a81d266109034a3a70c6f1b9601c105d8caebbd0de652a0619344f9559ae4fa
61
- // thus reward = txInputAmount(amount to stake) - tx.coinAmount
61
+ // thus rewards = txInputAmount(amount to stake) - tx.coinAmount
62
62
  // tx.coinAmount is already computed from monitor; incoming - outgoing ERC20 token txs
63
63
  const stakeTxContainsReward = !stakedAmount.equals(tx.coinAmount.abs())
64
64
 
65
- if (reward) {
65
+ if (rewards) {
66
66
  // cache rewards
67
- return currency.baseUnit(reward)
67
+ return currency.defaultUnit(rewards)
68
68
  }
69
69
 
70
70
  if (stakeTxContainsReward) {
package/src/fee-data.js DELETED
@@ -1,21 +0,0 @@
1
- import { FeeData } from '@exodus/asset-lib'
2
- import { asset } from '@exodus/ethereum-meta'
3
-
4
- export default new FeeData({
5
- config: {
6
- gasPrice: '75 Gwei',
7
- baseFeePerGas: '50 Gwei',
8
- max: '250 Gwei',
9
- min: '1 Gwei',
10
- fuelThreshold: '0.025 ETH',
11
- swapFee: '0.05 ETH',
12
- gasPriceEconomicalRate: 0.7,
13
- gasPriceMinimumRate: 0.5,
14
- enableFeeDelegation: false,
15
- tipGasPrice: '2 Gwei',
16
- eip1559Enabled: true,
17
- rbfEnabled: true,
18
- },
19
- mainKey: 'gasPrice',
20
- currency: asset.currency,
21
- })