@exodus/ethereum-api 2.2.0 → 2.2.1
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": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Ethereum Api",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"url-join": "4.0.0",
|
|
21
21
|
"ws": "6.1.0"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "124d585074d888dda100311f7fa15063fae3357d"
|
|
24
24
|
}
|
package/src/eth-like-util.js
CHANGED
|
@@ -14,6 +14,14 @@ export async function isContractAddress({ asset, address }) {
|
|
|
14
14
|
return getServer(asset).isContract(address)
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export async function isForwarderContract({ asset, address }) {
|
|
18
|
+
const contractCode = await getServer(asset).getCode(address)
|
|
19
|
+
return (
|
|
20
|
+
contractCode ===
|
|
21
|
+
'0x5836818037808036817364b29dc43e817817cf77468c8dda63d98ce08fb25af43d91908282803e602b57fd5bf3'
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
export async function getNonce({ asset, address, tag = 'latest' }) {
|
|
18
26
|
const server = getServer(asset)
|
|
19
27
|
const nonce = await server.getTransactionCount(address, tag)
|
|
@@ -10,6 +10,7 @@ export const eth = create(EXODUS_ETH_SERVER_URL)
|
|
|
10
10
|
export const etc = create(EXODUS_ETC_SERVER_URL)
|
|
11
11
|
export const quorum = create(EXODUS_QUORUM_SERVER_URL)
|
|
12
12
|
|
|
13
|
+
// exported for in-library use only.
|
|
13
14
|
export const serverMap = {
|
|
14
15
|
ethereum: eth,
|
|
15
16
|
ethereumclassic: etc,
|