@exodus/ethereum-lib 3.3.17 → 3.3.19
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/package.json +2 -2
- package/src/encode.js +5 -1
- package/src/fee-data/aurora.js +1 -1
- package/src/fee-data/cronos.js +17 -0
- package/src/fee-data/flare.js +1 -1
- package/src/fee-data/index.js +1 -0
- package/src/fee-data/rootstock.js +1 -1
- package/src/utils/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-lib",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.19",
|
|
4
4
|
"description": "Ethereum Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"ms": "^2.1.1",
|
|
43
43
|
"reselect": "~3.0.1"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "9d8358f8401e41cff393d63d50cfc1cd6e8cdc88"
|
|
46
46
|
}
|
package/src/encode.js
CHANGED
|
@@ -31,7 +31,11 @@ export function encodePublic(compressedPubKey, { baseAssetName } = {}) {
|
|
|
31
31
|
const hash160bits = etherUtil.publicToAddress(compressedPubKey, true)
|
|
32
32
|
|
|
33
33
|
if (baseAssetName && CHAIN_IDS[baseAssetName]) {
|
|
34
|
-
|
|
34
|
+
const address = etherUtil.toChecksumAddress(
|
|
35
|
+
'0x' + hash160bits.toString('hex'),
|
|
36
|
+
CHAIN_IDS[baseAssetName]
|
|
37
|
+
)
|
|
38
|
+
return baseAssetName === 'rootstock' ? address.toLowerCase() : address
|
|
35
39
|
}
|
|
36
40
|
return etherUtil.toChecksumAddress('0x' + hash160bits.toString('hex'))
|
|
37
41
|
}
|
package/src/fee-data/aurora.js
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FeeData } from '@exodus/asset-lib'
|
|
2
|
+
import { asset } from '@exodus/cronos-meta'
|
|
3
|
+
|
|
4
|
+
export default new FeeData({
|
|
5
|
+
config: {
|
|
6
|
+
gasPrice: '5500 Gwei',
|
|
7
|
+
max: '6500 Gwei',
|
|
8
|
+
min: '5000 Gwei',
|
|
9
|
+
fuelThreshold: '4000 Gwei',
|
|
10
|
+
gasPriceEconomicalRate: 0.8,
|
|
11
|
+
gasPriceMinimumRate: 0.6,
|
|
12
|
+
enableFeeDelegation: false,
|
|
13
|
+
eip1559Enabled: false,
|
|
14
|
+
},
|
|
15
|
+
mainKey: 'gasPrice',
|
|
16
|
+
currency: asset.currency,
|
|
17
|
+
})
|
package/src/fee-data/flare.js
CHANGED
package/src/fee-data/index.js
CHANGED
package/src/utils/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export const isRootstockToken = (asset) => asset.assetType === 'RSK_ERC20'
|
|
|
25
25
|
export const isOptimismToken = (asset) => asset.assetType === 'OPT_ERC20'
|
|
26
26
|
export const isFlareToken = (asset) => asset.assetType === 'FLR_ERC20'
|
|
27
27
|
export const isAuroraToken = (asset) => asset.assetType === 'AURORA_ERC20'
|
|
28
|
+
export const isCronosToken = (asset) => asset.assetType === 'CRC20'
|
|
28
29
|
|
|
29
30
|
// All ethereum-like tokens
|
|
30
31
|
export const isEthereumLikeToken = (asset) => ETHEREUM_LIKE_TOKEN_TYPES.includes(asset.assetType)
|