@exodus/ethereum-lib 2.17.0 → 2.19.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/package.json +2 -2
- package/src/constants.js +12 -0
- package/src/fee-data/avalanchec.js +2 -0
- package/src/fee-data/bsc.js +1 -0
- package/src/fee-data/ethereumclassic.js +1 -0
- package/src/fee-data/fantom.js +1 -0
- package/src/fee-data/harmony.js +1 -0
- package/src/fee-data/polygon.js +3 -1
- package/src/unsigned-tx/sign-unsigned-tx.js +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-lib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"description": "Ethereum Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@exodus/assets": "8.0.x"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "52d783c8952348157fe767187533498088c52b01"
|
|
28
28
|
}
|
package/src/constants.js
CHANGED
|
@@ -35,3 +35,15 @@ export const ETHEREUM_LIKE_TOKEN_TYPES = [
|
|
|
35
35
|
'FTM_ERC20',
|
|
36
36
|
]
|
|
37
37
|
export const BUMP_RATE = 1.2
|
|
38
|
+
|
|
39
|
+
export const CUSTOM_CHAINS = ['avalanchec', 'matic'].map((name) => ({
|
|
40
|
+
chainId: CHAIN_IDS[name],
|
|
41
|
+
networkId: CHAIN_IDS[name],
|
|
42
|
+
name,
|
|
43
|
+
genesis: {},
|
|
44
|
+
bootstrapNodes: [],
|
|
45
|
+
hardforks: [
|
|
46
|
+
{ name: 'berlin', block: null },
|
|
47
|
+
{ name: 'london', block: null },
|
|
48
|
+
],
|
|
49
|
+
}))
|
package/src/fee-data/bsc.js
CHANGED
package/src/fee-data/fantom.js
CHANGED
package/src/fee-data/harmony.js
CHANGED
package/src/fee-data/polygon.js
CHANGED
|
@@ -5,10 +5,12 @@ export default new FeeData(
|
|
|
5
5
|
// https://polygonscan.com/chart/gasprice
|
|
6
6
|
gasPrice: '5 Gwei',
|
|
7
7
|
max: '300 Gwei',
|
|
8
|
-
min: '
|
|
8
|
+
min: '40 Gwei',
|
|
9
9
|
fuelThreshold: '2500000 Gwei',
|
|
10
10
|
gasPriceEconomicalRate: 0.8,
|
|
11
11
|
gasPriceMinimumRate: 0.6,
|
|
12
|
+
eip1559Enabled: true,
|
|
13
|
+
tipGasPrice: '35 Gwei',
|
|
12
14
|
},
|
|
13
15
|
'gasPrice',
|
|
14
16
|
'matic'
|
|
@@ -3,6 +3,7 @@ import { Transaction, FeeMarketEIP1559Transaction } from '@exodus/ethereumjs-tx'
|
|
|
3
3
|
import Common from '@exodus/ethereumjs-common'
|
|
4
4
|
|
|
5
5
|
import type { UnsignedTransaction, SignedTransaction } from '@exodus/models/lib/types'
|
|
6
|
+
import { CUSTOM_CHAINS } from '../constants'
|
|
6
7
|
|
|
7
8
|
export default function signUnsignedTx(
|
|
8
9
|
unsignedTx: UnsignedTransaction,
|
|
@@ -29,7 +30,14 @@ export default function signUnsignedTx(
|
|
|
29
30
|
type: '0x02', // https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/tx#gas-fee-market-transactions-eip-1559,
|
|
30
31
|
...txData,
|
|
31
32
|
},
|
|
32
|
-
{
|
|
33
|
+
{
|
|
34
|
+
common: new Common({
|
|
35
|
+
chain,
|
|
36
|
+
hardfork: 'london',
|
|
37
|
+
customChains: CUSTOM_CHAINS,
|
|
38
|
+
eips: [1559],
|
|
39
|
+
}),
|
|
40
|
+
}
|
|
33
41
|
)
|
|
34
42
|
} else {
|
|
35
43
|
// Legacy tx
|