@exodus/web3-ethereum 6.2.2 → 7.0.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fetchGasLimit, getNonce as apiGetNonce, getServer, } from '@exodus/ethereum-api';
|
|
2
|
-
import {
|
|
2
|
+
import { createSimulationService } from '@exodus/web3-ethereum-utils';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
4
|
const createEvmDepsFactory = ({ analytics, blockchainMetadata, simulateTransactionConfig = {}, }) => {
|
|
5
5
|
return ({ assetName, origin, getAsset, getAddress: _getAddress, getPrivateKey: _getPrivateKey, getFeeData: getFeeConfig, getActiveWalletAccount, }) => {
|
|
@@ -79,7 +79,7 @@ const createEvmDepsFactory = ({ analytics, blockchainMetadata, simulateTransacti
|
|
|
79
79
|
return true;
|
|
80
80
|
};
|
|
81
81
|
const getOrigin = () => origin;
|
|
82
|
-
const
|
|
82
|
+
const simulationFunctions = createSimulationService(simulateTransactionConfig);
|
|
83
83
|
return {
|
|
84
84
|
chainId: 'undefined',
|
|
85
85
|
forwardRequest,
|
|
@@ -91,7 +91,7 @@ const createEvmDepsFactory = ({ analytics, blockchainMetadata, simulateTransacti
|
|
|
91
91
|
getEstimatedGas,
|
|
92
92
|
onEthWalletWatchAssetRequest: trackWalletWatchAssetUse,
|
|
93
93
|
getOrigin,
|
|
94
|
-
|
|
94
|
+
...simulationFunctions,
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
97
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import type { EthAggregatedTransactionSimulationResult, EthSimulateTransactionParams, EthTransaction, EthTransactionHash, EthWalletWatchAsset } from '@exodus/web3-ethereum-utils';
|
|
3
3
|
import type { CommonDeps } from '@exodus/web3-rpc-handlers';
|
|
4
|
-
import type { Asset, IAnalyticsModule, IBlockchainMetadataModule, EthereumFeeData, GetFeeDataParams,
|
|
4
|
+
import type { Asset, IAnalyticsModule, IBlockchainMetadataModule, EthereumFeeData, GetFeeDataParams, CreateSimulationServiceParams, ScanDomainsFn } from '@exodus/web3-types';
|
|
5
5
|
/**
|
|
6
6
|
* EVM-compatible chains.
|
|
7
7
|
*/
|
|
@@ -17,7 +17,7 @@ export interface FeeData {
|
|
|
17
17
|
export interface CreateEvmDepsFactoryParams {
|
|
18
18
|
analytics: IAnalyticsModule;
|
|
19
19
|
blockchainMetadata: IBlockchainMetadataModule;
|
|
20
|
-
simulateTransactionConfig?:
|
|
20
|
+
simulateTransactionConfig?: CreateSimulationServiceParams;
|
|
21
21
|
}
|
|
22
22
|
export interface CreateEvmDepsParams {
|
|
23
23
|
assetName: string;
|
|
@@ -37,6 +37,7 @@ export declare type EVMDeps = {
|
|
|
37
37
|
getPrivateKey: () => Promise<Buffer>;
|
|
38
38
|
sendRawTransaction: (rawTransaction: string) => Promise<EthTransactionHash>;
|
|
39
39
|
simulateTransaction: (params: EthSimulateTransactionParams) => Promise<EthAggregatedTransactionSimulationResult>;
|
|
40
|
+
scanDomains: ScanDomainsFn;
|
|
40
41
|
getEstimatedGas: (transaction: EthTransaction) => Promise<string>;
|
|
41
42
|
getFeeData: () => Promise<FeeData>;
|
|
42
43
|
getOrigin: () => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/web3-ethereum",
|
|
3
3
|
"description": "Apps connectivity library for EVM-compatible chains.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"module": "lib/index.js",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"@exodus/currency": "^2.1.2",
|
|
34
34
|
"@exodus/ethereum-api": "^6.0.0",
|
|
35
35
|
"@exodus/web3-constants": "^1.29.0",
|
|
36
|
-
"@exodus/web3-ethereum-utils": "^
|
|
37
|
-
"@exodus/web3-provider": "^2.
|
|
38
|
-
"@exodus/web3-rpc-handlers": "^1.
|
|
39
|
-
"@exodus/web3-utils": "^1.
|
|
36
|
+
"@exodus/web3-ethereum-utils": "^3.0.0",
|
|
37
|
+
"@exodus/web3-provider": "^2.32.0",
|
|
38
|
+
"@exodus/web3-rpc-handlers": "^1.7.0",
|
|
39
|
+
"@exodus/web3-utils": "^1.22.0",
|
|
40
40
|
"bn.js": "^5.2.0",
|
|
41
41
|
"eth-rpc-errors": "^4.0.3"
|
|
42
42
|
},
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"@exodus/assets": "^8.0.72",
|
|
45
45
|
"@exodus/json-rpc": "^1.11.0",
|
|
46
46
|
"@exodus/schemasafe": "^1.0.0",
|
|
47
|
-
"@exodus/web3-types": "^1.
|
|
47
|
+
"@exodus/web3-types": "^1.30.0",
|
|
48
48
|
"@exodus/web3-validation": "^1.36.0",
|
|
49
49
|
"@wallet-standard/base": "^1.0.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@exodus/assets": "^8.0.72"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "5130517c87424b7118b272f053d10fb42750fa3f"
|
|
55
55
|
}
|