@exodus/ethereum-plugin 2.5.0 → 2.7.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 +34 -0
- package/README.md +3 -0
- package/package.json +5 -6
- package/src/index.js +14 -2
- package/src/staking/polygon/staking-utils.js +4 -4
- package/src/fee-data.js +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,40 @@
|
|
|
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.7.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-plugin@2.6.0...@exodus/ethereum-plugin@2.7.0) (2024-12-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* feat: customFees api (#4653)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* fix: remove gasPriceEconomicalRate (#4659)
|
|
19
|
+
|
|
20
|
+
* fix: use multipled gasPrice when sending (#4628)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [2.6.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-plugin@2.5.0...@exodus/ethereum-plugin@2.6.0) (2024-12-02)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
* feat: gasPriceMaximumRate in evm fee data (#4578)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
* fix: polygon staking rewards typo (#4481)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
6
40
|
## [2.5.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-plugin@2.4.2...@exodus/ethereum-plugin@2.5.0) (2024-11-05)
|
|
7
41
|
|
|
8
42
|
|
package/README.md
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-plugin",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Exodus
|
|
3
|
+
"version": "2.7.0",
|
|
4
|
+
"description": "Ethereum plugin for Exodus SDK powered wallets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"files": [
|
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
"lint:fix": "yarn lint --fix"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@exodus/
|
|
24
|
-
"@exodus/
|
|
25
|
-
"@exodus/ethereum-api": "^8.21.1",
|
|
23
|
+
"@exodus/currency": "^6.0.1",
|
|
24
|
+
"@exodus/ethereum-api": "^8.23.0",
|
|
26
25
|
"@exodus/ethereum-lib": "^5.4.0",
|
|
27
26
|
"@exodus/ethereum-meta": "^2.0.0",
|
|
28
27
|
"@exodus/ethereumjs": "^1.0.0",
|
|
@@ -43,5 +42,5 @@
|
|
|
43
42
|
"type": "git",
|
|
44
43
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
45
44
|
},
|
|
46
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "4d505ee7d024c0ae961e2d95e6408b0b251a7d89"
|
|
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
|
-
|
|
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
|
+
gasPriceMinimumRate: 0.5,
|
|
17
|
+
enableFeeDelegation: false,
|
|
18
|
+
tipGasPrice: '2 Gwei',
|
|
19
|
+
eip1559Enabled: true,
|
|
20
|
+
rbfEnabled: true,
|
|
21
|
+
},
|
|
22
|
+
supportsCustomFees: true,
|
|
11
23
|
nfts: true,
|
|
12
24
|
isMaxFeeAsset: true,
|
|
13
25
|
erc20FuelBuffer: 1.1, // 10% more than the required fee
|
|
@@ -55,16 +55,16 @@ const calculateRewardsFromStakeTxFactory =
|
|
|
55
55
|
({ decodeStakingTxAmount }) =>
|
|
56
56
|
({ tx, currency }) => {
|
|
57
57
|
const stakedAmount = currency.baseUnit(decodeStakingTxAmount(tx))
|
|
58
|
-
const {
|
|
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
|
|
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 (
|
|
65
|
+
if (rewards) {
|
|
66
66
|
// cache rewards
|
|
67
|
-
return currency.
|
|
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
|
-
})
|