@exodus/ethereum-lib 5.1.1 → 5.2.1

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 ADDED
@@ -0,0 +1,169 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [5.2.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.2.0...@exodus/ethereum-lib@5.2.1) (2024-06-10)
7
+
8
+ **Note:** Version bump only for package @exodus/ethereum-lib
9
+
10
+
11
+
12
+
13
+
14
+ ## [5.2.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.1.1...@exodus/ethereum-lib@5.2.0) (2024-05-23)
15
+
16
+
17
+ ### Features
18
+
19
+ * add arbone sepolia ([#2359](https://github.com/ExodusMovement/assets/issues/2359)) ([3056882](https://github.com/ExodusMovement/assets/commit/3056882cad08722fdad14ffdb2149208af469cdf))
20
+ * Mantle Sepolia support ([#2355](https://github.com/ExodusMovement/assets/issues/2355)) ([fff6710](https://github.com/ExodusMovement/assets/commit/fff6710a76cbac3f218a018090c210e03882439a))
21
+
22
+
23
+
24
+ ## [5.1.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.1.0...@exodus/ethereum-lib@5.1.1) (2024-05-21)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * remove unused ethereum-lib prod deps ([#2339](https://github.com/ExodusMovement/assets/issues/2339)) ([3f02d06](https://github.com/ExodusMovement/assets/commit/3f02d06f34881bdbec8f7de9fbb2dd52d0e20547))
30
+
31
+
32
+
33
+ ## [5.1.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.0.1...@exodus/ethereum-lib@5.1.0) (2024-05-20)
34
+
35
+
36
+ ### Features
37
+
38
+ * add Mantle EVM ([#2320](https://github.com/ExodusMovement/assets/issues/2320)) ([14ca748](https://github.com/ExodusMovement/assets/commit/14ca7486703bf4b1a16fa6af522e82a9e1309156))
39
+
40
+
41
+
42
+ ## [5.0.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@5.0.0...@exodus/ethereum-lib@5.0.1) (2024-05-20)
43
+
44
+
45
+ ### Bug Fixes
46
+
47
+ * gracefully handle different recovery param notations ([#2326](https://github.com/ExodusMovement/assets/issues/2326)) ([e7d0fbf](https://github.com/ExodusMovement/assets/commit/e7d0fbf389ace17b36e8792116df33b98fb872de))
48
+
49
+
50
+
51
+ ## [5.0.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.9.0...@exodus/ethereum-lib@5.0.0) (2024-05-17)
52
+
53
+
54
+ ### ⚠ BREAKING CHANGES
55
+
56
+ * evm chain data to be factory params (#2115)
57
+ * chain id param in create and sign tx (#2282)
58
+ * moved fee data to each EVM plugin (#2233)
59
+ * evm useEip1191ChainIdChecksum param (#2110)
60
+ * clean up evms fee data monitors (#2230)
61
+
62
+ ### Features
63
+
64
+ * demote USDC.e tokens ([#2300](https://github.com/ExodusMovement/assets/issues/2300)) ([17a51b3](https://github.com/ExodusMovement/assets/commit/17a51b3b2d42e70f55d41e8eb581e89cba19daed))
65
+ * evm chain data to be factory params ([#2115](https://github.com/ExodusMovement/assets/issues/2115)) ([a2aeec1](https://github.com/ExodusMovement/assets/commit/a2aeec1b4da177b1e1bb85f92e93115fc97d5377))
66
+
67
+
68
+ ### Code Refactoring
69
+
70
+ * chain id param in create and sign tx ([#2282](https://github.com/ExodusMovement/assets/issues/2282)) ([4d915ac](https://github.com/ExodusMovement/assets/commit/4d915ac60e49ebe9d4e36d2fcecf7c17777f13b9))
71
+ * clean up evms fee data monitors ([#2230](https://github.com/ExodusMovement/assets/issues/2230)) ([4e7a18f](https://github.com/ExodusMovement/assets/commit/4e7a18f799e0800c01e07ca83ddaf6778ada23ce))
72
+ * evm useEip1191ChainIdChecksum param ([#2110](https://github.com/ExodusMovement/assets/issues/2110)) ([2169686](https://github.com/ExodusMovement/assets/commit/2169686cb4c11bb8f0691196b25002b6cf462e1e))
73
+ * moved fee data to each EVM plugin ([#2233](https://github.com/ExodusMovement/assets/issues/2233)) ([ec066c0](https://github.com/ExodusMovement/assets/commit/ec066c076bc36a4c7c05810e83cdd47a7a25384b))
74
+
75
+
76
+
77
+ ## [4.9.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.8.0...@exodus/ethereum-lib@4.9.0) (2024-05-10)
78
+
79
+
80
+ ### Features
81
+
82
+ * pass `signatureType` to external signer for ethereum likes ([#2245](https://github.com/ExodusMovement/assets/issues/2245)) ([690593e](https://github.com/ExodusMovement/assets/commit/690593e3a17d8465a10d3b3b0f669742d60f7b15))
83
+
84
+
85
+ ### Bug Fixes
86
+
87
+ * enable Base eip1559 ([#2210](https://github.com/ExodusMovement/assets/issues/2210)) ([8b7e807](https://github.com/ExodusMovement/assets/commit/8b7e807907e961aae47d3beb50cd69502e5a04e2))
88
+
89
+
90
+
91
+ ## [4.8.1](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.8.0...@exodus/ethereum-lib@4.8.1) (2024-05-04)
92
+
93
+
94
+ ### Bug Fixes
95
+
96
+ * enable Base eip1559 ([#2210](https://github.com/ExodusMovement/assets/issues/2210)) ([8b7e807](https://github.com/ExodusMovement/assets/commit/8b7e807907e961aae47d3beb50cd69502e5a04e2))
97
+
98
+
99
+
100
+ ## [4.8.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.7.0...@exodus/ethereum-lib@4.8.0) (2024-05-02)
101
+
102
+
103
+ ### Features
104
+
105
+ * export signMessageWithSigner from index ([#2162](https://github.com/ExodusMovement/assets/issues/2162)) ([5849688](https://github.com/ExodusMovement/assets/commit/5849688c64761dbfe00c3d47f0654dd23e1e9167))
106
+
107
+
108
+
109
+ ## [4.7.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.6.0...@exodus/ethereum-lib@4.7.0) (2024-04-22)
110
+
111
+
112
+ ### Features
113
+
114
+ * allowXPUB in ethereum key-identifier ([#2136](https://github.com/ExodusMovement/assets/issues/2136)) ([308181c](https://github.com/ExodusMovement/assets/commit/308181cf602e433aa2ae1944663a01fc6c524b1a))
115
+
116
+
117
+
118
+ ## [4.6.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.5.0...@exodus/ethereum-lib@4.6.0) (2024-04-17)
119
+
120
+
121
+ ### Features
122
+
123
+ * **ethereum:** add `fromAddress` in `txMeta` ([#2106](https://github.com/ExodusMovement/assets/issues/2106)) ([451753e](https://github.com/ExodusMovement/assets/commit/451753ea85625c6ef4e17dcde8ed47186fe92a3e))
124
+ * expose signMessage & signHardware ([#2103](https://github.com/ExodusMovement/assets/issues/2103)) ([60ea167](https://github.com/ExodusMovement/assets/commit/60ea167283e2e4b82a69530ba156c56dead8812c))
125
+ * support signing messages with external signer ([#2105](https://github.com/ExodusMovement/assets/issues/2105)) ([88669f6](https://github.com/ExodusMovement/assets/commit/88669f6608b72eda2d16397ce808684ec07407e0))
126
+
127
+
128
+
129
+ ## [4.5.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.4.0...@exodus/ethereum-lib@4.5.0) (2024-04-11)
130
+
131
+
132
+ ### Features
133
+
134
+ * **ethereum:** add signMessage ([#1974](https://github.com/ExodusMovement/assets/issues/1974)) ([63c20f4](https://github.com/ExodusMovement/assets/commit/63c20f44b2348860687af01d81e27b5868c1a21a))
135
+ * new eth balances (EVM 1) ([#2013](https://github.com/ExodusMovement/assets/issues/2013)) ([5fa2375](https://github.com/ExodusMovement/assets/commit/5fa2375caccf957d2f10c76f279aa1fdc7597df1))
136
+
137
+
138
+ ### Bug Fixes
139
+
140
+ * increase default Base gasPrice ([#2034](https://github.com/ExodusMovement/assets/issues/2034)) ([141960f](https://github.com/ExodusMovement/assets/commit/141960f2ec41d78720587e4e02f5b71bb48ddf0a))
141
+
142
+
143
+
144
+ ## [4.4.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.3.0...@exodus/ethereum-lib@4.4.0) (2024-03-22)
145
+
146
+
147
+ ### Features
148
+
149
+ * **ETH:** add Sepolia testnet ([#1855](https://github.com/ExodusMovement/assets/issues/1855)) ([a2f7c07](https://github.com/ExodusMovement/assets/commit/a2f7c07a1068c8ee0c3646f4eda3b133266f518f))
150
+
151
+
152
+ ### Bug Fixes
153
+
154
+ * ethereum Sepolia yarn ([#1872](https://github.com/ExodusMovement/assets/issues/1872)) ([96831f7](https://github.com/ExodusMovement/assets/commit/96831f747df3c5f13d08f20bce0050c99849fcfe))
155
+
156
+
157
+
158
+ # [4.3.0](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-lib@4.2.7...@exodus/ethereum-lib@4.3.0) (2024-03-18)
159
+
160
+
161
+ ### Features
162
+
163
+ * add support for external signer for ETH ([#1607](https://github.com/ExodusMovement/assets/issues/1607)) ([0323765](https://github.com/ExodusMovement/assets/commit/032376510205417cbbfe3ac0ea14ef203aa3823c))
164
+ * **ethereum:** ethereum tokens cleanup - part 2 ([#1573](https://github.com/ExodusMovement/assets/issues/1573)) ([85b5a10](https://github.com/ExodusMovement/assets/commit/85b5a10e958ba883dd9fbbfc521909a27ea05a12))
165
+
166
+
167
+ ### Reverts
168
+
169
+ * Revert "Publish" ([adb8015](https://github.com/ExodusMovement/assets/commit/adb8015efd51a4fa36ad0c86c28cb2d94c52a578))
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-lib",
3
- "version": "5.1.1",
3
+ "version": "5.2.1",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "files": [
7
7
  "src",
8
+ "CHANGELOG.md",
8
9
  "!src/**/__tests__"
9
10
  ],
10
11
  "author": "Exodus Movement, Inc.",
11
12
  "license": "UNLICENSED",
12
- "homepage": "https://github.com/ExodusMovement/assets/tree/main/ethereum",
13
+ "homepage": "https://github.com/ExodusMovement/assets/tree/master/ethereum/ethereum-lib",
13
14
  "publishConfig": {
14
15
  "access": "restricted"
15
16
  },
16
17
  "scripts": {
17
18
  "test": "run -T jest",
18
- "lint": "run -T eslint src",
19
+ "lint": "run -T eslint .",
19
20
  "lint:fix": "yarn lint --fix"
20
21
  },
21
22
  "dependencies": {
@@ -31,11 +32,11 @@
31
32
  "@exodus/solidity-contract": "^1.1.3",
32
33
  "@metamask/eth-sig-util": "^4.0.1",
33
34
  "base-x": "^3.0.2",
34
- "ethjs-util": "0.1.6",
35
+ "ethjs-util": "^0.1.6",
35
36
  "lodash": "^4.17.15",
36
37
  "minimalistic-assert": "^1.0.1",
37
38
  "ms": "^2.1.1",
38
- "reselect": "~3.0.1"
39
+ "reselect": "^3.0.1"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@exodus/assets": "^9.1.1",
@@ -46,5 +47,12 @@
46
47
  "@exodus/fantommainnet-meta": "^1.1.2",
47
48
  "@exodus/matic-meta": "^1.3.0"
48
49
  },
49
- "gitHead": "89127959e3741665d3a40845a5b21c72053e76cb"
50
+ "bugs": {
51
+ "url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Aethereum-lib"
52
+ },
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/ExodusMovement/assets.git"
56
+ },
57
+ "gitHead": "42f5df2495567a687ee9903b581195d0ce4e0c07"
50
58
  }
package/src/constants.js CHANGED
@@ -125,6 +125,20 @@ const CHAIN_DATA = {
125
125
  monitorType: 'no-history',
126
126
  tokenType: 'MNT_20',
127
127
  },
128
+ mantlesepolia: {
129
+ chainId: 5003,
130
+ serverUrl: 'https://mantle-sepolia-qn.a.exodus.io',
131
+ confirmationsNumber: 30,
132
+ monitorType: 'no-history',
133
+ tokenType: 'SPMNT_20',
134
+ },
135
+ ethereumarbonesepolia: {
136
+ chainId: 421_614,
137
+ serverUrl: 'https://arbitrum-sepolia-qn.a.exodus.io',
138
+ confirmationsNumber: 3,
139
+ monitorType: 'no-history',
140
+ tokenType: 'ETHEREUM_ARBONE_SEPOLIA_ERC20',
141
+ },
128
142
  }
129
143
 
130
144
  export const DEFAULT_SERVER_URLS = mapValues(CHAIN_DATA, ({ serverUrl }) => serverUrl)
package/src/index.js CHANGED
@@ -1,4 +1,3 @@
1
- export * from './balances'
2
1
  export * from './encode'
3
2
  export * from './unsigned-tx'
4
3
  export * from './utils'
@@ -1,29 +0,0 @@
1
- import { get } from 'lodash'
2
-
3
- // @deprecated to be removed. Use balances!
4
- export const getEthereumBalances = ({ asset, liquidBalance, accountState }) => {
5
- // asset = ethereum or ethereumgoerli or ethereumholesky
6
- const delegatedBalance = get(
7
- accountState,
8
- ['staking', asset.name, 'delegatedBalance'],
9
- asset.currency.ZERO
10
- )
11
- const undelegatedBalance = get(
12
- accountState,
13
- ['staking', asset.name, 'unclaimedUndelegatedBalance'],
14
- asset.currency.ZERO
15
- )
16
- const rewardsReceived = get(
17
- accountState,
18
- ['staking', asset.name, 'totalRewardsReceived'],
19
- asset.currency.ZERO
20
- )
21
- const totalBalance = liquidBalance
22
- .add(delegatedBalance)
23
- .add(undelegatedBalance)
24
- .add(rewardsReceived)
25
- return {
26
- balance: totalBalance,
27
- liquidBalance: liquidBalance.add(rewardsReceived),
28
- }
29
- }
@@ -1,3 +0,0 @@
1
- // @deprecated to be removed. Use balances!
2
- export * from './ethereum-balance'
3
- export * from './polygon-balance'
@@ -1,23 +0,0 @@
1
- import { get } from 'lodash'
2
- import assets from '@exodus/ethereum-meta'
3
-
4
- const polygon = assets.find(({ name: tokenName }) => tokenName === 'polygon')
5
-
6
- // @deprecated to be removed. Use balances!
7
- export const getPolygonBalances = ({ liquidBalance, accountState }) => {
8
- const delegatedBalance = get(
9
- accountState,
10
- 'staking.polygon.delegatedBalance',
11
- polygon.currency.ZERO
12
- )
13
- const undelegatedBalance = get(
14
- accountState,
15
- 'staking.polygon.unclaimedUndelegatedBalance',
16
- polygon.currency.ZERO
17
- )
18
- const totalBalance = liquidBalance.add(delegatedBalance).add(undelegatedBalance)
19
- return {
20
- balance: totalBalance,
21
- liquidBalance,
22
- }
23
- }