@cfxjs/sirius-next-common 0.2.29 → 0.3.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/dist/{ccip-DBSI27GO.js → ccip-4OIZJRM7.js} +3 -3
- package/dist/chunk-267JWZ3X.js +20 -0
- package/dist/chunk-267JWZ3X.js.map +1 -0
- package/dist/{chunk-WIB76E7O.js → chunk-2MY3T2VH.js} +2 -2
- package/dist/{chunk-CTHYDPXG.js → chunk-3CY7SRAN.js} +7 -7
- package/dist/{chunk-RP23W2AA.js → chunk-4QR5LKPG.js} +3 -3
- package/dist/{chunk-XZ7IV2FF.js → chunk-4WLXG7ZY.js} +2 -2
- package/dist/{chunk-YOI54A6M.js → chunk-5DFWDFAH.js} +2 -2
- package/dist/{chunk-XMBEB34D.js → chunk-5PYC44RX.js} +2 -2
- package/dist/{chunk-5H6N5Q5P.js → chunk-63ULYLAC.js} +3 -3
- package/dist/chunk-6JLI3Y4J.js +159 -0
- package/dist/chunk-6JLI3Y4J.js.map +1 -0
- package/dist/chunk-6JXQS4XH.js +14 -0
- package/dist/chunk-6JXQS4XH.js.map +1 -0
- package/dist/{chunk-RFN3GPMD.js → chunk-7BAN6GKP.js} +4 -4
- package/dist/chunk-7HK6APFZ.js +28 -0
- package/dist/chunk-7HK6APFZ.js.map +1 -0
- package/dist/{chunk-HBJOTRGP.js → chunk-7NVZPYT3.js} +2 -2
- package/dist/chunk-A3VDKIWS.js +60 -0
- package/dist/chunk-A3VDKIWS.js.map +1 -0
- package/dist/{chunk-H5ZIEB6Y.js → chunk-A4QSFRUF.js} +51 -25
- package/dist/chunk-A4QSFRUF.js.map +1 -0
- package/dist/{chunk-3LFAB7KP.js → chunk-A64ILFRR.js} +5 -5
- package/dist/{chunk-J3GK2LUK.js → chunk-A7LX3FWL.js} +8 -8
- package/dist/{chunk-CQ7PIGKY.js → chunk-AJB2BZ6T.js} +2 -2
- package/dist/{secp256k1-WGKMGTUQ.js → chunk-CGDNDBBP.js} +8 -7
- package/dist/{secp256k1-WGKMGTUQ.js.map → chunk-CGDNDBBP.js.map} +1 -1
- package/dist/{chunk-337L4DV3.js → chunk-CMM72NR3.js} +3 -3
- package/dist/{chunk-Z2UXDMUA.js → chunk-CWTDFCRF.js} +3 -3
- package/dist/{chunk-G6N3L7XQ.js → chunk-D6INJ4N5.js} +7 -5
- package/dist/chunk-D6INJ4N5.js.map +1 -0
- package/dist/{chunk-473ZUYVX.js → chunk-EN25IHGP.js} +3 -3
- package/dist/{chunk-5FNTPYWO.js → chunk-EZVQ6JRV.js} +3 -3
- package/dist/{chunk-S7FVSBBH.js → chunk-FGUCFE4W.js} +2 -2
- package/dist/chunk-FLFDRCTI.js +21490 -0
- package/dist/chunk-FLFDRCTI.js.map +1 -0
- package/dist/{chunk-OSFR346H.js → chunk-FOQ3VNZS.js} +15 -11
- package/dist/chunk-FOQ3VNZS.js.map +1 -0
- package/dist/{chunk-Z7YF2BJY.js → chunk-G56ZGF4A.js} +2 -2
- package/dist/chunk-GNOB77UA.js +14 -0
- package/dist/chunk-GNOB77UA.js.map +1 -0
- package/dist/{chunk-5ZPPSS5X.js → chunk-IKPPUNBU.js} +2 -2
- package/dist/{chunk-VIXYY5CK.js → chunk-IXMDBWQH.js} +2 -2
- package/dist/{chunk-G7UHBRGA.js → chunk-J6WXTCBD.js} +5 -5
- package/dist/chunk-J6WXTCBD.js.map +1 -0
- package/dist/chunk-JLEQ7K57.js +23 -0
- package/dist/chunk-JLEQ7K57.js.map +1 -0
- package/dist/{chunk-DQGLZCIG.js → chunk-L4AFJGXJ.js} +1 -1
- package/dist/{chunk-DQGLZCIG.js.map → chunk-L4AFJGXJ.js.map} +1 -1
- package/dist/{chunk-4B6ASBYQ.js → chunk-LBAEFEJU.js} +10 -1
- package/dist/{chunk-4B6ASBYQ.js.map → chunk-LBAEFEJU.js.map} +1 -1
- package/dist/{chunk-I5YTFVQB.js → chunk-NDGJLSZN.js} +2 -2
- package/dist/chunk-NSSKV676.js +50 -0
- package/dist/chunk-NSSKV676.js.map +1 -0
- package/dist/{chunk-MOVBVQ73.js → chunk-NZ32DWUZ.js} +6 -6
- package/dist/{chunk-IKP2BVXN.js → chunk-OVWRJMGS.js} +9 -9
- package/dist/chunk-PCTL7FBZ.js +10 -0
- package/dist/chunk-PCTL7FBZ.js.map +1 -0
- package/dist/{chunk-JIRLY7OG.js → chunk-S6O6Q2GQ.js} +1735 -174
- package/dist/chunk-S6O6Q2GQ.js.map +1 -0
- package/dist/{chunk-MKBKASBZ.js → chunk-SCTG3SCG.js} +3 -3
- package/dist/{chunk-RM25O3LE.js → chunk-SEIHZVZU.js} +2 -2
- package/dist/{chunk-X4VWQ2HL.js → chunk-SFULLYYL.js} +5 -5
- package/dist/{chunk-W2CLMFMA.js → chunk-T5IOTGTQ.js} +4 -4
- package/dist/{chunk-IW36ZVPL.js → chunk-UARYZ4C2.js} +2 -2
- package/dist/chunk-VRA7CSHI.js +132 -0
- package/dist/chunk-VRA7CSHI.js.map +1 -0
- package/dist/{chunk-5L5VDFFK.js → chunk-VSVZWF66.js} +6 -6
- package/dist/chunk-VYI4IZMQ.js +9448 -0
- package/dist/chunk-VYI4IZMQ.js.map +1 -0
- package/dist/{chunk-EMY3TQJY.js → chunk-WJPIKXWT.js} +2 -2
- package/dist/{chunk-YZP2WZRW.js → chunk-WZ6MS4XP.js} +9 -9
- package/dist/{chunk-Y7OVL5US.js → chunk-XCLT7DP4.js} +2 -2
- package/dist/{chunk-H2HTJNMZ.js → chunk-XN2TDIIK.js} +2 -2
- package/dist/{chunk-IUFQJFZW.js → chunk-XQ246UQW.js} +11 -10
- package/dist/chunk-XQ246UQW.js.map +1 -0
- package/dist/chunk-Y362QJNT.js +65 -0
- package/dist/chunk-Y362QJNT.js.map +1 -0
- package/dist/chunk-YEJRYVZ3.js +167 -0
- package/dist/chunk-YEJRYVZ3.js.map +1 -0
- package/dist/{chunk-J2I22Q2M.js → chunk-ZZLGINAC.js} +2 -2
- package/dist/components/AAFailedReason/index.js +13 -11
- package/dist/components/AAFailedReason/index.js.map +1 -1
- package/dist/components/AceEditor/index.js +7 -7
- package/dist/components/AddressContainer/CoreAddressContainer.js +13 -13
- package/dist/components/AddressContainer/EVMAddressContainer.js +12 -12
- package/dist/components/AddressContainer/addressSwitcher.js +10 -10
- package/dist/components/AddressContainer/addressView.js +9 -9
- package/dist/components/AddressContainer/label.js +6 -6
- package/dist/components/AddressContainer/utils.js +6 -6
- package/dist/components/Age/index.js +7 -7
- package/dist/components/AutoComplete/index.js +6 -6
- package/dist/components/Charts/ChartOptions.js +2 -2
- package/dist/components/Charts/PreviewChartTemplate.js +4 -4
- package/dist/components/Charts/PreviewTitle.js +2 -2
- package/dist/components/Charts/StockChartTemplate.js +4 -4
- package/dist/components/Collapse/index.d.ts +31 -0
- package/dist/components/Collapse/index.js +105 -0
- package/dist/components/Collapse/index.js.map +1 -0
- package/dist/components/ContractAbi/Error.d.ts +8 -0
- package/dist/components/ContractAbi/Error.js +8 -0
- package/dist/components/ContractAbi/Error.js.map +1 -0
- package/dist/components/ContractAbi/FuncBody.d.ts +9 -0
- package/dist/components/ContractAbi/FuncBody.js +8 -0
- package/dist/components/ContractAbi/FuncBody.js.map +1 -0
- package/dist/components/ContractAbi/FuncResponse.d.ts +13 -0
- package/dist/components/ContractAbi/FuncResponse.js +8 -0
- package/dist/components/ContractAbi/FuncResponse.js.map +1 -0
- package/dist/components/ContractAbi/IntValueFormatter.d.ts +9 -0
- package/dist/components/ContractAbi/IntValueFormatter.js +18 -0
- package/dist/components/ContractAbi/IntValueFormatter.js.map +1 -0
- package/dist/components/ContractAbi/OutputParams.d.ts +11 -0
- package/dist/components/ContractAbi/OutputParams.js +8 -0
- package/dist/components/ContractAbi/OutputParams.js.map +1 -0
- package/dist/components/ContractAbi/ParamTitle.d.ts +13 -0
- package/dist/components/ContractAbi/ParamTitle.js +20 -0
- package/dist/components/ContractAbi/ParamTitle.js.map +1 -0
- package/dist/components/ContractAbi/constants.d.ts +9 -0
- package/dist/components/ContractAbi/constants.js +10 -0
- package/dist/components/ContractAbi/constants.js.map +1 -0
- package/dist/components/ContractAbi/index.d.ts +10 -0
- package/dist/components/ContractAbi/index.js +52 -0
- package/dist/components/ContractAbi/index.js.map +1 -0
- package/dist/components/ContractAbi/utils.d.ts +9 -0
- package/dist/components/ContractAbi/utils.js +14 -0
- package/dist/components/ContractAbi/utils.js.map +1 -0
- package/dist/components/CookieTip/index.js +2 -2
- package/dist/components/CopyButton/index.d.ts +5 -2
- package/dist/components/CopyButton/index.js +50 -33
- package/dist/components/CopyButton/index.js.map +1 -1
- package/dist/components/DecimalsSelect/index.js +8 -131
- package/dist/components/DecimalsSelect/index.js.map +1 -1
- package/dist/components/DownloadCSV/index.js +7 -7
- package/dist/components/Empty/index.js +2 -2
- package/dist/components/GasPriceDropdown/index.js +5 -5
- package/dist/components/Highlight/index.d.ts +1 -1
- package/dist/components/Highlight/index.js +2 -2
- package/dist/components/Highlight/index.js.map +1 -1
- package/dist/components/IncreasePercent/index.js +5 -5
- package/dist/components/InfoIconWithTooltip/index.js +7 -7
- package/dist/components/InputData/AddressLabel.js +11 -11
- package/dist/components/InputData/ContractDetail.js +8 -8
- package/dist/components/InputData/FunctionName.d.ts +2 -0
- package/dist/components/InputData/JsonDecode.d.ts +2 -0
- package/dist/components/InputData/JsonDecode.js +8 -8
- package/dist/components/InputData/OptimizationDecode.d.ts +4 -1
- package/dist/components/InputData/OptimizationDecode.js +15 -15
- package/dist/components/InputData/Original.d.ts +2 -1
- package/dist/components/InputData/Original.js +7 -1
- package/dist/components/InputData/UTF8.js +6 -6
- package/dist/components/InputData/index.d.ts +2 -0
- package/dist/components/InputData/index.js +20 -20
- package/dist/components/List/index.js +3 -3
- package/dist/components/Modal/index.js +6 -6
- package/dist/components/NetworkIcon/index.js +5 -5
- package/dist/components/OutputData/ErrorDecode.d.ts +10 -6
- package/dist/components/OutputData/ErrorDecode.js +26 -24
- package/dist/components/OutputData/index.d.ts +2 -0
- package/dist/components/OutputData/index.js +28 -26
- package/dist/components/PhishingAddressContainer/index.js +7 -7
- package/dist/components/Popover/index.js +6 -6
- package/dist/components/Price/index.js +6 -6
- package/dist/components/ProxyContractAddress/index.d.ts +2 -0
- package/dist/components/ProxyContractAddress/index.js +9 -9
- package/dist/components/Radio/index.js +5 -5
- package/dist/components/Remark/index.js +1 -1
- package/dist/components/SearchInput/index.js +7 -7
- package/dist/components/Select/index.js +7 -7
- package/dist/components/Select/select.js +6 -6
- package/dist/components/SmartAccountAddress/index.js +9 -9
- package/dist/components/Table/index.js +3 -3
- package/dist/components/Text/index.js +7 -7
- package/dist/components/Tooltip/index.js +6 -6
- package/dist/components/TransactionAction/coreTransactionAction.js +13 -13
- package/dist/components/TransactionAction/evmTransactionAction.js +12 -12
- package/dist/components/TransactionTrace/TraceDetail.d.ts +2 -0
- package/dist/components/TransactionTrace/TraceDetail.js +36 -34
- package/dist/components/TransactionTrace/TreeTraceTable.d.ts +2 -0
- package/dist/components/TransactionTrace/TreeTraceTable.js +39 -37
- package/dist/components/TransactionTrace/index.d.ts +2 -0
- package/dist/components/TransactionTrace/index.js +39 -37
- package/dist/secp256k1-2GKRGI5Q.js +17 -0
- package/dist/secp256k1-2GKRGI5Q.js.map +1 -0
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +1 -1
- package/dist/two-arrow-VZ3CKZHM.png +0 -0
- package/dist/uno.css +40 -4
- package/dist/utils/address.js +5 -5
- package/dist/utils/cive-plugins.d.ts +22 -0
- package/dist/utils/cive-plugins.js +17 -0
- package/dist/utils/cive-plugins.js.map +1 -0
- package/dist/utils/constants.js +2 -2
- package/dist/utils/contractManagerTool.js +5 -5
- package/dist/utils/hooks/useAbiItemById.js +4 -4
- package/dist/utils/hooks/useAddressLabel.js +6 -6
- package/dist/utils/hooks/useAddressNameMap.js +4 -4
- package/dist/utils/hooks/useAge.js +2 -2
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js +5 -5
- package/dist/utils/hooks/useContractDetail.js +4 -4
- package/dist/utils/hooks/useDecodeFunctionData.d.ts +3 -1
- package/dist/utils/hooks/useDecodeFunctionData.js +15 -11
- package/dist/utils/hooks/useDecodeFunctionError.d.ts +9 -7
- package/dist/utils/hooks/useDecodeFunctionError.js +13 -11
- package/dist/utils/hooks/useDecodedDataType.d.ts +2 -0
- package/dist/utils/hooks/useENS.js +6 -6
- package/dist/utils/hooks/useEnhanceDataWithNameMap.js +4 -4
- package/dist/utils/hooks/useMethodAbi.js +4 -4
- package/dist/utils/hooks/useSimulateTrace.d.ts +71 -0
- package/dist/utils/hooks/useSimulateTrace.js +185 -0
- package/dist/utils/hooks/useSimulateTrace.js.map +1 -0
- package/dist/utils/hooks/useTableData.js +3 -3
- package/dist/utils/hooks/useTxTrace.d.ts +10 -3
- package/dist/utils/hooks/useTxTrace.js +16 -146
- package/dist/utils/hooks/useTxTrace.js.map +1 -1
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.js +7 -5
- package/dist/utils/pubsub.js +2 -2
- package/dist/utils/request.js +3 -3
- package/dist/utils/rpcRequest.js +2 -2
- package/dist/utils/sdk.d.ts +34 -9
- package/dist/utils/sdk.js +17 -7
- package/package.json +5 -2
- package/dist/chunk-5AM5HM3B.js +0 -10
- package/dist/chunk-5AM5HM3B.js.map +0 -1
- package/dist/chunk-6SXAFSBF.js +0 -1032
- package/dist/chunk-6SXAFSBF.js.map +0 -1
- package/dist/chunk-G6N3L7XQ.js.map +0 -1
- package/dist/chunk-G7UHBRGA.js.map +0 -1
- package/dist/chunk-H5ZIEB6Y.js.map +0 -1
- package/dist/chunk-IUFQJFZW.js.map +0 -1
- package/dist/chunk-JIRLY7OG.js.map +0 -1
- package/dist/chunk-OSFR346H.js.map +0 -1
- package/dist/chunk-SK75VWEO.js +0 -157
- package/dist/chunk-SK75VWEO.js.map +0 -1
- /package/dist/{ccip-DBSI27GO.js.map → ccip-4OIZJRM7.js.map} +0 -0
- /package/dist/{chunk-WIB76E7O.js.map → chunk-2MY3T2VH.js.map} +0 -0
- /package/dist/{chunk-CTHYDPXG.js.map → chunk-3CY7SRAN.js.map} +0 -0
- /package/dist/{chunk-RP23W2AA.js.map → chunk-4QR5LKPG.js.map} +0 -0
- /package/dist/{chunk-XZ7IV2FF.js.map → chunk-4WLXG7ZY.js.map} +0 -0
- /package/dist/{chunk-YOI54A6M.js.map → chunk-5DFWDFAH.js.map} +0 -0
- /package/dist/{chunk-XMBEB34D.js.map → chunk-5PYC44RX.js.map} +0 -0
- /package/dist/{chunk-5H6N5Q5P.js.map → chunk-63ULYLAC.js.map} +0 -0
- /package/dist/{chunk-RFN3GPMD.js.map → chunk-7BAN6GKP.js.map} +0 -0
- /package/dist/{chunk-HBJOTRGP.js.map → chunk-7NVZPYT3.js.map} +0 -0
- /package/dist/{chunk-3LFAB7KP.js.map → chunk-A64ILFRR.js.map} +0 -0
- /package/dist/{chunk-J3GK2LUK.js.map → chunk-A7LX3FWL.js.map} +0 -0
- /package/dist/{chunk-CQ7PIGKY.js.map → chunk-AJB2BZ6T.js.map} +0 -0
- /package/dist/{chunk-337L4DV3.js.map → chunk-CMM72NR3.js.map} +0 -0
- /package/dist/{chunk-Z2UXDMUA.js.map → chunk-CWTDFCRF.js.map} +0 -0
- /package/dist/{chunk-473ZUYVX.js.map → chunk-EN25IHGP.js.map} +0 -0
- /package/dist/{chunk-5FNTPYWO.js.map → chunk-EZVQ6JRV.js.map} +0 -0
- /package/dist/{chunk-S7FVSBBH.js.map → chunk-FGUCFE4W.js.map} +0 -0
- /package/dist/{chunk-Z7YF2BJY.js.map → chunk-G56ZGF4A.js.map} +0 -0
- /package/dist/{chunk-5ZPPSS5X.js.map → chunk-IKPPUNBU.js.map} +0 -0
- /package/dist/{chunk-VIXYY5CK.js.map → chunk-IXMDBWQH.js.map} +0 -0
- /package/dist/{chunk-I5YTFVQB.js.map → chunk-NDGJLSZN.js.map} +0 -0
- /package/dist/{chunk-MOVBVQ73.js.map → chunk-NZ32DWUZ.js.map} +0 -0
- /package/dist/{chunk-IKP2BVXN.js.map → chunk-OVWRJMGS.js.map} +0 -0
- /package/dist/{chunk-MKBKASBZ.js.map → chunk-SCTG3SCG.js.map} +0 -0
- /package/dist/{chunk-RM25O3LE.js.map → chunk-SEIHZVZU.js.map} +0 -0
- /package/dist/{chunk-X4VWQ2HL.js.map → chunk-SFULLYYL.js.map} +0 -0
- /package/dist/{chunk-W2CLMFMA.js.map → chunk-T5IOTGTQ.js.map} +0 -0
- /package/dist/{chunk-IW36ZVPL.js.map → chunk-UARYZ4C2.js.map} +0 -0
- /package/dist/{chunk-5L5VDFFK.js.map → chunk-VSVZWF66.js.map} +0 -0
- /package/dist/{chunk-EMY3TQJY.js.map → chunk-WJPIKXWT.js.map} +0 -0
- /package/dist/{chunk-YZP2WZRW.js.map → chunk-WZ6MS4XP.js.map} +0 -0
- /package/dist/{chunk-Y7OVL5US.js.map → chunk-XCLT7DP4.js.map} +0 -0
- /package/dist/{chunk-H2HTJNMZ.js.map → chunk-XN2TDIIK.js.map} +0 -0
- /package/dist/{chunk-J2I22Q2M.js.map → chunk-ZZLGINAC.js.map} +0 -0
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
offchainLookup,
|
|
4
4
|
offchainLookupAbiItem,
|
|
5
5
|
offchainLookupSignature
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-S6O6Q2GQ.js";
|
|
7
|
+
import "./chunk-LBAEFEJU.js";
|
|
8
8
|
import "./chunk-WQG2LZMB.js";
|
|
9
9
|
export {
|
|
10
10
|
ccipRequest,
|
|
@@ -12,4 +12,4 @@ export {
|
|
|
12
12
|
offchainLookupAbiItem,
|
|
13
13
|
offchainLookupSignature
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=ccip-
|
|
15
|
+
//# sourceMappingURL=ccip-4OIZJRM7.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/components/ContractAbi/Error.tsx
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
+
var Error = ({ message }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
className: clsx(
|
|
9
|
+
"my-8px text-12px text-#e64e4e lh-16px",
|
|
10
|
+
`${message ? "visible" : "invisible"}`
|
|
11
|
+
),
|
|
12
|
+
children: message
|
|
13
|
+
}
|
|
14
|
+
) });
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
Error
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chunk-267JWZ3X.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ContractAbi/Error.tsx"],"sourcesContent":["/**\n *\n * Error Component\n *\n */\nimport clsx from 'clsx';\n\ninterface ErrorProps {\n message?: string;\n}\n\nexport const Error = ({ message }: ErrorProps) => {\n return (\n <>\n <div\n className={clsx(\n 'my-8px text-12px text-#e64e4e lh-16px',\n `${message ? 'visible' : 'invisible'}`,\n )}\n >\n {message}\n </div>\n </>\n );\n};\n"],"mappings":";AAKA,OAAO,UAAU;AAQb,mBACE,WADF;AAFG,IAAM,QAAQ,CAAC,EAAE,QAAQ,MAAkB;AAChD,SACE,gCACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,GAAG,UAAU,YAAY;AAAA,MAC3B;AAAA,MAEC;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEnvConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L4AFJGXJ.js";
|
|
4
4
|
|
|
5
5
|
// src/utils/constants.ts
|
|
6
6
|
import lodash from "lodash";
|
|
@@ -59,4 +59,4 @@ export {
|
|
|
59
59
|
COMMON_ERROR_OUTPUT_PREFIX,
|
|
60
60
|
COMMON_PANIC_OUTPUT_PREFIX
|
|
61
61
|
};
|
|
62
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-2MY3T2VH.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useENS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SFULLYYL.js";
|
|
4
4
|
import {
|
|
5
5
|
getAddressNameInfo
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IXMDBWQH.js";
|
|
7
7
|
import {
|
|
8
8
|
ContractAddress,
|
|
9
9
|
ContractCreatedAddress,
|
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
InvalidAddress,
|
|
12
12
|
MyAddress,
|
|
13
13
|
PosAddress
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NZ32DWUZ.js";
|
|
15
15
|
import {
|
|
16
16
|
RenderAddress
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7BAN6GKP.js";
|
|
18
18
|
import {
|
|
19
19
|
formatAddress,
|
|
20
20
|
isCoreAddress,
|
|
21
21
|
isCoreContractAddress,
|
|
22
22
|
isZeroAddress
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4QR5LKPG.js";
|
|
24
24
|
import {
|
|
25
25
|
getTranslations,
|
|
26
26
|
useGlobalData
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-L4AFJGXJ.js";
|
|
28
28
|
|
|
29
29
|
// src/components/AddressContainer/CoreAddressContainer.tsx
|
|
30
30
|
import { memo } from "react";
|
|
@@ -143,4 +143,4 @@ var CoreAddressContainer = withTranslation()(
|
|
|
143
143
|
export {
|
|
144
144
|
CoreAddressContainer
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-3CY7SRAN.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NETWORK_ID
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2MY3T2VH.js";
|
|
4
4
|
import {
|
|
5
5
|
detectAccountType
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EN25IHGP.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/address.ts
|
|
9
9
|
import SDK from "js-conflux-sdk";
|
|
@@ -281,4 +281,4 @@ export {
|
|
|
281
281
|
formatAddressHexToBase32,
|
|
282
282
|
isAddressEqual
|
|
283
283
|
};
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-4QR5LKPG.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-NWVSTRCG.js";
|
|
4
4
|
import {
|
|
5
5
|
Empty
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XCLT7DP4.js";
|
|
7
7
|
import {
|
|
8
8
|
Spin
|
|
9
9
|
} from "./chunk-XCKMXAL2.js";
|
|
@@ -5944,4 +5944,4 @@ react-is/cjs/react-is.development.js:
|
|
|
5944
5944
|
* LICENSE file in the root directory of this source tree.
|
|
5945
5945
|
*)
|
|
5946
5946
|
*/
|
|
5947
|
-
//# sourceMappingURL=chunk-
|
|
5947
|
+
//# sourceMappingURL=chunk-4WLXG7ZY.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-2Y57U43P.js";
|
|
4
4
|
import {
|
|
5
5
|
useI18n
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L4AFJGXJ.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Charts/PreviewTitle.tsx
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
@@ -24,4 +24,4 @@ var PreviewTitle_default = Title;
|
|
|
24
24
|
export {
|
|
25
25
|
PreviewTitle_default
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-5DFWDFAH.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-XGOIDR7R.js";
|
|
4
4
|
import {
|
|
5
5
|
useI18n
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L4AFJGXJ.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Charts/ChartOptions.tsx
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
@@ -66,4 +66,4 @@ var ChartOptions_default = ChartOptions;
|
|
|
66
66
|
export {
|
|
67
67
|
ChartOptions_default
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=chunk-
|
|
69
|
+
//# sourceMappingURL=chunk-5PYC44RX.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IKPPUNBU.js";
|
|
9
9
|
import {
|
|
10
10
|
cn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D6INJ4N5.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-63ULYLAC.js.map
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import {
|
|
2
|
+
formatAddress
|
|
3
|
+
} from "./chunk-4QR5LKPG.js";
|
|
4
|
+
import {
|
|
5
|
+
formatABI
|
|
6
|
+
} from "./chunk-D6INJ4N5.js";
|
|
7
|
+
import {
|
|
8
|
+
fetchWithPrefix
|
|
9
|
+
} from "./chunk-EN25IHGP.js";
|
|
10
|
+
|
|
11
|
+
// src/utils/hooks/useTxTrace.ts
|
|
12
|
+
import useSWRImmutable from "swr/immutable";
|
|
13
|
+
import BigNumber from "bignumber.js";
|
|
14
|
+
var isDelegateCall = (callType) => callType && callType.toLowerCase() === "delegatecall";
|
|
15
|
+
var isStaticCall = (callType) => callType && callType.toLowerCase() === "staticcall";
|
|
16
|
+
var isCreateCall = (callType) => callType && (callType.toLowerCase() === "create" || callType.toLowerCase() === "create2");
|
|
17
|
+
var formatTraceData = (data, space) => {
|
|
18
|
+
const addressType = space === "core" ? "base32" : "hex";
|
|
19
|
+
const proxyMap = data.proxyMap || {};
|
|
20
|
+
const methodMap = data.methodMap || {};
|
|
21
|
+
const nameMap = data.nameMap || {};
|
|
22
|
+
const authMap = data.authMap || {};
|
|
23
|
+
let total = 0;
|
|
24
|
+
const formatList = (t, parent) => {
|
|
25
|
+
total += t.length;
|
|
26
|
+
return t.map((item, index) => formatItem(item, index, parent, t));
|
|
27
|
+
};
|
|
28
|
+
const formatItem = (t, index, parent, list2) => {
|
|
29
|
+
const methodId = t.action.input?.slice(0, 10);
|
|
30
|
+
const from = formatAddress(t.action.from, addressType);
|
|
31
|
+
const to = formatAddress(t.action.to, addressType);
|
|
32
|
+
const delegatedTo = to && authMap[to];
|
|
33
|
+
let method = methodId;
|
|
34
|
+
let abi = void 0;
|
|
35
|
+
const methodABI = methodId && (delegatedTo || to) ? methodMap[methodId]?.[delegatedTo || to] : void 0;
|
|
36
|
+
if (methodABI) {
|
|
37
|
+
try {
|
|
38
|
+
const result = formatABI(`["${methodABI}"]`, {
|
|
39
|
+
json: true,
|
|
40
|
+
allowEmpty: true
|
|
41
|
+
});
|
|
42
|
+
abi = JSON.parse(result);
|
|
43
|
+
const jsonABI = abi[0];
|
|
44
|
+
method = jsonABI?.name || methodId;
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.log("parse method abi error: ", methodABI, error);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const isContractCreated = !!t.action.createType;
|
|
50
|
+
const item = {
|
|
51
|
+
index: `${parent?.index ? `${parent.index}_` : ""}${index}`,
|
|
52
|
+
type: `${t.action.callType || t.type}`,
|
|
53
|
+
from,
|
|
54
|
+
to,
|
|
55
|
+
input: t.action.input,
|
|
56
|
+
value: t.action.value,
|
|
57
|
+
outcome: t.result?.outcome,
|
|
58
|
+
output: t.result?.returnData,
|
|
59
|
+
gas: t.action.gas,
|
|
60
|
+
method,
|
|
61
|
+
abi,
|
|
62
|
+
contractCreated: isContractCreated ? t.result?.addr : void 0,
|
|
63
|
+
nameMap,
|
|
64
|
+
delegatedTo,
|
|
65
|
+
isCallImpl: t.isCallImpl,
|
|
66
|
+
fromPocket: t.action.fromPocket,
|
|
67
|
+
toPocket: t.action.toPocket
|
|
68
|
+
};
|
|
69
|
+
if (item.gas && t.result?.gasLeft) {
|
|
70
|
+
const gasBn = new BigNumber(item.gas);
|
|
71
|
+
item.gasUsed = gasBn.minus(t.result.gasLeft).toString();
|
|
72
|
+
}
|
|
73
|
+
if (parent && parent.to && proxyMap[parent.to] && from === parent.to && to) {
|
|
74
|
+
if (index === 0 && proxyMap[parent.to] === "Proxy" && isDelegateCall(t.action.callType)) {
|
|
75
|
+
parent.proxy = {
|
|
76
|
+
type: "Proxy",
|
|
77
|
+
implAddress: to
|
|
78
|
+
};
|
|
79
|
+
item.isCallImpl = true;
|
|
80
|
+
}
|
|
81
|
+
const second = list2[1];
|
|
82
|
+
if (index === 0 && proxyMap[parent.to] === "BeaconProxy" && isStaticCall(t.action.callType) && second && second.action.to && second.action.from === parent.to && isDelegateCall(second.action.callType)) {
|
|
83
|
+
parent.proxy = {
|
|
84
|
+
type: "BeaconProxy",
|
|
85
|
+
beaconAddress: to,
|
|
86
|
+
implAddress: second.action.to
|
|
87
|
+
};
|
|
88
|
+
item.isCallBeacon = true;
|
|
89
|
+
second.isCallImpl = true;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (t.calls) {
|
|
93
|
+
item.calls = formatList(t.calls, item);
|
|
94
|
+
}
|
|
95
|
+
return item;
|
|
96
|
+
};
|
|
97
|
+
const list = formatList(data.traceTree);
|
|
98
|
+
return {
|
|
99
|
+
total,
|
|
100
|
+
list
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
var treeTraceToList = (data, showProxyCall = false) => {
|
|
104
|
+
const result = [];
|
|
105
|
+
const handler = (list) => {
|
|
106
|
+
list.forEach((item) => {
|
|
107
|
+
if (showProxyCall || !item.isCallBeacon && !item.isCallImpl) {
|
|
108
|
+
result.push(item);
|
|
109
|
+
}
|
|
110
|
+
if (item.calls) {
|
|
111
|
+
handler(item.calls);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
handler(data);
|
|
116
|
+
return result;
|
|
117
|
+
};
|
|
118
|
+
var hideProxyCallInTreeTrace = (data) => {
|
|
119
|
+
const handler = (list) => {
|
|
120
|
+
const result = [];
|
|
121
|
+
list.forEach((item) => {
|
|
122
|
+
const newTrace = { ...item };
|
|
123
|
+
if (!newTrace.isCallBeacon && !newTrace.isCallImpl) {
|
|
124
|
+
result.push(newTrace);
|
|
125
|
+
if (newTrace.calls) {
|
|
126
|
+
newTrace.calls = handler(newTrace.calls);
|
|
127
|
+
}
|
|
128
|
+
} else if (newTrace.calls) {
|
|
129
|
+
result.push(...handler(newTrace.calls));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return result;
|
|
133
|
+
};
|
|
134
|
+
return handler(data);
|
|
135
|
+
};
|
|
136
|
+
var useTxTrace = (hash, space, {
|
|
137
|
+
isAATx = false
|
|
138
|
+
} = {}) => {
|
|
139
|
+
const url = `/transferTree/${hash}${isAATx ? "?txType=aa" : ""}`;
|
|
140
|
+
return useSWRImmutable(
|
|
141
|
+
[url, space],
|
|
142
|
+
() => fetchWithPrefix(url).then((resp) => {
|
|
143
|
+
if (resp?.traceTree) {
|
|
144
|
+
const { list, total } = formatTraceData(resp, space);
|
|
145
|
+
return { list, total };
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export {
|
|
152
|
+
isDelegateCall,
|
|
153
|
+
isStaticCall,
|
|
154
|
+
isCreateCall,
|
|
155
|
+
treeTraceToList,
|
|
156
|
+
hideProxyCallInTreeTrace,
|
|
157
|
+
useTxTrace
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=chunk-6JLI3Y4J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/hooks/useTxTrace.ts"],"sourcesContent":["import useSWRImmutable from 'swr/immutable';\nimport { fetchWithPrefix } from '../request';\nimport type { AbiFunctionWithoutGas } from '../sdk';\nimport { formatABI } from '..';\nimport { formatAddress } from '../address';\nimport { AddressNameMap, Pocket } from '../request.types';\nimport BigNumber from 'bignumber.js';\n\nexport const isDelegateCall = (callType?: string) =>\n callType && callType.toLowerCase() === 'delegatecall';\nexport const isStaticCall = (callType?: string) =>\n callType && callType.toLowerCase() === 'staticcall';\nexport const isCreateCall = (callType?: string) =>\n callType &&\n (callType.toLowerCase() === 'create' || callType.toLowerCase() === 'create2');\n\nexport interface TraceAction {\n createType: string;\n callType: string;\n from: string;\n to?: string;\n input?: `0x${string}`;\n value: string;\n gas?: string;\n space: string;\n\n // ↓↓↓↓↓↓↓↓ only for core space ↓↓↓↓↓↓↓↓\n fromPocket?: Pocket;\n toPocket?: Pocket;\n fromSpace?: 'evm' | 'none' | 'native';\n toSpace?: 'evm' | 'none' | 'native';\n}\nexport interface TraceResult {\n addr?: string;\n gasLeft: string;\n outcome: 'success' | 'fail' | 'reverted';\n returnData: `0x${string}`;\n}\n\nexport interface OriginTreeTrace {\n calls: OriginTreeTrace[];\n action: TraceAction;\n result?: TraceResult;\n blockHash: string;\n epochHash: string;\n epochNumber: number;\n transactionHash: string;\n transactionPosition: number;\n type: string;\n valid: boolean;\n // added by frontend\n isCallImpl?: boolean;\n}\n\nexport type ProxyType = 'BeaconProxy' | 'Proxy';\n\nexport interface OriginTraceData {\n addressArray: string[];\n authMap?: Record<string, string>;\n proxyMap?: Record<string, ProxyType>;\n methodMap?: Record<string, Record<string, string>>;\n nameMap?: Record<string, AddressNameMap>;\n traceTree: OriginTreeTrace[];\n}\n\nexport interface ListTraceForUI {\n index: string;\n type: string;\n from: string;\n to?: string;\n value: string;\n input?: `0x${string}`;\n gasUsed?: string;\n outcome?: 'success' | 'fail' | 'reverted';\n output?: `0x${string}`;\n gas?: string;\n isProxyCall?: boolean;\n method?: string;\n contractCreated?: string;\n abi?: AbiFunctionWithoutGas[];\n nameMap: Record<string, AddressNameMap>;\n proxy?: {\n type: ProxyType;\n beaconAddress?: string;\n implAddress: string;\n };\n isCallBeacon?: boolean;\n isCallImpl?: boolean;\n // only for evm space ↓↓↓↓↓↓↓↓\n delegatedTo?: string;\n // only for core space ↓↓↓↓↓↓↓↓\n fromPocket?: Pocket;\n toPocket?: Pocket;\n}\n\nexport interface TreeTraceForUI extends ListTraceForUI {\n calls?: TreeTraceForUI[];\n}\n\nconst formatTraceData = (data: OriginTraceData, space: 'evm' | 'core') => {\n const addressType = space === 'core' ? 'base32' : 'hex';\n const proxyMap = data.proxyMap || {};\n const methodMap = data.methodMap || {};\n const nameMap = data.nameMap || {};\n const authMap = data.authMap || {};\n\n let total = 0;\n\n const formatList = (\n t: OriginTreeTrace[],\n parent?: TreeTraceForUI,\n ): TreeTraceForUI[] => {\n total += t.length;\n return t.map((item, index) => formatItem(item, index, parent, t));\n };\n const formatItem = (\n t: OriginTreeTrace,\n index: number,\n parent: TreeTraceForUI | undefined,\n list: OriginTreeTrace[],\n ): TreeTraceForUI => {\n const methodId = t.action.input?.slice(0, 10);\n const from = formatAddress(t.action.from, addressType);\n const to = formatAddress(t.action.to, addressType);\n const delegatedTo = to && authMap[to];\n let method = methodId;\n let abi: AbiFunctionWithoutGas[] | undefined = undefined;\n const methodABI =\n methodId && (delegatedTo || to)\n ? methodMap[methodId]?.[delegatedTo || to]\n : undefined;\n if (methodABI) {\n try {\n const result = formatABI(`[\"${methodABI}\"]`, {\n json: true,\n allowEmpty: true,\n });\n abi = JSON.parse(result) as AbiFunctionWithoutGas[];\n const jsonABI = abi[0];\n method = jsonABI?.name || methodId;\n } catch (error) {\n console.log('parse method abi error: ', methodABI, error);\n }\n }\n\n const isContractCreated = !!t.action.createType;\n\n const item: TreeTraceForUI = {\n index: `${parent?.index ? `${parent.index}_` : ''}${index}`,\n type: `${t.action.callType || t.type}`,\n from: from,\n to: to,\n input: t.action.input,\n value: t.action.value,\n outcome: t.result?.outcome,\n output: t.result?.returnData,\n gas: t.action.gas,\n method,\n abi,\n contractCreated: isContractCreated ? t.result?.addr : undefined,\n nameMap,\n delegatedTo,\n isCallImpl: t.isCallImpl,\n fromPocket: t.action.fromPocket,\n toPocket: t.action.toPocket,\n };\n if (item.gas && t.result?.gasLeft) {\n const gasBn = new BigNumber(item.gas);\n item.gasUsed = gasBn.minus(t.result.gasLeft).toString();\n }\n if (\n parent &&\n parent.to &&\n proxyMap[parent.to] &&\n from === parent.to &&\n to\n ) {\n // proxy call\n if (\n index === 0 &&\n proxyMap[parent.to] === 'Proxy' &&\n isDelegateCall(t.action.callType)\n ) {\n parent.proxy = {\n type: 'Proxy',\n implAddress: to,\n };\n item.isCallImpl = true;\n }\n // beacon proxy call\n const second = list[1];\n if (\n index === 0 &&\n proxyMap[parent.to] === 'BeaconProxy' &&\n isStaticCall(t.action.callType) &&\n second &&\n second.action.to &&\n second.action.from === parent.to &&\n isDelegateCall(second.action.callType)\n ) {\n parent.proxy = {\n type: 'BeaconProxy',\n beaconAddress: to,\n implAddress: second.action.to,\n };\n item.isCallBeacon = true;\n second.isCallImpl = true;\n }\n }\n if (t.calls) {\n item.calls = formatList(t.calls, item);\n }\n return item;\n };\n const list = formatList(data.traceTree);\n return {\n total,\n list,\n };\n};\n\nexport const treeTraceToList = (\n data: TreeTraceForUI[],\n showProxyCall = false,\n) => {\n const result: ListTraceForUI[] = [];\n const handler = (list: TreeTraceForUI[]) => {\n list.forEach(item => {\n if (showProxyCall || (!item.isCallBeacon && !item.isCallImpl)) {\n result.push(item);\n }\n if (item.calls) {\n handler(item.calls);\n }\n });\n };\n handler(data);\n return result;\n};\n\nexport const hideProxyCallInTreeTrace = (data: TreeTraceForUI[]) => {\n const handler = (list: TreeTraceForUI[]) => {\n const result: TreeTraceForUI[] = [];\n list.forEach(item => {\n const newTrace = { ...item };\n if (!newTrace.isCallBeacon && !newTrace.isCallImpl) {\n result.push(newTrace);\n if (newTrace.calls) {\n newTrace.calls = handler(newTrace.calls);\n }\n } else if (newTrace.calls) {\n result.push(...handler(newTrace.calls));\n }\n });\n return result;\n };\n return handler(data);\n};\n\nexport const useTxTrace = (\n hash: string,\n space: 'evm' | 'core',\n {\n isAATx = false,\n }: {\n isAATx?: boolean;\n } = {},\n) => {\n const url = `/transferTree/${hash}${isAATx ? '?txType=aa' : ''}`;\n\n return useSWRImmutable([url, space], () =>\n fetchWithPrefix<OriginTraceData>(url).then(resp => {\n if (resp?.traceTree) {\n const { list, total } = formatTraceData(resp, space);\n return { list, total };\n }\n }),\n );\n};\n"],"mappings":"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","names":["list"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/components/ContractAbi/FuncResponse.tsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
var FuncResponse = ({ name }) => {
|
|
4
|
+
return /* @__PURE__ */ jsxs("div", { className: "my-12px text-14px lh-18px font-500 text-#97a3b4", children: [
|
|
5
|
+
"[ ",
|
|
6
|
+
/* @__PURE__ */ jsx("strong", { children: name }),
|
|
7
|
+
" method response ]"
|
|
8
|
+
] });
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
FuncResponse
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=chunk-6JXQS4XH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ContractAbi/FuncResponse.tsx"],"sourcesContent":["/**\n *\n * FuncResponse Component\n *\n */\n\ninterface Props {\n name: string;\n}\n\nexport const FuncResponse = ({ name }: Props) => {\n return (\n <div className=\"my-12px text-14px lh-18px font-500 text-#97a3b4\">\n [ <strong>{name}</strong> method response ]\n </div>\n );\n};\n"],"mappings":";AAYI,SACI,KADJ;AAFG,IAAM,eAAe,CAAC,EAAE,KAAK,MAAa;AAC/C,SACE,qBAAC,SAAI,WAAU,mDAAkD;AAAA;AAAA,IAC7D,oBAAC,YAAQ,gBAAK;AAAA,IAAS;AAAA,KAC3B;AAEJ;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
convertCheckSum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4QR5LKPG.js";
|
|
4
4
|
import {
|
|
5
5
|
Text
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CWTDFCRF.js";
|
|
7
7
|
import {
|
|
8
8
|
getTranslations
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L4AFJGXJ.js";
|
|
10
10
|
|
|
11
11
|
// src/components/AddressContainer/addressView.tsx
|
|
12
12
|
import { Translation } from "react-i18next";
|
|
@@ -143,4 +143,4 @@ var RenderAddress = ({
|
|
|
143
143
|
export {
|
|
144
144
|
RenderAddress
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-7BAN6GKP.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/components/ContractAbi/OutputParams.tsx
|
|
2
|
+
import { Fragment } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var OutputParams = ({ outputs }) => {
|
|
5
|
+
const count = outputs ? outputs.length : 0;
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", { className: "my-8px", children: [
|
|
7
|
+
/* @__PURE__ */ jsx("span", { className: "text-14px text-#002257 lh-22px", children: "Return:" }),
|
|
8
|
+
/* @__PURE__ */ jsx("span", { className: "inline-block ml-8px text-#97a3b4 lh-22px text-14px", children: outputs?.map((value, index) => {
|
|
9
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
11
|
+
value.name,
|
|
12
|
+
" ",
|
|
13
|
+
/* @__PURE__ */ jsxs("i", { children: [
|
|
14
|
+
"(",
|
|
15
|
+
value.type,
|
|
16
|
+
")"
|
|
17
|
+
] })
|
|
18
|
+
] }),
|
|
19
|
+
index !== count - 1 && /* @__PURE__ */ jsx("span", { children: ", " })
|
|
20
|
+
] }, index);
|
|
21
|
+
}) })
|
|
22
|
+
] });
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
OutputParams
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-7HK6APFZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ContractAbi/OutputParams.tsx"],"sourcesContent":["/**\n *\n * OutputParams Component\n *\n */\nimport { Fragment } from 'react';\ninterface Props {\n outputs?: {\n name?: string;\n type?: string;\n }[];\n}\n\nexport const OutputParams = ({ outputs }: Props) => {\n const count = outputs ? outputs.length : 0;\n return (\n <div className=\"my-8px\">\n <span className=\"text-14px text-#002257 lh-22px\">Return:</span>\n <span className=\"inline-block ml-8px text-#97a3b4 lh-22px text-14px\">\n {outputs?.map((value, index) => {\n return (\n <Fragment key={index}>\n <span>\n {value.name} <i>({value.type})</i>\n </span>\n {index !== count - 1 && <span>, </span>}\n </Fragment>\n );\n })}\n </span>\n </div>\n );\n};\n"],"mappings":";AAKA,SAAS,gBAAgB;AAYnB,cAMuB,YANvB;AAJC,IAAM,eAAe,CAAC,EAAE,QAAQ,MAAa;AAClD,QAAM,QAAQ,UAAU,QAAQ,SAAS;AACzC,SACE,qBAAC,SAAI,WAAU,UACb;AAAA,wBAAC,UAAK,WAAU,kCAAiC,qBAAO;AAAA,IACxD,oBAAC,UAAK,WAAU,sDACb,mBAAS,IAAI,CAAC,OAAO,UAAU;AAC9B,aACE,qBAAC,YACC;AAAA,6BAAC,UACE;AAAA,gBAAM;AAAA,UAAK;AAAA,UAAC,qBAAC,OAAE;AAAA;AAAA,YAAE,MAAM;AAAA,YAAK;AAAA,aAAC;AAAA,WAChC;AAAA,QACC,UAAU,QAAQ,KAAK,oBAAC,UAAK,gBAAE;AAAA,WAJnB,KAKf;AAAA,IAEJ,CAAC,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-BMO4IZHV.js";
|
|
30
30
|
import {
|
|
31
31
|
cn
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-D6INJ4N5.js";
|
|
33
33
|
|
|
34
34
|
// src/components/Popover/index.tsx
|
|
35
35
|
import { useRef } from "react";
|
|
@@ -2146,4 +2146,4 @@ focus-trap/dist/focus-trap.esm.js:
|
|
|
2146
2146
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2147
2147
|
*)
|
|
2148
2148
|
*/
|
|
2149
|
-
//# sourceMappingURL=chunk-
|
|
2149
|
+
//# sourceMappingURL=chunk-7NVZPYT3.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
convertBigNumbersToStrings,
|
|
3
|
+
convertObjBigNumbersToStrings,
|
|
4
|
+
fromCfxToDrip
|
|
5
|
+
} from "./chunk-D6INJ4N5.js";
|
|
6
|
+
|
|
7
|
+
// src/components/ContractAbi/utils.ts
|
|
8
|
+
import JSONBigint from "json-bigint";
|
|
9
|
+
var formatValuesToArgs = (values, hasValue, forJSSDK = true) => {
|
|
10
|
+
const newValues = JSONBigint.parse(
|
|
11
|
+
JSONBigint.stringify(
|
|
12
|
+
values,
|
|
13
|
+
(key, value) => value === void 0 ? { type: "string", val: "" } : value["type"] === "tuple" ? {
|
|
14
|
+
type: "string",
|
|
15
|
+
val: convertObjBigNumbersToStrings(
|
|
16
|
+
JSONBigint.parse(value["val"])
|
|
17
|
+
)
|
|
18
|
+
} : /u?int[\d]{2,3}\[/.test(value["type"]) ? {
|
|
19
|
+
type: "string",
|
|
20
|
+
val: convertObjBigNumbersToStrings(
|
|
21
|
+
JSONBigint.parse(value["val"])
|
|
22
|
+
)
|
|
23
|
+
} : value
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
const items = Object.values(newValues);
|
|
27
|
+
const objValues = [];
|
|
28
|
+
items.forEach(function(value, index) {
|
|
29
|
+
let val = value["val"];
|
|
30
|
+
if (value["type"] === "bool") {
|
|
31
|
+
if (val === "true" || val === "1") {
|
|
32
|
+
value["val"] = true;
|
|
33
|
+
} else if (val === "false" || val === "0") {
|
|
34
|
+
value["val"] = false;
|
|
35
|
+
}
|
|
36
|
+
} else if (value["type"].startsWith("tuple")) {
|
|
37
|
+
value["val"] = JSON.parse(value["val"]);
|
|
38
|
+
} else if (value["type"].endsWith("]")) {
|
|
39
|
+
value["val"] = Array.from(JSON.parse(value["val"]));
|
|
40
|
+
} else if (value["type"].startsWith("byte") && forJSSDK) {
|
|
41
|
+
value["val"] = Buffer.from(value["val"].substr(2), "hex");
|
|
42
|
+
}
|
|
43
|
+
objValues.push(value["val"]);
|
|
44
|
+
});
|
|
45
|
+
const args = convertBigNumbersToStrings(objValues);
|
|
46
|
+
if (hasValue) {
|
|
47
|
+
return {
|
|
48
|
+
args: args.slice(1),
|
|
49
|
+
value: `0x${fromCfxToDrip(args[0]).toString(16)}`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
args
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
formatValuesToArgs
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=chunk-A3VDKIWS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ContractAbi/utils.ts"],"sourcesContent":["import JSONBigint from 'json-bigint';\nimport {\n convertBigNumbersToStrings,\n convertObjBigNumbersToStrings,\n fromCfxToDrip,\n} from 'src/utils';\n\ninterface ParsedValue {\n type: string;\n val: unknown;\n}\n\nexport const formatValuesToArgs = (\n values: Record<string, unknown>,\n hasValue: boolean,\n forJSSDK = true,\n) => {\n // {type: 'string', val: ''} Only string has no set check, it can be '', undefined is an unfilled string,See getValidator type === 'string'.\n const newValues: Record<string, ParsedValue> = JSONBigint.parse(\n JSONBigint.stringify(values, (key, value) =>\n value === undefined\n ? { type: 'string', val: '' }\n : value['type'] === 'tuple'\n ? {\n type: 'string',\n val: convertObjBigNumbersToStrings(\n JSONBigint.parse(value['val']),\n ),\n }\n : /u?int[\\d]{2,3}\\[/.test(value['type'])\n ? {\n type: 'string',\n val: convertObjBigNumbersToStrings(\n JSONBigint.parse(value['val']),\n ),\n }\n : value,\n ),\n );\n const items = Object.values(newValues);\n const objValues: any[] = [];\n // Special convert for various types before call sdk\n items.forEach(function (value, index) {\n let val = value['val'];\n if (value['type'] === 'bool') {\n if (val === 'true' || val === '1') {\n value['val'] = true;\n } else if (val === 'false' || val === '0') {\n value['val'] = false;\n }\n } else if (value['type'].startsWith('tuple')) {\n value['val'] = JSON.parse(value['val'] as string);\n } else if (value['type'].endsWith(']')) {\n // array: convert to array\n value['val'] = Array.from(JSON.parse(value['val'] as string));\n // jssdk need buffer type\n } else if (value['type'].startsWith('byte') && forJSSDK) {\n value['val'] = Buffer.from((value['val'] as string).substr(2), 'hex');\n }\n objValues.push(value['val']);\n });\n\n const args = convertBigNumbersToStrings(objValues);\n // change cfx input to value in payable function\n if (hasValue) {\n return {\n args: args.slice(1),\n value: `0x${fromCfxToDrip(args[0]).toString(16)}`,\n };\n }\n\n return {\n args,\n };\n};\n"],"mappings":";;;;;;;AAAA,OAAO,gBAAgB;AAYhB,IAAM,qBAAqB,CAChC,QACA,UACA,WAAW,SACR;AAEH,QAAM,YAAyC,WAAW;AAAA,IACxD,WAAW;AAAA,MAAU;AAAA,MAAQ,CAAC,KAAK,UACjC,UAAU,SACN,EAAE,MAAM,UAAU,KAAK,GAAG,IAC1B,MAAM,MAAM,MAAM,UAChB;AAAA,QACE,MAAM;AAAA,QACN,KAAK;AAAA,UACH,WAAW,MAAM,MAAM,KAAK,CAAC;AAAA,QAC/B;AAAA,MACF,IACA,mBAAmB,KAAK,MAAM,MAAM,CAAC,IACnC;AAAA,QACE,MAAM;AAAA,QACN,KAAK;AAAA,UACH,WAAW,MAAM,MAAM,KAAK,CAAC;AAAA,QAC/B;AAAA,MACF,IACA;AAAA,IACV;AAAA,EACF;AACA,QAAM,QAAQ,OAAO,OAAO,SAAS;AACrC,QAAM,YAAmB,CAAC;AAE1B,QAAM,QAAQ,SAAU,OAAO,OAAO;AACpC,QAAI,MAAM,MAAM,KAAK;AACrB,QAAI,MAAM,MAAM,MAAM,QAAQ;AAC5B,UAAI,QAAQ,UAAU,QAAQ,KAAK;AACjC,cAAM,KAAK,IAAI;AAAA,MACjB,WAAW,QAAQ,WAAW,QAAQ,KAAK;AACzC,cAAM,KAAK,IAAI;AAAA,MACjB;AAAA,IACF,WAAW,MAAM,MAAM,EAAE,WAAW,OAAO,GAAG;AAC5C,YAAM,KAAK,IAAI,KAAK,MAAM,MAAM,KAAK,CAAW;AAAA,IAClD,WAAW,MAAM,MAAM,EAAE,SAAS,GAAG,GAAG;AAEtC,YAAM,KAAK,IAAI,MAAM,KAAK,KAAK,MAAM,MAAM,KAAK,CAAW,CAAC;AAAA,IAE9D,WAAW,MAAM,MAAM,EAAE,WAAW,MAAM,KAAK,UAAU;AACvD,YAAM,KAAK,IAAI,OAAO,KAAM,MAAM,KAAK,EAAa,OAAO,CAAC,GAAG,KAAK;AAAA,IACtE;AACA,cAAU,KAAK,MAAM,KAAK,CAAC;AAAA,EAC7B,CAAC;AAED,QAAM,OAAO,2BAA2B,SAAS;AAEjD,MAAI,UAAU;AACZ,WAAO;AAAA,MACL,MAAM,KAAK,MAAM,CAAC;AAAA,MAClB,OAAO,KAAK,cAAc,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE;AAAA,IAChD;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,EACF;AACF;","names":[]}
|