@cfxjs/sirius-next-common 0.3.2 → 0.3.4
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/dist/{chunk-SFULLYYL.js → chunk-32HFN5MP.js} +3 -3
- package/dist/{chunk-CMM72NR3.js → chunk-47HU5DGL.js} +2 -2
- package/dist/{chunk-D6INJ4N5.js → chunk-4TF33JZW.js} +2 -2
- package/dist/{chunk-2FGJPE3T.js → chunk-5OYITIUX.js} +5 -5
- package/dist/{chunk-IKPPUNBU.js → chunk-6H5XKOXM.js} +2 -2
- package/dist/{chunk-A64ILFRR.js → chunk-7NFRRT77.js} +4 -4
- package/dist/{chunk-7NVZPYT3.js → chunk-7U24RYWX.js} +2 -2
- package/dist/{chunk-IXMDBWQH.js → chunk-DHTXUMRS.js} +2 -2
- package/dist/{chunk-2KJLNPUL.js → chunk-EJDYTF4C.js} +6 -6
- package/dist/{chunk-FLFDRCTI.js → chunk-FYDF5QZ6.js} +3 -3
- package/dist/{chunk-FLFDRCTI.js.map → chunk-FYDF5QZ6.js.map} +1 -1
- package/dist/{chunk-SEIHZVZU.js → chunk-GC3XWDVL.js} +2 -2
- package/dist/{chunk-4AAV4RRZ.js → chunk-GRPL5QSE.js} +5 -5
- package/dist/{chunk-FBGAFVDW.js → chunk-GYK2VPUW.js} +5 -5
- package/dist/{chunk-SCTG3SCG.js → chunk-HU3XDAH5.js} +2 -2
- package/dist/{chunk-CWTDFCRF.js → chunk-HUBXGHJC.js} +3 -3
- package/dist/{chunk-I6OWD4P4.js → chunk-IPACZ2LN.js} +7 -7
- package/dist/{chunk-7BAN6GKP.js → chunk-K6M3ZRL6.js} +3 -3
- package/dist/{chunk-VYI4IZMQ.js → chunk-LDCBSWPD.js} +2 -2
- package/dist/{chunk-NSSKV676.js → chunk-LJUDPQQ6.js} +3 -3
- package/dist/{chunk-XQ246UQW.js → chunk-MJ44ZPJO.js} +18 -15
- package/dist/chunk-MJ44ZPJO.js.map +1 -0
- package/dist/{chunk-G56ZGF4A.js → chunk-NC5OXZ7Z.js} +2 -2
- package/dist/{chunk-2MY3T2VH.js → chunk-NZVJYR5B.js} +4 -2
- package/dist/{chunk-2MY3T2VH.js.map → chunk-NZVJYR5B.js.map} +1 -1
- package/dist/{chunk-IIXNSHSS.js → chunk-OO5UHQV4.js} +5 -5
- package/dist/{chunk-A3VDKIWS.js → chunk-PJHNQX2G.js} +2 -2
- package/dist/{chunk-6JLI3Y4J.js → chunk-PYDEMSMB.js} +3 -3
- package/dist/{chunk-QFIJS6P3.js → chunk-RHW2TVMC.js} +5 -5
- package/dist/{chunk-YNRXB6J7.js → chunk-RMFJW6N6.js} +2 -2
- package/dist/{chunk-LB2T7W2A.js → chunk-ST5N4WQW.js} +3 -3
- package/dist/{chunk-EZVQ6JRV.js → chunk-UVKAL7G5.js} +3 -3
- package/dist/{chunk-WJPIKXWT.js → chunk-V3CTDOE7.js} +2 -2
- package/dist/{chunk-4QR5LKPG.js → chunk-X7QBDC3I.js} +2 -2
- package/dist/{chunk-63ULYLAC.js → chunk-XBQLSMRE.js} +3 -3
- package/dist/{chunk-JLEQ7K57.js → chunk-XNJGXQHS.js} +2 -2
- package/dist/{chunk-AJB2BZ6T.js → chunk-XQ4LT4SB.js} +2 -2
- package/dist/{chunk-NAHXYZZO.js → chunk-Z2SG6IVF.js} +2 -2
- package/dist/{chunk-2G2TQQMQ.js → chunk-ZDH3XNRJ.js} +6 -6
- package/dist/{chunk-A4QSFRUF.js → chunk-ZJNDRSE3.js} +6 -6
- package/dist/{chunk-VRA7CSHI.js → chunk-ZVSCII5U.js} +2 -2
- package/dist/components/AAFailedReason/index.js +5 -5
- package/dist/components/AceEditor/index.js +4 -4
- package/dist/components/AddressContainer/CoreAddressContainer.js +10 -10
- package/dist/components/AddressContainer/EVMAddressContainer.js +9 -9
- package/dist/components/AddressContainer/addressSwitcher.js +7 -7
- package/dist/components/AddressContainer/addressView.js +6 -6
- package/dist/components/AddressContainer/label.js +3 -3
- package/dist/components/AddressContainer/utils.js +3 -3
- package/dist/components/Age/index.js +4 -4
- package/dist/components/AutoComplete/index.js +3 -3
- package/dist/components/ContractAbi/IntValueFormatter.js +5 -5
- package/dist/components/ContractAbi/ParamTitle.js +5 -5
- package/dist/components/ContractAbi/index.js +9 -9
- package/dist/components/ContractAbi/utils.js +3 -3
- package/dist/components/CookieTip/index.js +1 -1
- package/dist/components/CopyButton/index.js +3 -3
- package/dist/components/DecimalsSelect/index.js +4 -4
- package/dist/components/DownloadCSV/index.js +4 -4
- package/dist/components/GasPriceDropdown/index.js +2 -2
- package/dist/components/IncreasePercent/index.js +2 -2
- package/dist/components/InfoIconWithTooltip/index.js +4 -4
- package/dist/components/InputData/AddressLabel.js +8 -8
- package/dist/components/InputData/ContractDetail.js +4 -4
- package/dist/components/InputData/FunctionName.d.ts +1 -0
- package/dist/components/InputData/JsonDecode.d.ts +1 -0
- package/dist/components/InputData/JsonDecode.js +5 -5
- package/dist/components/InputData/OptimizationDecode.d.ts +1 -0
- package/dist/components/InputData/OptimizationDecode.js +11 -11
- package/dist/components/InputData/Original.js +3 -3
- package/dist/components/InputData/UTF8.js +3 -3
- package/dist/components/InputData/index.d.ts +1 -0
- package/dist/components/InputData/index.js +16 -16
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/NetworkIcon/index.js +2 -2
- package/dist/components/OutputData/ErrorDecode.js +16 -16
- package/dist/components/OutputData/index.d.ts +1 -0
- package/dist/components/OutputData/index.js +18 -18
- package/dist/components/PhishingAddressContainer/index.js +4 -4
- package/dist/components/Popover/index.js +3 -3
- package/dist/components/Price/index.js +3 -3
- package/dist/components/ProxyContractAddress/index.d.ts +1 -0
- package/dist/components/ProxyContractAddress/index.js +6 -6
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/SearchInput/index.js +4 -4
- package/dist/components/Select/index.js +4 -4
- package/dist/components/Select/select.js +3 -3
- package/dist/components/SmartAccountAddress/index.js +6 -6
- package/dist/components/Text/index.js +4 -4
- package/dist/components/Tooltip/index.js +3 -3
- package/dist/components/TransactionAction/coreTransactionAction.js +10 -10
- package/dist/components/TransactionAction/evmTransactionAction.js +9 -9
- package/dist/components/TransactionTrace/TraceDetail.d.ts +1 -0
- package/dist/components/TransactionTrace/TraceDetail.js +25 -25
- package/dist/components/TransactionTrace/TreeTraceTable.d.ts +1 -0
- package/dist/components/TransactionTrace/TreeTraceTable.js +26 -26
- package/dist/components/TransactionTrace/index.d.ts +1 -0
- package/dist/components/TransactionTrace/index.js +26 -26
- package/dist/utils/address.js +2 -2
- package/dist/utils/calldataUrl.d.ts +35 -0
- package/dist/utils/calldataUrl.js +253 -0
- package/dist/utils/calldataUrl.js.map +1 -0
- package/dist/utils/cive-plugins.js +2 -2
- package/dist/utils/constants.d.ts +2 -1
- package/dist/utils/constants.js +3 -1
- package/dist/utils/contractManagerTool.js +2 -2
- package/dist/utils/hooks/useAddressLabel.js +3 -3
- package/dist/utils/hooks/useAge.js +1 -1
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js +2 -2
- package/dist/utils/hooks/useDecodeFunctionData.d.ts +2 -2
- package/dist/utils/hooks/useDecodeFunctionData.js +5 -5
- package/dist/utils/hooks/useDecodeFunctionError.js +5 -5
- package/dist/utils/hooks/useDecodedDataType.d.ts +1 -0
- package/dist/utils/hooks/useENS.js +3 -3
- package/dist/utils/hooks/useSimulateTrace.d.ts +13 -6
- package/dist/utils/hooks/useSimulateTrace.js +21 -16
- package/dist/utils/hooks/useSimulateTrace.js.map +1 -1
- package/dist/utils/hooks/useTxTrace.d.ts +1 -0
- package/dist/utils/hooks/useTxTrace.js +4 -4
- package/dist/utils/index.js +2 -2
- package/dist/utils/sdk.d.ts +3 -3
- package/dist/utils/sdk.js +3 -3
- package/dist/utils/types.d.ts +4 -0
- package/dist/utils/types.js +1 -0
- package/dist/utils/types.js.map +1 -0
- package/package.json +2 -2
- package/dist/chunk-XQ246UQW.js.map +0 -1
- /package/dist/{chunk-SFULLYYL.js.map → chunk-32HFN5MP.js.map} +0 -0
- /package/dist/{chunk-CMM72NR3.js.map → chunk-47HU5DGL.js.map} +0 -0
- /package/dist/{chunk-D6INJ4N5.js.map → chunk-4TF33JZW.js.map} +0 -0
- /package/dist/{chunk-2FGJPE3T.js.map → chunk-5OYITIUX.js.map} +0 -0
- /package/dist/{chunk-IKPPUNBU.js.map → chunk-6H5XKOXM.js.map} +0 -0
- /package/dist/{chunk-A64ILFRR.js.map → chunk-7NFRRT77.js.map} +0 -0
- /package/dist/{chunk-7NVZPYT3.js.map → chunk-7U24RYWX.js.map} +0 -0
- /package/dist/{chunk-IXMDBWQH.js.map → chunk-DHTXUMRS.js.map} +0 -0
- /package/dist/{chunk-2KJLNPUL.js.map → chunk-EJDYTF4C.js.map} +0 -0
- /package/dist/{chunk-SEIHZVZU.js.map → chunk-GC3XWDVL.js.map} +0 -0
- /package/dist/{chunk-4AAV4RRZ.js.map → chunk-GRPL5QSE.js.map} +0 -0
- /package/dist/{chunk-FBGAFVDW.js.map → chunk-GYK2VPUW.js.map} +0 -0
- /package/dist/{chunk-SCTG3SCG.js.map → chunk-HU3XDAH5.js.map} +0 -0
- /package/dist/{chunk-CWTDFCRF.js.map → chunk-HUBXGHJC.js.map} +0 -0
- /package/dist/{chunk-I6OWD4P4.js.map → chunk-IPACZ2LN.js.map} +0 -0
- /package/dist/{chunk-7BAN6GKP.js.map → chunk-K6M3ZRL6.js.map} +0 -0
- /package/dist/{chunk-VYI4IZMQ.js.map → chunk-LDCBSWPD.js.map} +0 -0
- /package/dist/{chunk-NSSKV676.js.map → chunk-LJUDPQQ6.js.map} +0 -0
- /package/dist/{chunk-G56ZGF4A.js.map → chunk-NC5OXZ7Z.js.map} +0 -0
- /package/dist/{chunk-IIXNSHSS.js.map → chunk-OO5UHQV4.js.map} +0 -0
- /package/dist/{chunk-A3VDKIWS.js.map → chunk-PJHNQX2G.js.map} +0 -0
- /package/dist/{chunk-6JLI3Y4J.js.map → chunk-PYDEMSMB.js.map} +0 -0
- /package/dist/{chunk-QFIJS6P3.js.map → chunk-RHW2TVMC.js.map} +0 -0
- /package/dist/{chunk-YNRXB6J7.js.map → chunk-RMFJW6N6.js.map} +0 -0
- /package/dist/{chunk-LB2T7W2A.js.map → chunk-ST5N4WQW.js.map} +0 -0
- /package/dist/{chunk-EZVQ6JRV.js.map → chunk-UVKAL7G5.js.map} +0 -0
- /package/dist/{chunk-WJPIKXWT.js.map → chunk-V3CTDOE7.js.map} +0 -0
- /package/dist/{chunk-4QR5LKPG.js.map → chunk-X7QBDC3I.js.map} +0 -0
- /package/dist/{chunk-63ULYLAC.js.map → chunk-XBQLSMRE.js.map} +0 -0
- /package/dist/{chunk-JLEQ7K57.js.map → chunk-XNJGXQHS.js.map} +0 -0
- /package/dist/{chunk-AJB2BZ6T.js.map → chunk-XQ4LT4SB.js.map} +0 -0
- /package/dist/{chunk-NAHXYZZO.js.map → chunk-Z2SG6IVF.js.map} +0 -0
- /package/dist/{chunk-2G2TQQMQ.js.map → chunk-ZDH3XNRJ.js.map} +0 -0
- /package/dist/{chunk-A4QSFRUF.js.map → chunk-ZJNDRSE3.js.map} +0 -0
- /package/dist/{chunk-VRA7CSHI.js.map → chunk-ZVSCII5U.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-XCKMXAL2.js";
|
|
4
4
|
import {
|
|
5
5
|
cn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4TF33JZW.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Modal/index.tsx
|
|
9
9
|
import { useEffect, useCallback, useMemo } from "react";
|
|
@@ -137,4 +137,4 @@ var Modal = ({
|
|
|
137
137
|
export {
|
|
138
138
|
Modal
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-GC3XWDVL.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Original
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XNJGXQHS.js";
|
|
4
4
|
import {
|
|
5
5
|
UTF8
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NC5OXZ7Z.js";
|
|
7
7
|
import {
|
|
8
8
|
GeneralDecode
|
|
9
9
|
} from "./chunk-JVCFVNGV.js";
|
|
10
10
|
import {
|
|
11
11
|
JsonDecode
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UVKAL7G5.js";
|
|
13
13
|
import {
|
|
14
14
|
OptimizationDecode
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZDH3XNRJ.js";
|
|
16
16
|
|
|
17
17
|
// src/components/InputData/index.tsx
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -63,4 +63,4 @@ var InputData = ({
|
|
|
63
63
|
export {
|
|
64
64
|
InputData
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-GRPL5QSE.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Original
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XNJGXQHS.js";
|
|
4
4
|
import {
|
|
5
5
|
AbiWarning
|
|
6
6
|
} from "./chunk-OYHBJBBP.js";
|
|
7
7
|
import {
|
|
8
8
|
DecodedParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZDH3XNRJ.js";
|
|
10
10
|
import {
|
|
11
11
|
FunctionName
|
|
12
12
|
} from "./chunk-FYLAXC3R.js";
|
|
13
13
|
import {
|
|
14
14
|
useDecodeFunctionError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZJNDRSE3.js";
|
|
16
16
|
import {
|
|
17
17
|
cn
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4TF33JZW.js";
|
|
19
19
|
|
|
20
20
|
// src/components/OutputData/ErrorDecode.tsx
|
|
21
21
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -91,4 +91,4 @@ var ErrorDecode = ({
|
|
|
91
91
|
export {
|
|
92
92
|
ErrorDecode
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
94
|
+
//# sourceMappingURL=chunk-GYK2VPUW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
convertCheckSum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X7QBDC3I.js";
|
|
4
4
|
import {
|
|
5
5
|
useGlobalData
|
|
6
6
|
} from "./chunk-L4AFJGXJ.js";
|
|
@@ -20,4 +20,4 @@ var useAddressLabel = (address, showAddressLabel = true) => {
|
|
|
20
20
|
export {
|
|
21
21
|
useAddressLabel
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-HU3XDAH5.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-TOKKKTFG.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-V3CTDOE7.js";
|
|
7
7
|
import {
|
|
8
8
|
selectText
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4TF33JZW.js";
|
|
10
10
|
|
|
11
11
|
// src/components/Text/index.tsx
|
|
12
12
|
import React from "react";
|
|
@@ -102,4 +102,4 @@ var Text = React.memo(
|
|
|
102
102
|
export {
|
|
103
103
|
Text
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-HUBXGHJC.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useDecodeFunctionData
|
|
3
|
+
} from "./chunk-MJ44ZPJO.js";
|
|
1
4
|
import {
|
|
2
5
|
useDecodedDataType
|
|
3
6
|
} from "./chunk-UM5J477V.js";
|
|
4
|
-
import {
|
|
5
|
-
useDecodeFunctionData
|
|
6
|
-
} from "./chunk-XQ246UQW.js";
|
|
7
7
|
import {
|
|
8
8
|
Select
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XBQLSMRE.js";
|
|
10
10
|
import {
|
|
11
11
|
OutputData
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OO5UHQV4.js";
|
|
13
13
|
import {
|
|
14
14
|
InputData
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GRPL5QSE.js";
|
|
16
16
|
import {
|
|
17
17
|
AbiWarning
|
|
18
18
|
} from "./chunk-OYHBJBBP.js";
|
|
@@ -189,4 +189,4 @@ var TraceDetail = (props) => {
|
|
|
189
189
|
export {
|
|
190
190
|
TraceDetail
|
|
191
191
|
};
|
|
192
|
-
//# sourceMappingURL=chunk-
|
|
192
|
+
//# sourceMappingURL=chunk-IPACZ2LN.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
convertCheckSum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X7QBDC3I.js";
|
|
4
4
|
import {
|
|
5
5
|
Text
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HUBXGHJC.js";
|
|
7
7
|
import {
|
|
8
8
|
getTranslations
|
|
9
9
|
} from "./chunk-L4AFJGXJ.js";
|
|
@@ -143,4 +143,4 @@ var RenderAddress = ({
|
|
|
143
143
|
export {
|
|
144
144
|
RenderAddress
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-K6M3ZRL6.js.map
|
|
@@ -174,7 +174,7 @@ import {
|
|
|
174
174
|
} from "./chunk-ADNS57X5.js";
|
|
175
175
|
import {
|
|
176
176
|
NETWORK_ID
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-NZVJYR5B.js";
|
|
178
178
|
import {
|
|
179
179
|
__export,
|
|
180
180
|
__publicField
|
|
@@ -9445,4 +9445,4 @@ export {
|
|
|
9445
9445
|
defineChain2,
|
|
9446
9446
|
decodeErrorResult2 as decodeErrorResult
|
|
9447
9447
|
};
|
|
9448
|
-
//# sourceMappingURL=chunk-
|
|
9448
|
+
//# sourceMappingURL=chunk-LDCBSWPD.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DecimalsSelect
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZVSCII5U.js";
|
|
4
4
|
import {
|
|
5
5
|
formatBalance
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4TF33JZW.js";
|
|
7
7
|
|
|
8
8
|
// src/components/ContractAbi/IntValueFormatter.tsx
|
|
9
9
|
import { useMemo, useState } from "react";
|
|
@@ -47,4 +47,4 @@ var IntValueFormatter = ({
|
|
|
47
47
|
export {
|
|
48
48
|
IntValueFormatter
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-LJUDPQQ6.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
decodeFunctionData,
|
|
6
6
|
decodeFunctionResult
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FYDF5QZ6.js";
|
|
8
8
|
import {
|
|
9
9
|
useContractDetail
|
|
10
10
|
} from "./chunk-XN2TDIIK.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-S6O6Q2GQ.js";
|
|
14
14
|
import {
|
|
15
15
|
formatABI
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4TF33JZW.js";
|
|
17
17
|
|
|
18
18
|
// src/utils/hooks/useDecodeFunctionData.ts
|
|
19
19
|
import { useMemo } from "react";
|
|
@@ -27,6 +27,7 @@ var decodeFunctionDataByAbi = ({
|
|
|
27
27
|
withOutput = false,
|
|
28
28
|
similarWarning
|
|
29
29
|
}) => {
|
|
30
|
+
let abiItem = void 0;
|
|
30
31
|
try {
|
|
31
32
|
const abi = typeof _abi === "string" ? JSON.parse(_abi) : _abi;
|
|
32
33
|
const hasAbi = abi && abi.length > 0;
|
|
@@ -34,21 +35,21 @@ var decodeFunctionDataByAbi = ({
|
|
|
34
35
|
return null;
|
|
35
36
|
const isReturnDataEmpty = !output || output === "0x";
|
|
36
37
|
const methodID = input.slice(0, 10);
|
|
38
|
+
abiItem = getAbiItem({
|
|
39
|
+
abi,
|
|
40
|
+
name: methodID
|
|
41
|
+
});
|
|
37
42
|
const decodedParams = decodeFunctionData({
|
|
38
43
|
abi,
|
|
39
44
|
data: input,
|
|
40
45
|
space
|
|
41
46
|
});
|
|
42
|
-
|
|
47
|
+
const decodedResults = success ? !isReturnDataEmpty ? decodeFunctionResult({
|
|
43
48
|
abi,
|
|
44
49
|
functionName: methodID,
|
|
45
50
|
data: output,
|
|
46
51
|
space
|
|
47
52
|
}) : void 0 : output;
|
|
48
|
-
const abiItem = getAbiItem({
|
|
49
|
-
abi,
|
|
50
|
-
name: methodID
|
|
51
|
-
});
|
|
52
53
|
const results = decodedResults === void 0 ? void 0 : abiItem.outputs.length === 1 ? [decodedResults] : decodedResults;
|
|
53
54
|
if (!withOutput) {
|
|
54
55
|
abiItem.outputs = [];
|
|
@@ -64,8 +65,14 @@ var decodeFunctionDataByAbi = ({
|
|
|
64
65
|
};
|
|
65
66
|
} catch (error) {
|
|
66
67
|
console.log("decode function data and result error", error);
|
|
68
|
+
if (!withOutput && abiItem) {
|
|
69
|
+
abiItem.outputs = [];
|
|
70
|
+
}
|
|
71
|
+
const fullName = abiItem ? formatABI([abiItem])[0] : void 0;
|
|
67
72
|
return {
|
|
68
73
|
failed: true,
|
|
74
|
+
abiItem,
|
|
75
|
+
fullName,
|
|
69
76
|
similarWarning
|
|
70
77
|
};
|
|
71
78
|
}
|
|
@@ -171,13 +178,9 @@ var useDecodeFunctionData = ({
|
|
|
171
178
|
if (implementationLoading || contractLoading || methodAbiLoading) {
|
|
172
179
|
return [{}, true];
|
|
173
180
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
failed: true
|
|
178
|
-
},
|
|
179
|
-
false
|
|
180
|
-
];
|
|
181
|
+
const decoded = decodedByOuterAbi || decodedByImplementationAbi || decodedByContractAbi || decodedByMethodAbi;
|
|
182
|
+
if (decoded) {
|
|
183
|
+
return [decoded, false];
|
|
181
184
|
}
|
|
182
185
|
return [
|
|
183
186
|
{
|
|
@@ -200,4 +203,4 @@ var useDecodeFunctionData = ({
|
|
|
200
203
|
export {
|
|
201
204
|
useDecodeFunctionData
|
|
202
205
|
};
|
|
203
|
-
//# sourceMappingURL=chunk-
|
|
206
|
+
//# sourceMappingURL=chunk-MJ44ZPJO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/hooks/useDecodeFunctionData.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n decodeFunctionData,\n decodeFunctionResult,\n getAbiItem,\n AbiFunctionWithoutGas,\n} from 'src/utils/sdk';\nimport { useContractDetail } from './useContractDetail';\nimport { formatABI } from '..';\nimport { useMethodAbi } from './useMethodAbi';\nimport { Hex } from '../types';\n\nconst fields = ['abi' as const];\n\nconst decodeFunctionDataByAbi = ({\n abi: _abi,\n input,\n output,\n space,\n success,\n withOutput = false,\n similarWarning,\n}: {\n input: Hex;\n output?: Hex;\n abi?: AbiFunctionWithoutGas[] | string;\n space: 'evm' | 'core';\n success?: boolean;\n withOutput?: boolean;\n similarWarning?: boolean;\n}) => {\n let abiItem: AbiFunctionWithoutGas | undefined = undefined;\n try {\n const abi = typeof _abi === 'string' ? JSON.parse(_abi) : _abi;\n const hasAbi = abi && abi.length > 0;\n if (!hasAbi) return null;\n const isReturnDataEmpty = !output || output === '0x';\n const methodID = input.slice(0, 10);\n abiItem = getAbiItem({\n abi: abi,\n name: methodID,\n }) as AbiFunctionWithoutGas;\n const decodedParams = decodeFunctionData({\n abi: abi,\n data: input,\n space,\n });\n const decodedResults = success\n ? !isReturnDataEmpty\n ? decodeFunctionResult({\n abi: abi,\n functionName: methodID,\n data: output,\n space,\n })\n : undefined\n : output;\n // if the output has only one value, decodeFunctionResult will return the value directly, otherwise it will return an array,\n // so we need to check the length of abiItem.outputs to determine whether to wrap decodedResults in an array\n const results =\n decodedResults === undefined\n ? undefined\n : abiItem.outputs.length === 1\n ? [decodedResults]\n : (decodedResults as unknown[]);\n if (!withOutput) {\n abiItem.outputs = [];\n }\n const fullName = formatABI([abiItem])[0];\n return {\n decodedParams,\n decodedResults: results,\n abiItem,\n fullName: fullName,\n failed: false,\n similarWarning,\n };\n } catch (error) {\n console.log('decode function data and result error', error);\n if (!withOutput && abiItem) {\n abiItem.outputs = [];\n }\n const fullName = abiItem ? formatABI([abiItem])[0] : undefined;\n return {\n failed: true,\n abiItem,\n fullName,\n similarWarning,\n };\n }\n};\n\nexport interface DecodedFunctionData {\n decodedParams?: {\n args: readonly unknown[] | undefined;\n functionName: string;\n };\n decodedResults?: unknown[];\n abiItem?: AbiFunctionWithoutGas;\n fullName?: string;\n // no abi for decoded\n noAbi?: boolean;\n // decoded failed\n failed?: boolean;\n // decoded by method abi, not contract abi\n similarWarning?: boolean;\n}\n\nexport const useDecodeFunctionData = ({\n to,\n abi: outerAbi,\n implementation: _implementation,\n input = '0x',\n output,\n space,\n success,\n supportMethodAbi = false,\n withOutput,\n}: {\n input?: Hex;\n output?: Hex;\n to?: string;\n implementation?: string;\n abi?: AbiFunctionWithoutGas[];\n space: 'evm' | 'core';\n success?: boolean;\n supportMethodAbi?: boolean;\n withOutput?: boolean;\n}): [DecodedFunctionData, boolean] => {\n const hasOuterAbi = outerAbi && outerAbi.length > 0;\n const isDataEmpty = !input || input === '0x';\n const needContractAbi = !hasOuterAbi && !isDataEmpty;\n const { data: contractData, isLoading: contractLoading } = useContractDetail(\n to,\n fields,\n needContractAbi,\n );\n const implementation =\n _implementation ?? contractData?.implementation?.address;\n const { data: implementationData, isLoading: implementationLoading } =\n useContractDetail(implementation, fields, needContractAbi);\n const decodedByOuterAbi = useMemo(() => {\n return decodeFunctionDataByAbi({\n abi: outerAbi,\n input,\n output,\n space,\n success,\n withOutput,\n });\n }, [input, output, outerAbi, success, space, withOutput]);\n const decodedByContractAbi = useMemo(() => {\n if (!contractData?.abi) return null;\n return decodeFunctionDataByAbi({\n abi: contractData.abi as string,\n input,\n output,\n space,\n success,\n withOutput,\n });\n }, [input, output, contractData?.abi, success, space, withOutput]);\n const decodedByImplementationAbi = useMemo(() => {\n if (!implementationData?.abi) return null;\n return decodeFunctionDataByAbi({\n abi: implementationData.abi as string,\n input,\n output,\n space,\n success,\n withOutput,\n });\n }, [input, output, implementationData?.abi, success, space, withOutput]);\n const needMethodAbi =\n supportMethodAbi &&\n needContractAbi &&\n // contract abi decoded failed\n !contractLoading &&\n (!decodedByContractAbi || decodedByContractAbi.failed) &&\n // implementation contract abi decoded failed\n !implementationLoading &&\n (!decodedByImplementationAbi || decodedByImplementationAbi.failed);\n const { data: methodAbi, isLoading: methodAbiLoading } = useMethodAbi(\n input.slice(0, 10),\n needMethodAbi,\n );\n const decodedByMethodAbi = useMemo(() => {\n // decode tx data with function abi only if there is only one function\n if (!methodAbi || methodAbi.list.length !== 1) return null;\n try {\n // e.g. transfer(address,uint256)\n const fullName = methodAbi.list[0]!.fullName;\n // e.g. function transfer(address recipient, uint256 amount) returns (bool)\n const formatWithArg = methodAbi.list[0]!.formatWithArg;\n const abi = formatABI([formatWithArg || `function ${fullName}`], {\n json: true,\n });\n return decodeFunctionDataByAbi({\n abi: abi,\n input,\n output,\n space,\n success,\n withOutput,\n similarWarning: true,\n });\n } catch (error) {\n console.log('decode function data and result error', error);\n return {\n failed: true,\n };\n }\n }, [input, output, methodAbi, success, space, withOutput]);\n\n return useMemo(() => {\n if (!input) return [{}, false];\n if (decodedByOuterAbi && !decodedByOuterAbi.failed)\n return [decodedByOuterAbi, false];\n if (decodedByImplementationAbi && !decodedByImplementationAbi.failed)\n return [decodedByImplementationAbi, implementationLoading];\n if (decodedByContractAbi && !decodedByContractAbi.failed)\n return [decodedByContractAbi, contractLoading];\n if (decodedByMethodAbi && !decodedByMethodAbi.failed)\n return [decodedByMethodAbi, methodAbiLoading];\n if (implementationLoading || contractLoading || methodAbiLoading) {\n return [{}, true];\n }\n const decoded =\n decodedByOuterAbi ||\n decodedByImplementationAbi ||\n decodedByContractAbi ||\n decodedByMethodAbi;\n if (decoded) {\n return [decoded, false];\n }\n return [\n {\n noAbi: true,\n },\n false,\n ];\n }, [\n input,\n decodedByOuterAbi,\n decodedByContractAbi,\n decodedByImplementationAbi,\n decodedByMethodAbi,\n contractLoading,\n implementationLoading,\n methodAbiLoading,\n ]);\n};\n"],"mappings":"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","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hex2utf8
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4TF33JZW.js";
|
|
4
4
|
|
|
5
5
|
// src/components/InputData/UTF8.tsx
|
|
6
6
|
import { useMemo } from "react";
|
|
@@ -18,4 +18,4 @@ var UTF8 = ({ data }) => {
|
|
|
18
18
|
export {
|
|
19
19
|
UTF8
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-NC5OXZ7Z.js.map
|
|
@@ -48,6 +48,7 @@ var NETWORK_ID = (() => {
|
|
|
48
48
|
})();
|
|
49
49
|
var COMMON_ERROR_OUTPUT_PREFIX = "0x08c379a0";
|
|
50
50
|
var COMMON_PANIC_OUTPUT_PREFIX = "0x4e487b71";
|
|
51
|
+
var ZERO_ADDRESS_HEX = "0x0000000000000000000000000000000000000000";
|
|
51
52
|
|
|
52
53
|
export {
|
|
53
54
|
LOCALSTORAGE_KEYS_MAP,
|
|
@@ -57,6 +58,7 @@ export {
|
|
|
57
58
|
getCurrencySymbol,
|
|
58
59
|
NETWORK_ID,
|
|
59
60
|
COMMON_ERROR_OUTPUT_PREFIX,
|
|
60
|
-
COMMON_PANIC_OUTPUT_PREFIX
|
|
61
|
+
COMMON_PANIC_OUTPUT_PREFIX,
|
|
62
|
+
ZERO_ADDRESS_HEX
|
|
61
63
|
};
|
|
62
|
-
//# sourceMappingURL=chunk-
|
|
64
|
+
//# sourceMappingURL=chunk-NZVJYR5B.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/constants.ts"],"sourcesContent":["import { getEnvConfig } from '../store';\nimport lodash from 'lodash';\n/**\n * @todo\n * 1. setNFTCacheInfo cacheKey\n * 2. GlobalTip\n *\n * @export\n * @enum {number}\n */\nexport enum LOCALSTORAGE_KEYS_MAP {\n reqProjectConfigMD5 = 'CONFLUX_SCAN_REQ_PROJECT_CONFIG_MD5',\n networkId = 'CONFLUX_SCAN_NETWORK_ID',\n contracts = 'CONFLUX_SCAN_CONTRACTS',\n contractNameTag = 'CONFLUX_SCAN_CONTRACT_NAME_TAG',\n currency = 'CONFLUX_SCAN_LOCALSTORAGE_KEY_CURRENCY',\n ageFormat = 'CONFLUX_SCAN_TABLE_AGE_FORMAT',\n cookieAgreed = 'CONFLUXSCAN_COOKIE_AGREED',\n txnRecords = 'CONFLUXSCAN_TXN_RECORDS',\n fccfxNotice = 'CONFLUX_SCAN_FCCFX_NOTICE',\n addressLabel = 'CONFLUX_SCAN_ADDRESS_LABELS',\n txPrivateNote = 'CONFLUX_SCAN_TX_PRIVATE_NOTES',\n hideInDotNet = 'CONFLUX_SCAN_HIDE_IN_DOT_NET',\n apis = 'CONFLUX_SCAN_APIS',\n}\n\nexport const apiPrefix = '/v1';\n\nexport const CURRENCY_SYMBOLS: { [key: string]: string } = {\n USD: '$',\n CNY: '¥',\n GBP: '£',\n KRW: '₩',\n RUB: '₽',\n EUR: '€',\n};\n\nexport const getCurrency = () => {\n return localStorage.getItem(LOCALSTORAGE_KEYS_MAP.currency) || 'USD';\n};\n\nexport const getCurrencySymbol = () => {\n return CURRENCY_SYMBOLS[getCurrency()];\n};\n\nexport const NETWORK_ID = (() => {\n const ENV_CONFIG = getEnvConfig();\n let networkId = ENV_CONFIG.ENV_NETWORK_ID;\n let cacheNetworkId = Number(\n localStorage.getItem(LOCALSTORAGE_KEYS_MAP.networkId),\n );\n\n if (lodash.isFinite(cacheNetworkId)) {\n networkId = Number(cacheNetworkId);\n }\n return networkId;\n})();\n\nexport const COMMON_ERROR_OUTPUT_PREFIX = '0x08c379a0';\nexport const COMMON_PANIC_OUTPUT_PREFIX = '0x4e487b71';\n"],"mappings":";;;;;AACA,OAAO,YAAY;AASZ,IAAK,wBAAL,kBAAKA,2BAAL;AACL,EAAAA,uBAAA,yBAAsB;AACtB,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,qBAAkB;AAClB,EAAAA,uBAAA,cAAW;AACX,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,kBAAe;AACf,EAAAA,uBAAA,gBAAa;AACb,EAAAA,uBAAA,iBAAc;AACd,EAAAA,uBAAA,kBAAe;AACf,EAAAA,uBAAA,mBAAgB;AAChB,EAAAA,uBAAA,kBAAe;AACf,EAAAA,uBAAA,UAAO;AAbG,SAAAA;AAAA,GAAA;AAgBL,IAAM,YAAY;AAElB,IAAM,mBAA8C;AAAA,EACzD,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAEO,IAAM,cAAc,MAAM;AAC/B,SAAO,aAAa,QAAQ,uDAA8B,KAAK;AACjE;AAEO,IAAM,oBAAoB,MAAM;AACrC,SAAO,iBAAiB,YAAY,CAAC;AACvC;AAEO,IAAM,cAAc,MAAM;AAC/B,QAAM,aAAa,aAAa;AAChC,MAAI,YAAY,WAAW;AAC3B,MAAI,iBAAiB;AAAA,IACnB,aAAa,QAAQ,yCAA+B;AAAA,EACtD;AAEA,MAAI,OAAO,SAAS,cAAc,GAAG;AACnC,gBAAY,OAAO,cAAc;AAAA,EACnC;AACA,SAAO;AACT,GAAG;AAEI,IAAM,6BAA6B;AACnC,IAAM,6BAA6B;","names":["LOCALSTORAGE_KEYS_MAP"]}
|
|
1
|
+
{"version":3,"sources":["../src/utils/constants.ts"],"sourcesContent":["import { getEnvConfig } from '../store';\nimport lodash from 'lodash';\n/**\n * @todo\n * 1. setNFTCacheInfo cacheKey\n * 2. GlobalTip\n *\n * @export\n * @enum {number}\n */\nexport enum LOCALSTORAGE_KEYS_MAP {\n reqProjectConfigMD5 = 'CONFLUX_SCAN_REQ_PROJECT_CONFIG_MD5',\n networkId = 'CONFLUX_SCAN_NETWORK_ID',\n contracts = 'CONFLUX_SCAN_CONTRACTS',\n contractNameTag = 'CONFLUX_SCAN_CONTRACT_NAME_TAG',\n currency = 'CONFLUX_SCAN_LOCALSTORAGE_KEY_CURRENCY',\n ageFormat = 'CONFLUX_SCAN_TABLE_AGE_FORMAT',\n cookieAgreed = 'CONFLUXSCAN_COOKIE_AGREED',\n txnRecords = 'CONFLUXSCAN_TXN_RECORDS',\n fccfxNotice = 'CONFLUX_SCAN_FCCFX_NOTICE',\n addressLabel = 'CONFLUX_SCAN_ADDRESS_LABELS',\n txPrivateNote = 'CONFLUX_SCAN_TX_PRIVATE_NOTES',\n hideInDotNet = 'CONFLUX_SCAN_HIDE_IN_DOT_NET',\n apis = 'CONFLUX_SCAN_APIS',\n}\n\nexport const apiPrefix = '/v1';\n\nexport const CURRENCY_SYMBOLS: { [key: string]: string } = {\n USD: '$',\n CNY: '¥',\n GBP: '£',\n KRW: '₩',\n RUB: '₽',\n EUR: '€',\n};\n\nexport const getCurrency = () => {\n return localStorage.getItem(LOCALSTORAGE_KEYS_MAP.currency) || 'USD';\n};\n\nexport const getCurrencySymbol = () => {\n return CURRENCY_SYMBOLS[getCurrency()];\n};\n\nexport const NETWORK_ID = (() => {\n const ENV_CONFIG = getEnvConfig();\n let networkId = ENV_CONFIG.ENV_NETWORK_ID;\n let cacheNetworkId = Number(\n localStorage.getItem(LOCALSTORAGE_KEYS_MAP.networkId),\n );\n\n if (lodash.isFinite(cacheNetworkId)) {\n networkId = Number(cacheNetworkId);\n }\n return networkId;\n})();\n\nexport const COMMON_ERROR_OUTPUT_PREFIX = '0x08c379a0';\nexport const COMMON_PANIC_OUTPUT_PREFIX = '0x4e487b71';\n\nexport const ZERO_ADDRESS_HEX = '0x0000000000000000000000000000000000000000';\n"],"mappings":";;;;;AACA,OAAO,YAAY;AASZ,IAAK,wBAAL,kBAAKA,2BAAL;AACL,EAAAA,uBAAA,yBAAsB;AACtB,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,qBAAkB;AAClB,EAAAA,uBAAA,cAAW;AACX,EAAAA,uBAAA,eAAY;AACZ,EAAAA,uBAAA,kBAAe;AACf,EAAAA,uBAAA,gBAAa;AACb,EAAAA,uBAAA,iBAAc;AACd,EAAAA,uBAAA,kBAAe;AACf,EAAAA,uBAAA,mBAAgB;AAChB,EAAAA,uBAAA,kBAAe;AACf,EAAAA,uBAAA,UAAO;AAbG,SAAAA;AAAA,GAAA;AAgBL,IAAM,YAAY;AAElB,IAAM,mBAA8C;AAAA,EACzD,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAEO,IAAM,cAAc,MAAM;AAC/B,SAAO,aAAa,QAAQ,uDAA8B,KAAK;AACjE;AAEO,IAAM,oBAAoB,MAAM;AACrC,SAAO,iBAAiB,YAAY,CAAC;AACvC;AAEO,IAAM,cAAc,MAAM;AAC/B,QAAM,aAAa,aAAa;AAChC,MAAI,YAAY,WAAW;AAC3B,MAAI,iBAAiB;AAAA,IACnB,aAAa,QAAQ,yCAA+B;AAAA,EACtD;AAEA,MAAI,OAAO,SAAS,cAAc,GAAG;AACnC,gBAAY,OAAO,cAAc;AAAA,EACnC;AACA,SAAO;AACT,GAAG;AAEI,IAAM,6BAA6B;AACnC,IAAM,6BAA6B;AAEnC,IAAM,mBAAmB;","names":["LOCALSTORAGE_KEYS_MAP"]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ErrorDecode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GYK2VPUW.js";
|
|
4
4
|
import {
|
|
5
5
|
Original
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XNJGXQHS.js";
|
|
7
7
|
import {
|
|
8
8
|
UTF8
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NC5OXZ7Z.js";
|
|
10
10
|
import {
|
|
11
11
|
GeneralDecode
|
|
12
12
|
} from "./chunk-JVCFVNGV.js";
|
|
13
13
|
import {
|
|
14
14
|
DecodedParameters
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZDH3XNRJ.js";
|
|
16
16
|
|
|
17
17
|
// src/components/OutputData/index.tsx
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -69,4 +69,4 @@ var OutputData = ({
|
|
|
69
69
|
export {
|
|
70
70
|
OutputData
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-OO5UHQV4.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
convertBigNumbersToStrings,
|
|
3
3
|
convertObjBigNumbersToStrings,
|
|
4
4
|
fromCfxToDrip
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4TF33JZW.js";
|
|
6
6
|
|
|
7
7
|
// src/components/ContractAbi/utils.ts
|
|
8
8
|
import JSONBigint from "json-bigint";
|
|
@@ -57,4 +57,4 @@ var formatValuesToArgs = (values, hasValue, forJSSDK = true) => {
|
|
|
57
57
|
export {
|
|
58
58
|
formatValuesToArgs
|
|
59
59
|
};
|
|
60
|
-
//# sourceMappingURL=chunk-
|
|
60
|
+
//# sourceMappingURL=chunk-PJHNQX2G.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatAddress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X7QBDC3I.js";
|
|
4
4
|
import {
|
|
5
5
|
formatABI
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4TF33JZW.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchWithPrefix
|
|
9
9
|
} from "./chunk-EN25IHGP.js";
|
|
@@ -156,4 +156,4 @@ export {
|
|
|
156
156
|
hideProxyCallInTreeTrace,
|
|
157
157
|
useTxTrace
|
|
158
158
|
};
|
|
159
|
-
//# sourceMappingURL=chunk-
|
|
159
|
+
//# sourceMappingURL=chunk-PYDEMSMB.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAddressNameInfo
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DHTXUMRS.js";
|
|
4
4
|
import {
|
|
5
5
|
ContractAddress,
|
|
6
6
|
ContractCreatedAddress,
|
|
7
7
|
InvalidAddress,
|
|
8
8
|
MyAddress
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5OYITIUX.js";
|
|
10
10
|
import {
|
|
11
11
|
RenderAddress
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-K6M3ZRL6.js";
|
|
13
13
|
import {
|
|
14
14
|
convertCheckSum,
|
|
15
15
|
formatAddress,
|
|
16
16
|
isEvmAddress,
|
|
17
17
|
isZeroAddress
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-X7QBDC3I.js";
|
|
19
19
|
import {
|
|
20
20
|
getTranslations,
|
|
21
21
|
useGlobalData
|
|
@@ -109,4 +109,4 @@ var EVMAddressContainer = withTranslation()(
|
|
|
109
109
|
export {
|
|
110
110
|
EVMAddressContainer
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-RHW2TVMC.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-BESFVHAM.js";
|
|
4
4
|
import {
|
|
5
5
|
Text
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HUBXGHJC.js";
|
|
7
7
|
import {
|
|
8
8
|
useI18n
|
|
9
9
|
} from "./chunk-L4AFJGXJ.js";
|
|
@@ -62,4 +62,4 @@ var ParamTitle = ({
|
|
|
62
62
|
export {
|
|
63
63
|
ParamTitle
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-RMFJW6N6.js.map
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
} from "./chunk-2Y57U43P.js";
|
|
7
7
|
import {
|
|
8
8
|
getAddressNameInfo
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DHTXUMRS.js";
|
|
10
10
|
import {
|
|
11
11
|
DefaultTokenIcon
|
|
12
12
|
} from "./chunk-BESFVHAM.js";
|
|
13
13
|
import {
|
|
14
14
|
formatAddress
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-X7QBDC3I.js";
|
|
16
16
|
|
|
17
17
|
// src/components/InputData/ContractDetail.tsx
|
|
18
18
|
import clsx from "clsx";
|
|
@@ -77,4 +77,4 @@ var ContractDetail = ({ address, addressType }) => {
|
|
|
77
77
|
export {
|
|
78
78
|
ContractDetail
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-ST5N4WQW.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-XI5WO2NW.js";
|
|
4
4
|
import {
|
|
5
5
|
AceEditor
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-47HU5DGL.js";
|
|
7
7
|
import {
|
|
8
8
|
formatABI
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4TF33JZW.js";
|
|
10
10
|
|
|
11
11
|
// src/components/InputData/JsonDecode.tsx
|
|
12
12
|
import { useId, useMemo } from "react";
|
|
@@ -68,4 +68,4 @@ var JsonDecode = ({
|
|
|
68
68
|
export {
|
|
69
69
|
JsonDecode
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-UVKAL7G5.js.map
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-BMO4IZHV.js";
|
|
24
24
|
import {
|
|
25
25
|
cn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4TF33JZW.js";
|
|
27
27
|
|
|
28
28
|
// src/components/Tooltip/index.tsx
|
|
29
29
|
import {
|
|
@@ -533,4 +533,4 @@ var Tooltip2 = ({
|
|
|
533
533
|
export {
|
|
534
534
|
Tooltip2 as Tooltip
|
|
535
535
|
};
|
|
536
|
-
//# sourceMappingURL=chunk-
|
|
536
|
+
//# sourceMappingURL=chunk-V3CTDOE7.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NETWORK_ID
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NZVJYR5B.js";
|
|
4
4
|
import {
|
|
5
5
|
detectAccountType
|
|
6
6
|
} from "./chunk-EN25IHGP.js";
|
|
@@ -281,4 +281,4 @@ export {
|
|
|
281
281
|
formatAddressHexToBase32,
|
|
282
282
|
isAddressEqual
|
|
283
283
|
};
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-X7QBDC3I.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6H5XKOXM.js";
|
|
9
9
|
import {
|
|
10
10
|
cn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4TF33JZW.js";
|
|
12
12
|
|
|
13
13
|
// src/components/Select/index.tsx
|
|
14
14
|
import React, { useMemo, useState, useEffect } from "react";
|
|
@@ -104,4 +104,4 @@ Select2.Option = Option;
|
|
|
104
104
|
export {
|
|
105
105
|
Select2 as Select
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-XBQLSMRE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cn
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4TF33JZW.js";
|
|
4
4
|
|
|
5
5
|
// src/components/InputData/Original.tsx
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -20,4 +20,4 @@ var Original = ({ data, className }) => {
|
|
|
20
20
|
export {
|
|
21
21
|
Original
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-XNJGXQHS.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-65X53DMW.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-V3CTDOE7.js";
|
|
7
7
|
|
|
8
8
|
// src/components/InfoIconWithTooltip/index.tsx
|
|
9
9
|
import clsx from "clsx";
|
|
@@ -23,4 +23,4 @@ var InfoIconWithTooltip = ({
|
|
|
23
23
|
export {
|
|
24
24
|
InfoIconWithTooltip
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-XQ4LT4SB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TraceDetail
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IPACZ2LN.js";
|
|
4
4
|
import {
|
|
5
5
|
Table
|
|
6
6
|
} from "./chunk-4WLXG7ZY.js";
|
|
@@ -81,4 +81,4 @@ var TreeTraceTable = ({
|
|
|
81
81
|
export {
|
|
82
82
|
TreeTraceTable
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-Z2SG6IVF.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AddressLabel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7NFRRT77.js";
|
|
4
4
|
import {
|
|
5
5
|
ContractDetail
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ST5N4WQW.js";
|
|
7
7
|
import {
|
|
8
8
|
FunctionName,
|
|
9
9
|
getParameterType
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
} from "./chunk-2Y57U43P.js";
|
|
17
17
|
import {
|
|
18
18
|
convertCheckSum
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-X7QBDC3I.js";
|
|
20
20
|
import {
|
|
21
21
|
Text
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HUBXGHJC.js";
|
|
23
23
|
import {
|
|
24
24
|
cn
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-4TF33JZW.js";
|
|
26
26
|
|
|
27
27
|
// src/components/InputData/OptimizationDecode.tsx
|
|
28
28
|
import { useMemo } from "react";
|
|
@@ -164,4 +164,4 @@ export {
|
|
|
164
164
|
DecodedParameters,
|
|
165
165
|
OptimizationDecode
|
|
166
166
|
};
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
167
|
+
//# sourceMappingURL=chunk-ZDH3XNRJ.js.map
|