@exodus/ethereum-api 8.0.0 → 8.1.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-api",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "Ethereum Api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@exodus/models": "^11.0.0",
|
|
35
35
|
"@exodus/simple-retry": "^0.0.6",
|
|
36
36
|
"@exodus/solidity-contract": "^1.1.3",
|
|
37
|
+
"@exodus/web3-ethereum-utils": "^3.27.1",
|
|
37
38
|
"bn.js": "^5.2.1",
|
|
38
39
|
"events": "^1.1.1",
|
|
39
40
|
"idna-uts46-hx": "^2.3.1",
|
|
@@ -57,5 +58,5 @@
|
|
|
57
58
|
"cross-fetch": "^3.1.5",
|
|
58
59
|
"delay": "4.0.1"
|
|
59
60
|
},
|
|
60
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "9120b0dfea639ff93152815358276f4c1668c913"
|
|
61
62
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -37,6 +37,7 @@ import { serverBasedFeeMonitorFactoryFactory } from './server-based-fee-monitor'
|
|
|
37
37
|
import { createGetBalanceForAddress } from './get-balance-for-address'
|
|
38
38
|
import { estimateL1DataFeeFactory, getL1GetFeeFactory } from './optimism-gas'
|
|
39
39
|
import { mapValues } from 'lodash'
|
|
40
|
+
import { createWeb3API } from './web3'
|
|
40
41
|
|
|
41
42
|
export const createAssetFactory = ({
|
|
42
43
|
assetsList,
|
|
@@ -239,6 +240,7 @@ export const createAssetFactory = ({
|
|
|
239
240
|
signer ? signMessageWithSigner({ message, signer }) : signMessage({ privateKey, message }),
|
|
240
241
|
...(supportsStaking && { staking: createStakingApi({ network: asset.name }) }),
|
|
241
242
|
validateAssetId: address.validate,
|
|
243
|
+
web3: createWeb3API({ asset }),
|
|
242
244
|
}
|
|
243
245
|
|
|
244
246
|
const fullAsset = {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createSimulateMessage as createSimulateEVMMessage } from '@exodus/web3-ethereum-utils'
|
|
2
|
+
import assert from 'minimalistic-assert'
|
|
3
|
+
|
|
4
|
+
export const createSimulateMessage = ({ asset }) => {
|
|
5
|
+
assert('asset', '"asset" should be passed.')
|
|
6
|
+
|
|
7
|
+
const simulateEVMMessage = createSimulateEVMMessage()
|
|
8
|
+
|
|
9
|
+
return function simulateMessage({ message, ...restParameters }) {
|
|
10
|
+
return simulateEVMMessage({ asset, message, ...restParameters })
|
|
11
|
+
}
|
|
12
|
+
}
|