@cfxjs/sirius-next-common 0.3.1 → 0.3.3

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.
Files changed (169) hide show
  1. package/dist/{chunk-SFULLYYL.js → chunk-32HFN5MP.js} +3 -3
  2. package/dist/{chunk-CMM72NR3.js → chunk-47HU5DGL.js} +2 -2
  3. package/dist/{chunk-A7LX3FWL.js → chunk-4DX7CRRE.js} +8 -8
  4. package/dist/{chunk-D6INJ4N5.js → chunk-4TF33JZW.js} +2 -2
  5. package/dist/{chunk-NZ32DWUZ.js → chunk-5OYITIUX.js} +6 -6
  6. package/dist/{chunk-IKPPUNBU.js → chunk-6H5XKOXM.js} +2 -2
  7. package/dist/{chunk-A64ILFRR.js → chunk-7NFRRT77.js} +4 -4
  8. package/dist/{chunk-7NVZPYT3.js → chunk-7U24RYWX.js} +2 -2
  9. package/dist/{chunk-MWAD4CIG.js → chunk-BESFVHAM.js} +46 -2
  10. package/dist/{chunk-MWAD4CIG.js.map → chunk-BESFVHAM.js.map} +1 -1
  11. package/dist/{chunk-IXMDBWQH.js → chunk-DHTXUMRS.js} +2 -2
  12. package/dist/{chunk-3CY7SRAN.js → chunk-EJDYTF4C.js} +6 -6
  13. package/dist/{chunk-FLFDRCTI.js → chunk-FYDF5QZ6.js} +3 -3
  14. package/dist/{chunk-FLFDRCTI.js.map → chunk-FYDF5QZ6.js.map} +1 -1
  15. package/dist/{chunk-SEIHZVZU.js → chunk-GC3XWDVL.js} +2 -2
  16. package/dist/{chunk-WZ6MS4XP.js → chunk-GRPL5QSE.js} +5 -5
  17. package/dist/{chunk-FOQ3VNZS.js → chunk-GYK2VPUW.js} +6 -6
  18. package/dist/{chunk-SCTG3SCG.js → chunk-HU3XDAH5.js} +2 -2
  19. package/dist/{chunk-CWTDFCRF.js → chunk-HUBXGHJC.js} +3 -3
  20. package/dist/{chunk-7BAN6GKP.js → chunk-K6M3ZRL6.js} +3 -3
  21. package/dist/{chunk-VYI4IZMQ.js → chunk-LDCBSWPD.js} +2 -2
  22. package/dist/{chunk-NSSKV676.js → chunk-LJUDPQQ6.js} +3 -3
  23. package/dist/{chunk-G56ZGF4A.js → chunk-NC5OXZ7Z.js} +2 -2
  24. package/dist/{chunk-J6WXTCBD.js → chunk-NUKWAN7M.js} +2 -2
  25. package/dist/{chunk-2MY3T2VH.js → chunk-NZVJYR5B.js} +4 -2
  26. package/dist/{chunk-2MY3T2VH.js.map → chunk-NZVJYR5B.js.map} +1 -1
  27. package/dist/{chunk-OVWRJMGS.js → chunk-OO5UHQV4.js} +5 -5
  28. package/dist/{chunk-XBEBAU77.js → chunk-OYHBJBBP.js} +2 -2
  29. package/dist/{chunk-A3VDKIWS.js → chunk-PJHNQX2G.js} +2 -2
  30. package/dist/{chunk-6JLI3Y4J.js → chunk-PYDEMSMB.js} +3 -3
  31. package/dist/{chunk-VSVZWF66.js → chunk-RHW2TVMC.js} +5 -5
  32. package/dist/{chunk-Y362QJNT.js → chunk-RMFJW6N6.js} +3 -3
  33. package/dist/{chunk-T5IOTGTQ.js → chunk-ST5N4WQW.js} +4 -4
  34. package/dist/{chunk-EZVQ6JRV.js → chunk-UVKAL7G5.js} +3 -3
  35. package/dist/{chunk-WJPIKXWT.js → chunk-V3CTDOE7.js} +2 -2
  36. package/dist/{chunk-4QR5LKPG.js → chunk-X7QBDC3I.js} +2 -2
  37. package/dist/{chunk-63ULYLAC.js → chunk-XBQLSMRE.js} +3 -3
  38. package/dist/{chunk-JLEQ7K57.js → chunk-XNJGXQHS.js} +2 -2
  39. package/dist/{chunk-AJB2BZ6T.js → chunk-XQ4LT4SB.js} +2 -2
  40. package/dist/{chunk-YEJRYVZ3.js → chunk-ZDH3XNRJ.js} +6 -6
  41. package/dist/{chunk-A4QSFRUF.js → chunk-ZJNDRSE3.js} +6 -6
  42. package/dist/{chunk-VRA7CSHI.js → chunk-ZVSCII5U.js} +2 -2
  43. package/dist/{chunk-XQ246UQW.js → chunk-ZWZMVVVB.js} +3 -3
  44. package/dist/chunk-ZWZMVVVB.js.map +1 -0
  45. package/dist/components/AAFailedReason/index.js +5 -5
  46. package/dist/components/AceEditor/index.js +4 -4
  47. package/dist/components/AddressContainer/CoreAddressContainer.js +11 -11
  48. package/dist/components/AddressContainer/EVMAddressContainer.js +10 -10
  49. package/dist/components/AddressContainer/addressSwitcher.js +8 -8
  50. package/dist/components/AddressContainer/addressView.js +6 -6
  51. package/dist/components/AddressContainer/label.js +3 -3
  52. package/dist/components/AddressContainer/utils.js +3 -3
  53. package/dist/components/Age/index.js +4 -4
  54. package/dist/components/AutoComplete/index.js +3 -3
  55. package/dist/components/ContractAbi/IntValueFormatter.js +5 -5
  56. package/dist/components/ContractAbi/ParamTitle.js +6 -6
  57. package/dist/components/ContractAbi/index.js +10 -10
  58. package/dist/components/ContractAbi/utils.js +3 -3
  59. package/dist/components/CookieTip/index.js +1 -1
  60. package/dist/components/CopyButton/index.js +3 -3
  61. package/dist/components/DecimalsSelect/index.js +4 -4
  62. package/dist/components/DownloadCSV/index.js +4 -4
  63. package/dist/components/GasPriceDropdown/index.js +2 -2
  64. package/dist/components/Icons/index.d.ts +2 -1
  65. package/dist/components/Icons/index.js +3 -1
  66. package/dist/components/IncreasePercent/index.js +2 -2
  67. package/dist/components/InfoIconWithTooltip/index.js +4 -4
  68. package/dist/components/InputData/AbiWarning.js +2 -2
  69. package/dist/components/InputData/AddressLabel.js +8 -8
  70. package/dist/components/InputData/ContractDetail.js +5 -5
  71. package/dist/components/InputData/FunctionName.d.ts +1 -0
  72. package/dist/components/InputData/JsonDecode.d.ts +1 -0
  73. package/dist/components/InputData/JsonDecode.js +5 -5
  74. package/dist/components/InputData/OptimizationDecode.d.ts +1 -0
  75. package/dist/components/InputData/OptimizationDecode.js +12 -12
  76. package/dist/components/InputData/Original.js +3 -3
  77. package/dist/components/InputData/UTF8.js +3 -3
  78. package/dist/components/InputData/index.d.ts +1 -0
  79. package/dist/components/InputData/index.js +17 -17
  80. package/dist/components/Modal/index.js +3 -3
  81. package/dist/components/NetworkIcon/index.js +2 -2
  82. package/dist/components/OutputData/ErrorDecode.js +18 -18
  83. package/dist/components/OutputData/index.d.ts +1 -0
  84. package/dist/components/OutputData/index.js +20 -20
  85. package/dist/components/PhishingAddressContainer/index.js +4 -4
  86. package/dist/components/Popover/index.js +3 -3
  87. package/dist/components/Price/index.js +3 -3
  88. package/dist/components/ProxyContractAddress/index.d.ts +1 -0
  89. package/dist/components/ProxyContractAddress/index.js +6 -6
  90. package/dist/components/Radio/index.js +2 -2
  91. package/dist/components/SearchInput/index.js +4 -4
  92. package/dist/components/Select/index.js +4 -4
  93. package/dist/components/Select/select.js +3 -3
  94. package/dist/components/SmartAccountAddress/index.js +6 -6
  95. package/dist/components/Text/index.js +4 -4
  96. package/dist/components/Tooltip/index.js +3 -3
  97. package/dist/components/TransactionAction/coreTransactionAction.js +11 -11
  98. package/dist/components/TransactionAction/evmTransactionAction.js +10 -10
  99. package/dist/components/TransactionTrace/TraceDetail.d.ts +1 -0
  100. package/dist/components/TransactionTrace/TraceDetail.js +27 -27
  101. package/dist/components/TransactionTrace/TreeTraceTable.d.ts +1 -0
  102. package/dist/components/TransactionTrace/TreeTraceTable.js +28 -28
  103. package/dist/components/TransactionTrace/index.d.ts +1 -0
  104. package/dist/components/TransactionTrace/index.js +28 -28
  105. package/dist/utils/address.js +2 -2
  106. package/dist/utils/calldataUrl.d.ts +35 -0
  107. package/dist/utils/calldataUrl.js +253 -0
  108. package/dist/utils/calldataUrl.js.map +1 -0
  109. package/dist/utils/cive-plugins.js +2 -2
  110. package/dist/utils/constants.d.ts +2 -1
  111. package/dist/utils/constants.js +3 -1
  112. package/dist/utils/contractManagerTool.js +2 -2
  113. package/dist/utils/hooks/useAddressLabel.js +3 -3
  114. package/dist/utils/hooks/useAge.js +1 -1
  115. package/dist/utils/hooks/useAutoSetHolderFilterParams.js +2 -2
  116. package/dist/utils/hooks/useDecodeFunctionData.d.ts +2 -2
  117. package/dist/utils/hooks/useDecodeFunctionData.js +5 -5
  118. package/dist/utils/hooks/useDecodeFunctionError.js +5 -5
  119. package/dist/utils/hooks/useDecodedDataType.d.ts +1 -0
  120. package/dist/utils/hooks/useENS.js +3 -3
  121. package/dist/utils/hooks/useSimulateTrace.d.ts +13 -6
  122. package/dist/utils/hooks/useSimulateTrace.js +21 -16
  123. package/dist/utils/hooks/useSimulateTrace.js.map +1 -1
  124. package/dist/utils/hooks/useTxTrace.d.ts +1 -0
  125. package/dist/utils/hooks/useTxTrace.js +4 -4
  126. package/dist/utils/index.js +2 -2
  127. package/dist/utils/sdk.d.ts +3 -3
  128. package/dist/utils/sdk.js +3 -3
  129. package/dist/utils/types.d.ts +4 -0
  130. package/dist/utils/types.js +1 -0
  131. package/dist/utils/types.js.map +1 -0
  132. package/package.json +3 -3
  133. package/dist/chunk-XQ246UQW.js.map +0 -1
  134. /package/dist/{chunk-SFULLYYL.js.map → chunk-32HFN5MP.js.map} +0 -0
  135. /package/dist/{chunk-CMM72NR3.js.map → chunk-47HU5DGL.js.map} +0 -0
  136. /package/dist/{chunk-A7LX3FWL.js.map → chunk-4DX7CRRE.js.map} +0 -0
  137. /package/dist/{chunk-D6INJ4N5.js.map → chunk-4TF33JZW.js.map} +0 -0
  138. /package/dist/{chunk-NZ32DWUZ.js.map → chunk-5OYITIUX.js.map} +0 -0
  139. /package/dist/{chunk-IKPPUNBU.js.map → chunk-6H5XKOXM.js.map} +0 -0
  140. /package/dist/{chunk-A64ILFRR.js.map → chunk-7NFRRT77.js.map} +0 -0
  141. /package/dist/{chunk-7NVZPYT3.js.map → chunk-7U24RYWX.js.map} +0 -0
  142. /package/dist/{chunk-IXMDBWQH.js.map → chunk-DHTXUMRS.js.map} +0 -0
  143. /package/dist/{chunk-3CY7SRAN.js.map → chunk-EJDYTF4C.js.map} +0 -0
  144. /package/dist/{chunk-SEIHZVZU.js.map → chunk-GC3XWDVL.js.map} +0 -0
  145. /package/dist/{chunk-WZ6MS4XP.js.map → chunk-GRPL5QSE.js.map} +0 -0
  146. /package/dist/{chunk-FOQ3VNZS.js.map → chunk-GYK2VPUW.js.map} +0 -0
  147. /package/dist/{chunk-SCTG3SCG.js.map → chunk-HU3XDAH5.js.map} +0 -0
  148. /package/dist/{chunk-CWTDFCRF.js.map → chunk-HUBXGHJC.js.map} +0 -0
  149. /package/dist/{chunk-7BAN6GKP.js.map → chunk-K6M3ZRL6.js.map} +0 -0
  150. /package/dist/{chunk-VYI4IZMQ.js.map → chunk-LDCBSWPD.js.map} +0 -0
  151. /package/dist/{chunk-NSSKV676.js.map → chunk-LJUDPQQ6.js.map} +0 -0
  152. /package/dist/{chunk-G56ZGF4A.js.map → chunk-NC5OXZ7Z.js.map} +0 -0
  153. /package/dist/{chunk-J6WXTCBD.js.map → chunk-NUKWAN7M.js.map} +0 -0
  154. /package/dist/{chunk-OVWRJMGS.js.map → chunk-OO5UHQV4.js.map} +0 -0
  155. /package/dist/{chunk-XBEBAU77.js.map → chunk-OYHBJBBP.js.map} +0 -0
  156. /package/dist/{chunk-A3VDKIWS.js.map → chunk-PJHNQX2G.js.map} +0 -0
  157. /package/dist/{chunk-6JLI3Y4J.js.map → chunk-PYDEMSMB.js.map} +0 -0
  158. /package/dist/{chunk-VSVZWF66.js.map → chunk-RHW2TVMC.js.map} +0 -0
  159. /package/dist/{chunk-Y362QJNT.js.map → chunk-RMFJW6N6.js.map} +0 -0
  160. /package/dist/{chunk-T5IOTGTQ.js.map → chunk-ST5N4WQW.js.map} +0 -0
  161. /package/dist/{chunk-EZVQ6JRV.js.map → chunk-UVKAL7G5.js.map} +0 -0
  162. /package/dist/{chunk-WJPIKXWT.js.map → chunk-V3CTDOE7.js.map} +0 -0
  163. /package/dist/{chunk-4QR5LKPG.js.map → chunk-X7QBDC3I.js.map} +0 -0
  164. /package/dist/{chunk-63ULYLAC.js.map → chunk-XBQLSMRE.js.map} +0 -0
  165. /package/dist/{chunk-JLEQ7K57.js.map → chunk-XNJGXQHS.js.map} +0 -0
  166. /package/dist/{chunk-AJB2BZ6T.js.map → chunk-XQ4LT4SB.js.map} +0 -0
  167. /package/dist/{chunk-YEJRYVZ3.js.map → chunk-ZDH3XNRJ.js.map} +0 -0
  168. /package/dist/{chunk-A4QSFRUF.js.map → chunk-ZJNDRSE3.js.map} +0 -0
  169. /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-D6INJ4N5.js";
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-SEIHZVZU.js.map
140
+ //# sourceMappingURL=chunk-GC3XWDVL.js.map
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  Original
3
- } from "./chunk-JLEQ7K57.js";
3
+ } from "./chunk-XNJGXQHS.js";
4
4
  import {
5
5
  UTF8
6
- } from "./chunk-G56ZGF4A.js";
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-EZVQ6JRV.js";
12
+ } from "./chunk-UVKAL7G5.js";
13
13
  import {
14
14
  OptimizationDecode
15
- } from "./chunk-YEJRYVZ3.js";
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-WZ6MS4XP.js.map
66
+ //# sourceMappingURL=chunk-GRPL5QSE.js.map
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  Original
3
- } from "./chunk-JLEQ7K57.js";
3
+ } from "./chunk-XNJGXQHS.js";
4
4
  import {
5
5
  AbiWarning
6
- } from "./chunk-XBEBAU77.js";
6
+ } from "./chunk-OYHBJBBP.js";
7
7
  import {
8
8
  DecodedParameters
9
- } from "./chunk-YEJRYVZ3.js";
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-A4QSFRUF.js";
15
+ } from "./chunk-ZJNDRSE3.js";
16
16
  import {
17
17
  cn
18
- } from "./chunk-D6INJ4N5.js";
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-FOQ3VNZS.js.map
94
+ //# sourceMappingURL=chunk-GYK2VPUW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  convertCheckSum
3
- } from "./chunk-4QR5LKPG.js";
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-SCTG3SCG.js.map
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-WJPIKXWT.js";
6
+ } from "./chunk-V3CTDOE7.js";
7
7
  import {
8
8
  selectText
9
- } from "./chunk-D6INJ4N5.js";
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-CWTDFCRF.js.map
105
+ //# sourceMappingURL=chunk-HUBXGHJC.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  convertCheckSum
3
- } from "./chunk-4QR5LKPG.js";
3
+ } from "./chunk-X7QBDC3I.js";
4
4
  import {
5
5
  Text
6
- } from "./chunk-CWTDFCRF.js";
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-7BAN6GKP.js.map
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-2MY3T2VH.js";
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-VYI4IZMQ.js.map
9448
+ //# sourceMappingURL=chunk-LDCBSWPD.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  DecimalsSelect
3
- } from "./chunk-VRA7CSHI.js";
3
+ } from "./chunk-ZVSCII5U.js";
4
4
  import {
5
5
  formatBalance
6
- } from "./chunk-D6INJ4N5.js";
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-NSSKV676.js.map
50
+ //# sourceMappingURL=chunk-LJUDPQQ6.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  hex2utf8
3
- } from "./chunk-D6INJ4N5.js";
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-G56ZGF4A.js.map
21
+ //# sourceMappingURL=chunk-NC5OXZ7Z.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TraceDetail
3
- } from "./chunk-A7LX3FWL.js";
3
+ } from "./chunk-4DX7CRRE.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-J6WXTCBD.js.map
84
+ //# sourceMappingURL=chunk-NUKWAN7M.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-2MY3T2VH.js.map
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-FOQ3VNZS.js";
3
+ } from "./chunk-GYK2VPUW.js";
4
4
  import {
5
5
  Original
6
- } from "./chunk-JLEQ7K57.js";
6
+ } from "./chunk-XNJGXQHS.js";
7
7
  import {
8
8
  UTF8
9
- } from "./chunk-G56ZGF4A.js";
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-YEJRYVZ3.js";
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-OVWRJMGS.js.map
72
+ //# sourceMappingURL=chunk-OO5UHQV4.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2Y57U43P.js";
4
4
  import {
5
5
  Warning
6
- } from "./chunk-MWAD4CIG.js";
6
+ } from "./chunk-BESFVHAM.js";
7
7
 
8
8
  // src/components/InputData/AbiWarning.tsx
9
9
  import { Trans } from "react-i18next";
@@ -34,4 +34,4 @@ var AbiWarning = ({
34
34
  export {
35
35
  AbiWarning
36
36
  };
37
- //# sourceMappingURL=chunk-XBEBAU77.js.map
37
+ //# sourceMappingURL=chunk-OYHBJBBP.js.map
@@ -2,7 +2,7 @@ import {
2
2
  convertBigNumbersToStrings,
3
3
  convertObjBigNumbersToStrings,
4
4
  fromCfxToDrip
5
- } from "./chunk-D6INJ4N5.js";
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-A3VDKIWS.js.map
60
+ //# sourceMappingURL=chunk-PJHNQX2G.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  formatAddress
3
- } from "./chunk-4QR5LKPG.js";
3
+ } from "./chunk-X7QBDC3I.js";
4
4
  import {
5
5
  formatABI
6
- } from "./chunk-D6INJ4N5.js";
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-6JLI3Y4J.js.map
159
+ //# sourceMappingURL=chunk-PYDEMSMB.js.map
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  getAddressNameInfo
3
- } from "./chunk-IXMDBWQH.js";
3
+ } from "./chunk-DHTXUMRS.js";
4
4
  import {
5
5
  ContractAddress,
6
6
  ContractCreatedAddress,
7
7
  InvalidAddress,
8
8
  MyAddress
9
- } from "./chunk-NZ32DWUZ.js";
9
+ } from "./chunk-5OYITIUX.js";
10
10
  import {
11
11
  RenderAddress
12
- } from "./chunk-7BAN6GKP.js";
12
+ } from "./chunk-K6M3ZRL6.js";
13
13
  import {
14
14
  convertCheckSum,
15
15
  formatAddress,
16
16
  isEvmAddress,
17
17
  isZeroAddress
18
- } from "./chunk-4QR5LKPG.js";
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-VSVZWF66.js.map
112
+ //# sourceMappingURL=chunk-RHW2TVMC.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ArrowDown
3
- } from "./chunk-MWAD4CIG.js";
3
+ } from "./chunk-BESFVHAM.js";
4
4
  import {
5
5
  Text
6
- } from "./chunk-CWTDFCRF.js";
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-Y362QJNT.js.map
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-IXMDBWQH.js";
9
+ } from "./chunk-DHTXUMRS.js";
10
10
  import {
11
11
  DefaultTokenIcon
12
- } from "./chunk-MWAD4CIG.js";
12
+ } from "./chunk-BESFVHAM.js";
13
13
  import {
14
14
  formatAddress
15
- } from "./chunk-4QR5LKPG.js";
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-T5IOTGTQ.js.map
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-CMM72NR3.js";
6
+ } from "./chunk-47HU5DGL.js";
7
7
  import {
8
8
  formatABI
9
- } from "./chunk-D6INJ4N5.js";
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-EZVQ6JRV.js.map
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-D6INJ4N5.js";
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-WJPIKXWT.js.map
536
+ //# sourceMappingURL=chunk-V3CTDOE7.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NETWORK_ID
3
- } from "./chunk-2MY3T2VH.js";
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-4QR5LKPG.js.map
284
+ //# sourceMappingURL=chunk-X7QBDC3I.js.map
@@ -5,10 +5,10 @@ import {
5
5
  SelectItem,
6
6
  SelectTrigger,
7
7
  SelectValue
8
- } from "./chunk-IKPPUNBU.js";
8
+ } from "./chunk-6H5XKOXM.js";
9
9
  import {
10
10
  cn
11
- } from "./chunk-D6INJ4N5.js";
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-63ULYLAC.js.map
107
+ //# sourceMappingURL=chunk-XBQLSMRE.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-D6INJ4N5.js";
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-JLEQ7K57.js.map
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-WJPIKXWT.js";
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-AJB2BZ6T.js.map
26
+ //# sourceMappingURL=chunk-XQ4LT4SB.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AddressLabel
3
- } from "./chunk-A64ILFRR.js";
3
+ } from "./chunk-7NFRRT77.js";
4
4
  import {
5
5
  ContractDetail
6
- } from "./chunk-T5IOTGTQ.js";
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-4QR5LKPG.js";
19
+ } from "./chunk-X7QBDC3I.js";
20
20
  import {
21
21
  Text
22
- } from "./chunk-CWTDFCRF.js";
22
+ } from "./chunk-HUBXGHJC.js";
23
23
  import {
24
24
  cn
25
- } from "./chunk-D6INJ4N5.js";
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-YEJRYVZ3.js.map
167
+ //# sourceMappingURL=chunk-ZDH3XNRJ.js.map
@@ -1,9 +1,9 @@
1
+ import {
2
+ decodeErrorResult
3
+ } from "./chunk-FYDF5QZ6.js";
1
4
  import {
2
5
  useAbiItemById
3
6
  } from "./chunk-NDGJLSZN.js";
4
- import {
5
- decodeErrorResult
6
- } from "./chunk-FLFDRCTI.js";
7
7
  import {
8
8
  useContractDetail
9
9
  } from "./chunk-XN2TDIIK.js";
@@ -15,11 +15,11 @@ import {
15
15
  } from "./chunk-ADNS57X5.js";
16
16
  import {
17
17
  formatABI
18
- } from "./chunk-D6INJ4N5.js";
18
+ } from "./chunk-4TF33JZW.js";
19
19
  import {
20
20
  COMMON_ERROR_OUTPUT_PREFIX,
21
21
  COMMON_PANIC_OUTPUT_PREFIX
22
- } from "./chunk-2MY3T2VH.js";
22
+ } from "./chunk-NZVJYR5B.js";
23
23
 
24
24
  // src/utils/hooks/useDecodeFunctionError.ts
25
25
  import { useMemo } from "react";
@@ -200,4 +200,4 @@ var useDecodeFunctionError = ({
200
200
  export {
201
201
  useDecodeFunctionError
202
202
  };
203
- //# sourceMappingURL=chunk-A4QSFRUF.js.map
203
+ //# sourceMappingURL=chunk-ZJNDRSE3.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Popover
3
- } from "./chunk-7NVZPYT3.js";
3
+ } from "./chunk-7U24RYWX.js";
4
4
 
5
5
  // src/components/DecimalsSelect/index.tsx
6
6
  import { useState } from "react";
@@ -129,4 +129,4 @@ var DecimalsSelect = ({
129
129
  export {
130
130
  DecimalsSelect
131
131
  };
132
- //# sourceMappingURL=chunk-VRA7CSHI.js.map
132
+ //# sourceMappingURL=chunk-ZVSCII5U.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  decodeFunctionData,
6
6
  decodeFunctionResult
7
- } from "./chunk-FLFDRCTI.js";
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-D6INJ4N5.js";
16
+ } from "./chunk-4TF33JZW.js";
17
17
 
18
18
  // src/utils/hooks/useDecodeFunctionData.ts
19
19
  import { useMemo } from "react";
@@ -200,4 +200,4 @@ var useDecodeFunctionData = ({
200
200
  export {
201
201
  useDecodeFunctionData
202
202
  };
203
- //# sourceMappingURL=chunk-XQ246UQW.js.map
203
+ //# sourceMappingURL=chunk-ZWZMVVVB.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 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 const decodedParams = decodeFunctionData({\n abi: abi,\n data: input,\n space,\n });\n let decodedResults = success\n ? !isReturnDataEmpty\n ? decodeFunctionResult({\n abi: abi,\n functionName: methodID,\n data: output,\n space,\n })\n : undefined\n : output;\n const abiItem = getAbiItem({\n abi: abi,\n name: methodID,\n }) as AbiFunctionWithoutGas;\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 return {\n failed: true,\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 if (\n (decodedByOuterAbi && decodedByOuterAbi.failed) ||\n (decodedByImplementationAbi && decodedByImplementationAbi.failed) ||\n (decodedByContractAbi && decodedByContractAbi.failed) ||\n (decodedByMethodAbi && decodedByMethodAbi.failed)\n ) {\n return [\n {\n failed: true,\n },\n false,\n ];\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":";;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAe;AAYxB,IAAM,SAAS,CAAC,KAAc;AAE9B,IAAM,0BAA0B,CAAC;AAAA,EAC/B,KAAK;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AACF,MAQM;AACJ,MAAI;AACF,UAAM,MAAM,OAAO,SAAS,WAAW,KAAK,MAAM,IAAI,I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;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  useDecodeFunctionError
3
- } from "../../chunk-A4QSFRUF.js";
3
+ } from "../../chunk-ZJNDRSE3.js";
4
+ import "../../chunk-FYDF5QZ6.js";
4
5
  import "../../chunk-NDGJLSZN.js";
5
- import "../../chunk-FLFDRCTI.js";
6
6
  import "../../chunk-XN2TDIIK.js";
7
- import "../../chunk-VYI4IZMQ.js";
7
+ import "../../chunk-LDCBSWPD.js";
8
8
  import "../../chunk-CGDNDBBP.js";
9
9
  import "../../chunk-S6O6Q2GQ.js";
10
10
  import "../../chunk-LBAEFEJU.js";
11
11
  import "../../chunk-5TGK2EA2.js";
12
12
  import "../../chunk-ADNS57X5.js";
13
- import "../../chunk-D6INJ4N5.js";
14
- import "../../chunk-2MY3T2VH.js";
13
+ import "../../chunk-4TF33JZW.js";
14
+ import "../../chunk-NZVJYR5B.js";
15
15
  import "../../chunk-EN25IHGP.js";
16
16
  import "../../chunk-ZZLGINAC.js";
17
17
  import "../../chunk-YEINMVAR.js";