@exodus/web3-ethereum 13.1.2 → 13.3.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,9 +1,12 @@
|
|
|
1
|
-
import { getNonce as apiGetNonce
|
|
1
|
+
import { getNonce as apiGetNonce } from '@exodus/ethereum-api';
|
|
2
2
|
const createEVMDepsFactory = ({ analytics, blockchainMetadata, }) => {
|
|
3
3
|
return ({ addEthereumChain, assetName, chainId: _chainId, origin, getAsset, getAddress: _getAddress, getSupportedChainIds, getFeeData: getFeeConfig, getCustomFeeRate, getActiveWalletAccount, simulateEthereumTransactions, getActiveWalletAccountData, transactionSigner, messageSigner, onEthWalletWatchAssetRequest: _onEthWalletWatchAssetRequest, }) => {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const getServer = async () => {
|
|
5
|
+
const asset = await getAsset(assetName);
|
|
6
|
+
return asset.server;
|
|
7
|
+
};
|
|
8
|
+
const forwardRequest = async ({ method, params, }) => {
|
|
9
|
+
const server = await getServer();
|
|
7
10
|
if (server.proxyToCoinNode) {
|
|
8
11
|
return server.proxyToCoinNode({ method, params });
|
|
9
12
|
}
|
|
@@ -11,12 +14,14 @@ const createEVMDepsFactory = ({ analytics, blockchainMetadata, }) => {
|
|
|
11
14
|
return server.sendRequest(request);
|
|
12
15
|
};
|
|
13
16
|
const sendRawTransaction = async (rawTransaction) => {
|
|
17
|
+
const server = await getServer();
|
|
14
18
|
return server.sendRawTransaction(rawTransaction);
|
|
15
19
|
};
|
|
16
20
|
const getAddress = async () => {
|
|
17
21
|
return _getAddress(assetName);
|
|
18
22
|
};
|
|
19
23
|
const getNonce = async () => {
|
|
24
|
+
const asset = await getAsset(assetName);
|
|
20
25
|
const [baseAssetTxLog, blockchainNonce] = await Promise.all([
|
|
21
26
|
blockchainMetadata.getTxLog({
|
|
22
27
|
assetName,
|
package/lib/types.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface CreateEvmDepsParams {
|
|
|
33
33
|
origin: string;
|
|
34
34
|
getAddress: (assetName: string) => Promise<string>;
|
|
35
35
|
getActiveWalletAccount: () => Promise<string>;
|
|
36
|
-
getAsset: (assetName: string) => Asset
|
|
36
|
+
getAsset: (assetName: string) => Promise<Asset>;
|
|
37
37
|
getFeeData: ({ assetName }: GetFeeDataParams) => Promise<EthereumFeeData>;
|
|
38
38
|
getCustomFeeRate?: () => Promise<NumberUnit>;
|
|
39
39
|
getSupportedChainIds?: () => Promise<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": "13.
|
|
4
|
+
"version": "13.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"module": "lib/index.js",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"test": "run -T exodus-test --jest --esbuild"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@exodus/ethereum-api": "^8.
|
|
42
|
+
"@exodus/ethereum-api": "^8.31.0",
|
|
43
43
|
"@exodus/web3-constants": "^1.30.0",
|
|
44
|
-
"@exodus/web3-ethereum-utils": "^
|
|
44
|
+
"@exodus/web3-ethereum-utils": "^4.2.1",
|
|
45
45
|
"@exodus/web3-provider": "^3.15.0",
|
|
46
46
|
"@exodus/web3-rpc-handlers": "^2.25.0",
|
|
47
47
|
"@exodus/web3-utils": "^1.48.2",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"eth-rpc-errors": "^4.0.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@exodus/assets": "^11.
|
|
53
|
-
"@exodus/ethereum-meta": "^2.
|
|
52
|
+
"@exodus/assets": "^11.2.0",
|
|
53
|
+
"@exodus/ethereum-meta": "^2.4.0",
|
|
54
54
|
"@exodus/json-rpc": "^1.11.0",
|
|
55
55
|
"@exodus/schemasafe": "^1.0.0",
|
|
56
56
|
"@exodus/web3-management": "0.36.1",
|
|
57
|
-
"@exodus/web3-types": "1.
|
|
57
|
+
"@exodus/web3-types": "1.57.0",
|
|
58
58
|
"@exodus/web3-validation": "^1.38.0",
|
|
59
59
|
"@wallet-standard/base": "^1.0.1"
|
|
60
60
|
},
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Aweb3-ethereum"
|
|
64
64
|
},
|
|
65
65
|
"homepage": "https://github.com/ExodusMovement/assets/tree/master/web3/web3-ethereum",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "488ead4b3bcd6992504744ed384a8206ad9b4d63"
|
|
67
67
|
}
|