@cfxjs/sirius-next-common 0.2.11 → 0.2.13

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.
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-XZ7IV2FF.js";
4
4
  import {
5
5
  TraceDetail
6
- } from "./chunk-YDA7DDMQ.js";
6
+ } from "./chunk-E67IKDZ4.js";
7
7
 
8
8
  // src/components/TransactionTrace/TreeTraceTable.tsx
9
9
  import { useMemo } from "react";
@@ -79,4 +79,4 @@ var TreeTraceTable = ({
79
79
  export {
80
80
  TreeTraceTable
81
81
  };
82
- //# sourceMappingURL=chunk-735VMABS.js.map
82
+ //# sourceMappingURL=chunk-2FMNW46L.js.map
@@ -41,7 +41,7 @@ var ErrorDecode = ({
41
41
  children: "Error:"
42
42
  }
43
43
  ),
44
- /* @__PURE__ */ jsx(Original, { data: errorData })
44
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(Original, { data: errorData }) })
45
45
  ] });
46
46
  return /* @__PURE__ */ jsxs(Fragment, { children: [
47
47
  /* @__PURE__ */ jsxs("div", { className: "flex min-h-32px", children: [
@@ -76,4 +76,4 @@ var ErrorDecode = ({
76
76
  export {
77
77
  ErrorDecode
78
78
  };
79
- //# sourceMappingURL=chunk-AKMGJWIM.js.map
79
+ //# sourceMappingURL=chunk-6HJCR6PQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/OutputData/ErrorDecode.tsx"],"sourcesContent":["import { cn } from 'src/utils';\nimport { useDecodeFunctionError } from 'src/utils/hooks/useDecodeFunctionError';\nimport { Original } from '../InputData/Original';\nimport { DecodedParameters } from '../InputData/OptimizationDecode';\nimport { FunctionName } from '../InputData/FunctionName';\n\nexport const ErrorDecode = ({\n to,\n errorData,\n space,\n labelClassName,\n proxy,\n}: {\n errorData: `0x${string}`;\n to?: string;\n space: 'evm' | 'core';\n labelClassName?: string;\n proxy?: {\n beaconAddress?: string;\n implAddress: string;\n };\n}) => {\n const [decodedError, isLoading] = useDecodeFunctionError({\n to,\n implementation: proxy?.implAddress,\n errorData,\n space,\n });\n\n if (\n isLoading ||\n !decodedError ||\n !decodedError.abiItem ||\n decodedError.abiItem.type !== 'error'\n )\n return (\n <div className=\"flex min-h-32px\">\n <div\n className={cn(\n 'w-100px shrink-0 grow-0 text-14px lh-18px pt-6px text-#6a737d',\n labelClassName,\n )}\n >\n Error:\n </div>\n <div className=\"flex-1\">\n <Original data={errorData} />\n </div>\n </div>\n );\n return (\n <>\n <div className=\"flex min-h-32px\">\n <div\n className={cn(\n 'w-100px shrink-0 grow-0 text-14px lh-18px text-#6a737d pt-1px',\n labelClassName,\n )}\n >\n Error:{' '}\n </div>\n <div>\n <FunctionName abiItem={decodedError.abiItem}></FunctionName>\n </div>\n </div>\n {decodedError.args && decodedError.args.length > 0 && (\n <DecodedParameters\n args={decodedError.args}\n params={decodedError.abiItem.inputs}\n label=\"Parameters:\"\n labelClassName={labelClassName}\n space={space}\n />\n )}\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAoCM,SAeF,UAdI,KADF;AA9BC,IAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MASM;AACJ,QAAM,CAAC,cAAc,SAAS,IAAI,uBAAuB;AAAA,IACvD;AAAA,IACA,gBAAgB,OAAO;AAAA,IACvB;AAAA,IACA;AAAA,EACF,CAAC;AAED,MACE,aACA,CAAC,gBACD,CAAC,aAAa,WACd,aAAa,QAAQ,SAAS;AAE9B,WACE,qBAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACD;AAAA;AAAA,MAED;AAAA,MACA,oBAAC,SAAI,WAAU,UACb,8BAAC,YAAS,MAAM,WAAW,GAC7B;AAAA,OACF;AAEJ,SACE,iCACE;AAAA,yBAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACD;AAAA;AAAA,YACQ;AAAA;AAAA;AAAA,MACT;AAAA,MACA,oBAAC,SACC,8BAAC,gBAAa,SAAS,aAAa,SAAS,GAC/C;AAAA,OACF;AAAA,IACC,aAAa,QAAQ,aAAa,KAAK,SAAS,KAC/C;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,aAAa;AAAA,QACnB,QAAQ,aAAa,QAAQ;AAAA,QAC7B,OAAM;AAAA,QACN;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;","names":[]}
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-YIZCD4WG.js";
10
10
  import {
11
11
  OutputData
12
- } from "./chunk-7CBOXGGA.js";
12
+ } from "./chunk-GFY6G6I2.js";
13
13
  import {
14
14
  InputData
15
15
  } from "./chunk-NXCZ5PMI.js";
@@ -183,4 +183,4 @@ var TraceDetail = (props) => {
183
183
  export {
184
184
  TraceDetail
185
185
  };
186
- //# sourceMappingURL=chunk-YDA7DDMQ.js.map
186
+ //# sourceMappingURL=chunk-E67IKDZ4.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ErrorDecode
3
- } from "./chunk-AKMGJWIM.js";
3
+ } from "./chunk-6HJCR6PQ.js";
4
4
  import {
5
5
  GeneralDecode
6
6
  } from "./chunk-OYESIV3F.js";
@@ -35,13 +35,7 @@ var OutputData = ({
35
35
  if (!success)
36
36
  return /* @__PURE__ */ jsx(Original, { data: output });
37
37
  if (decodedData) {
38
- return /* @__PURE__ */ jsx(
39
- GeneralDecode,
40
- {
41
- data: output,
42
- fullName: decodedData.fullName
43
- }
44
- );
38
+ return /* @__PURE__ */ jsx(GeneralDecode, { data: output, includeMethodID: false });
45
39
  }
46
40
  } else if (dataType === "optimizationDecode") {
47
41
  if (!success) {
@@ -75,4 +69,4 @@ var OutputData = ({
75
69
  export {
76
70
  OutputData
77
71
  };
78
- //# sourceMappingURL=chunk-7CBOXGGA.js.map
72
+ //# sourceMappingURL=chunk-GFY6G6I2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/OutputData/index.tsx"],"sourcesContent":["import { DataType } from 'src/utils/hooks/useDecodedDataType';\nimport { DecodedFunctionData } from 'src/utils/hooks/useDecodeFunctionData';\nimport { ErrorDecode } from './ErrorDecode';\nimport { Original } from '../InputData/Original';\nimport { UTF8 } from '../InputData/UTF8';\nimport { GeneralDecode } from '../InputData/GeneralDecode';\nimport { DecodedParameters } from '../InputData/OptimizationDecode';\n\nexport const OutputData = ({\n decodedData,\n dataType,\n output,\n to,\n space,\n success,\n proxy,\n labelClassName,\n}: {\n decodedData?: DecodedFunctionData;\n dataType: DataType;\n output?: `0x${string}`;\n space: 'evm' | 'core';\n to?: string;\n labelClassName?: string;\n success?: boolean;\n proxy?: {\n beaconAddress?: string;\n implAddress: string;\n };\n}) => {\n const isReturnDataEmpty = !output || output === '0x';\n if (isReturnDataEmpty) return null;\n if (dataType === 'utf8') {\n return <UTF8 data={output}></UTF8>;\n } else if (dataType === 'generalDecode') {\n if (!success) return <Original data={output}></Original>;\n if (decodedData) {\n return (\n <GeneralDecode data={output} includeMethodID={false}></GeneralDecode>\n );\n }\n } else if (dataType === 'optimizationDecode') {\n if (!success) {\n return (\n <ErrorDecode\n to={to}\n space={space}\n errorData={output}\n proxy={proxy}\n labelClassName={labelClassName}\n ></ErrorDecode>\n );\n }\n if (decodedData) {\n return (\n <DecodedParameters\n args={decodedData.decodedResults}\n params={decodedData.abiItem?.outputs ?? []}\n label=\"Return:\"\n labelClassName={labelClassName}\n space={space}\n />\n );\n }\n }\n return <Original data={output}></Original>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCW;AAzBJ,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAYM;AACJ,QAAM,oBAAoB,CAAC,UAAU,WAAW;AAChD,MAAI;AAAmB,WAAO;AAC9B,MAAI,aAAa,QAAQ;AACvB,WAAO,oBAAC,QAAK,MAAM,QAAQ;AAAA,EAC7B,WAAW,aAAa,iBAAiB;AACvC,QAAI,CAAC;AAAS,aAAO,oBAAC,YAAS,MAAM,QAAQ;AAC7C,QAAI,aAAa;AACf,aACE,oBAAC,iBAAc,MAAM,QAAQ,iBAAiB,OAAO;AAAA,IAEzD;AAAA,EACF,WAAW,aAAa,sBAAsB;AAC5C,QAAI,CAAC,SAAS;AACZ,aACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,WAAW;AAAA,UACX;AAAA,UACA;AAAA;AAAA,MACD;AAAA,IAEL;AACA,QAAI,aAAa;AACf,aACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,YAAY;AAAA,UAClB,QAAQ,YAAY,SAAS,WAAW,CAAC;AAAA,UACzC,OAAM;AAAA,UACN;AAAA,UACA;AAAA;AAAA,MACF;AAAA,IAEJ;AAAA,EACF;AACA,SAAO,oBAAC,YAAS,MAAM,QAAQ;AACjC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ErrorDecode
3
- } from "../../chunk-AKMGJWIM.js";
3
+ } from "../../chunk-6HJCR6PQ.js";
4
4
  import "../../chunk-K6FHTS3F.js";
5
5
  import "../../chunk-6SXAFSBF.js";
6
6
  import "../../chunk-JIRLY7OG.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  OutputData
3
- } from "../../chunk-7CBOXGGA.js";
4
- import "../../chunk-AKMGJWIM.js";
3
+ } from "../../chunk-GFY6G6I2.js";
4
+ import "../../chunk-6HJCR6PQ.js";
5
5
  import "../../chunk-K6FHTS3F.js";
6
6
  import "../../chunk-6SXAFSBF.js";
7
7
  import "../../chunk-JIRLY7OG.js";
@@ -97,7 +97,7 @@ var ProxyContractAddress = (props) => {
97
97
  "a",
98
98
  {
99
99
  className: cn(
100
- "block relative align-bottom cursor-pointer truncate max-w-190px",
100
+ "block relative align-bottom cursor-pointer truncate max-w-220px",
101
101
  className
102
102
  ),
103
103
  href: `/address/${address}`,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ProxyContractAddress/index.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\nimport { getTranslations } from 'src/store';\nimport { isInnerContractAddress } from 'src/utils/address';\nimport { Tooltip } from '../Tooltip';\nimport InternalContractIcon from '../../images/internal-contract-icon.png';\nimport ContractIcon from '../../images/contract-icon.png';\nimport VerifiedIcon from '../../images/verified.png';\nimport { shortenAddress } from '@cfx-kit/dapp-utils/dist/address';\nimport { cn } from 'src/utils';\nimport { ProxyType } from 'src/utils/hooks/useTxTrace';\nimport { useAddressLabel } from 'src/utils/hooks/useAddressLabel';\n\nexport const ProxyContractAddress = (props: {\n address: string;\n alias?: string;\n isFull?: boolean;\n verify?: boolean;\n showIcon?: boolean;\n showAddressLabel?: boolean;\n proxy: {\n type: ProxyType;\n implAddress: string;\n beaconAddress?: string;\n };\n style?: React.CSSProperties;\n className?: string;\n}) => {\n const {\n showIcon = true,\n showAddressLabel = true,\n verify,\n address,\n alias,\n isFull = false,\n proxy,\n className,\n style,\n } = props;\n\n const { t } = useTranslation();\n const translations = getTranslations();\n const addressLabel = useAddressLabel(address, showAddressLabel);\n const text =\n addressLabel || alias || (isFull ? address : shortenAddress(address));\n\n const isInnerContract = address && isInnerContractAddress(address);\n\n const typeText = t(\n isInnerContract\n ? translations.general.internalContract\n : verify\n ? translations.general.verifiedContract\n : translations.general.unverifiedContract,\n );\n\n return (\n <div className=\"inline-flex\">\n {showIcon && (\n <div className={`mr-[2px] flex-shrink-0`}>\n <Tooltip title={typeText}>\n <div className=\"relative w-[16px] h-[16px]\">\n {isInnerContract ? (\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={InternalContractIcon}\n alt={typeText}\n />\n ) : (\n <>\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={ContractIcon}\n alt={typeText}\n />\n {verify ? (\n <img\n className=\"w-[8px] h-[8px] absolute bottom-[-1px] right-[1px]\"\n src={VerifiedIcon}\n alt={''}\n />\n ) : (\n <></>\n )}\n </>\n )}\n </div>\n </Tooltip>\n </div>\n )}\n <Tooltip\n title={\n <div className=\"flex flex-col gap-5px\">\n <div>\n {proxy.type}: {address}\n </div>\n {proxy.beaconAddress && <div>Beacon: {proxy.beaconAddress}</div>}\n <div>Impl: {proxy.implAddress}</div>\n </div>\n }\n containerClassName=\"max-w-unset\"\n >\n <a\n className={cn(\n 'block relative align-bottom cursor-pointer truncate max-w-190px',\n className,\n )}\n href={`/address/${address}`}\n style={style}\n >\n {text}({proxy.type})\n </a>\n </Tooltip>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,sBAAsB;AAI/B,OAAO,0BAA0B;AACjC,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,SAAS,sBAAsB;AAuDf,SAmBI,UAnBJ,KAMA,YANA;AAlDT,IAAM,uBAAuB,CAAC,UAc/B;AACJ,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,EAAE,IAAI,eAAe;AAC7B,QAAM,eAAe,gBAAgB;AACrC,QAAM,eAAe,gBAAgB,SAAS,gBAAgB;AAC9D,QAAM,OACJ,gBAAgB,UAAU,SAAS,UAAU,eAAe,OAAO;AAErE,QAAM,kBAAkB,WAAW,uBAAuB,OAAO;AAEjE,QAAM,WAAW;AAAA,IACf,kBACI,aAAa,QAAQ,mBACrB,SACE,aAAa,QAAQ,mBACrB,aAAa,QAAQ;AAAA,EAC7B;AAEA,SACE,qBAAC,SAAI,WAAU,eACZ;AAAA,gBACC,oBAAC,SAAI,WAAW,0BACd,8BAAC,WAAQ,OAAO,UACd,8BAAC,SAAI,WAAU,8BACZ,4BACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,KAAK;AAAA,QACL,KAAK;AAAA;AAAA,IACP,IAEA,iCACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,KAAK;AAAA,UACL,KAAK;AAAA;AAAA,MACP;AAAA,MACC,SACC;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,KAAK;AAAA,UACL,KAAK;AAAA;AAAA,MACP,IAEA,gCAAE;AAAA,OAEN,GAEJ,GACF,GACF;AAAA,IAEF;AAAA,MAAC;AAAA;AAAA,QACC,OACE,qBAAC,SAAI,WAAU,yBACb;AAAA,+BAAC,SACE;AAAA,kBAAM;AAAA,YAAK;AAAA,YAAG;AAAA,aACjB;AAAA,UACC,MAAM,iBAAiB,qBAAC,SAAI;AAAA;AAAA,YAAS,MAAM;AAAA,aAAc;AAAA,UAC1D,qBAAC,SAAI;AAAA;AAAA,YAAO,MAAM;AAAA,aAAY;AAAA,WAChC;AAAA,QAEF,oBAAmB;AAAA,QAEnB;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA;AAAA,YACF;AAAA,YACA,MAAM,YAAY;AAAA,YAClB;AAAA,YAEC;AAAA;AAAA,cAAK;AAAA,cAAE,MAAM;AAAA,cAAK;AAAA;AAAA;AAAA,QACrB;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/ProxyContractAddress/index.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\nimport { getTranslations } from 'src/store';\nimport { isInnerContractAddress } from 'src/utils/address';\nimport { Tooltip } from '../Tooltip';\nimport InternalContractIcon from '../../images/internal-contract-icon.png';\nimport ContractIcon from '../../images/contract-icon.png';\nimport VerifiedIcon from '../../images/verified.png';\nimport { shortenAddress } from '@cfx-kit/dapp-utils/dist/address';\nimport { cn } from 'src/utils';\nimport { ProxyType } from 'src/utils/hooks/useTxTrace';\nimport { useAddressLabel } from 'src/utils/hooks/useAddressLabel';\n\nexport const ProxyContractAddress = (props: {\n address: string;\n alias?: string;\n isFull?: boolean;\n verify?: boolean;\n showIcon?: boolean;\n showAddressLabel?: boolean;\n proxy: {\n type: ProxyType;\n implAddress: string;\n beaconAddress?: string;\n };\n style?: React.CSSProperties;\n className?: string;\n}) => {\n const {\n showIcon = true,\n showAddressLabel = true,\n verify,\n address,\n alias,\n isFull = false,\n proxy,\n className,\n style,\n } = props;\n\n const { t } = useTranslation();\n const translations = getTranslations();\n const addressLabel = useAddressLabel(address, showAddressLabel);\n const text =\n addressLabel || alias || (isFull ? address : shortenAddress(address));\n\n const isInnerContract = address && isInnerContractAddress(address);\n\n const typeText = t(\n isInnerContract\n ? translations.general.internalContract\n : verify\n ? translations.general.verifiedContract\n : translations.general.unverifiedContract,\n );\n\n return (\n <div className=\"inline-flex\">\n {showIcon && (\n <div className={`mr-[2px] flex-shrink-0`}>\n <Tooltip title={typeText}>\n <div className=\"relative w-[16px] h-[16px]\">\n {isInnerContract ? (\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={InternalContractIcon}\n alt={typeText}\n />\n ) : (\n <>\n <img\n className=\"w-[16px] h-[16px] align-bottom mb-[5px]\"\n src={ContractIcon}\n alt={typeText}\n />\n {verify ? (\n <img\n className=\"w-[8px] h-[8px] absolute bottom-[-1px] right-[1px]\"\n src={VerifiedIcon}\n alt={''}\n />\n ) : (\n <></>\n )}\n </>\n )}\n </div>\n </Tooltip>\n </div>\n )}\n <Tooltip\n title={\n <div className=\"flex flex-col gap-5px\">\n <div>\n {proxy.type}: {address}\n </div>\n {proxy.beaconAddress && <div>Beacon: {proxy.beaconAddress}</div>}\n <div>Impl: {proxy.implAddress}</div>\n </div>\n }\n containerClassName=\"max-w-unset\"\n >\n <a\n className={cn(\n 'block relative align-bottom cursor-pointer truncate max-w-220px',\n className,\n )}\n href={`/address/${address}`}\n style={style}\n >\n {text}({proxy.type})\n </a>\n </Tooltip>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,sBAAsB;AAI/B,OAAO,0BAA0B;AACjC,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,SAAS,sBAAsB;AAuDf,SAmBI,UAnBJ,KAMA,YANA;AAlDT,IAAM,uBAAuB,CAAC,UAc/B;AACJ,QAAM;AAAA,IACJ,WAAW;AAAA,IACX,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,EAAE,EAAE,IAAI,eAAe;AAC7B,QAAM,eAAe,gBAAgB;AACrC,QAAM,eAAe,gBAAgB,SAAS,gBAAgB;AAC9D,QAAM,OACJ,gBAAgB,UAAU,SAAS,UAAU,eAAe,OAAO;AAErE,QAAM,kBAAkB,WAAW,uBAAuB,OAAO;AAEjE,QAAM,WAAW;AAAA,IACf,kBACI,aAAa,QAAQ,mBACrB,SACE,aAAa,QAAQ,mBACrB,aAAa,QAAQ;AAAA,EAC7B;AAEA,SACE,qBAAC,SAAI,WAAU,eACZ;AAAA,gBACC,oBAAC,SAAI,WAAW,0BACd,8BAAC,WAAQ,OAAO,UACd,8BAAC,SAAI,WAAU,8BACZ,4BACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,KAAK;AAAA,QACL,KAAK;AAAA;AAAA,IACP,IAEA,iCACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,KAAK;AAAA,UACL,KAAK;AAAA;AAAA,MACP;AAAA,MACC,SACC;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,KAAK;AAAA,UACL,KAAK;AAAA;AAAA,MACP,IAEA,gCAAE;AAAA,OAEN,GAEJ,GACF,GACF;AAAA,IAEF;AAAA,MAAC;AAAA;AAAA,QACC,OACE,qBAAC,SAAI,WAAU,yBACb;AAAA,+BAAC,SACE;AAAA,kBAAM;AAAA,YAAK;AAAA,YAAG;AAAA,aACjB;AAAA,UACC,MAAM,iBAAiB,qBAAC,SAAI;AAAA;AAAA,YAAS,MAAM;AAAA,aAAc;AAAA,UAC1D,qBAAC,SAAI;AAAA;AAAA,YAAO,MAAM;AAAA,aAAY;AAAA,WAChC;AAAA,QAEF,oBAAmB;AAAA,QAEnB;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA;AAAA,YACF;AAAA,YACA,MAAM,YAAY;AAAA,YAClB;AAAA,YAEC;AAAA;AAAA,cAAK;AAAA,cAAE,MAAM;AAAA,cAAK;AAAA;AAAA;AAAA,QACrB;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":[]}
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  TraceDetail
3
- } from "../../chunk-YDA7DDMQ.js";
3
+ } from "../../chunk-E67IKDZ4.js";
4
4
  import "../../chunk-UM5J477V.js";
5
5
  import "../../chunk-EERNUGUK.js";
6
6
  import "../../chunk-E3ZD2GGG.js";
7
7
  import "../../chunk-YIZCD4WG.js";
8
8
  import "../../chunk-EMPFZFBS.js";
9
9
  import "../../chunk-NWVSTRCG.js";
10
- import "../../chunk-7CBOXGGA.js";
11
- import "../../chunk-AKMGJWIM.js";
10
+ import "../../chunk-GFY6G6I2.js";
11
+ import "../../chunk-6HJCR6PQ.js";
12
12
  import "../../chunk-K6FHTS3F.js";
13
13
  import "../../chunk-6SXAFSBF.js";
14
14
  import "../../chunk-JIRLY7OG.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  TreeTraceTable
3
- } from "../../chunk-735VMABS.js";
3
+ } from "../../chunk-2FMNW46L.js";
4
4
  import "../../chunk-XZ7IV2FF.js";
5
- import "../../chunk-YDA7DDMQ.js";
5
+ import "../../chunk-E67IKDZ4.js";
6
6
  import "../../chunk-UM5J477V.js";
7
7
  import "../../chunk-EERNUGUK.js";
8
8
  import "../../chunk-E3ZD2GGG.js";
9
9
  import "../../chunk-YIZCD4WG.js";
10
10
  import "../../chunk-EMPFZFBS.js";
11
11
  import "../../chunk-NWVSTRCG.js";
12
- import "../../chunk-7CBOXGGA.js";
13
- import "../../chunk-AKMGJWIM.js";
12
+ import "../../chunk-GFY6G6I2.js";
13
+ import "../../chunk-6HJCR6PQ.js";
14
14
  import "../../chunk-K6FHTS3F.js";
15
15
  import "../../chunk-6SXAFSBF.js";
16
16
  import "../../chunk-JIRLY7OG.js";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  TreeTraceTable
3
- } from "../../chunk-735VMABS.js";
3
+ } from "../../chunk-2FMNW46L.js";
4
4
  import "../../chunk-XZ7IV2FF.js";
5
5
  import {
6
6
  TraceDetail
7
- } from "../../chunk-YDA7DDMQ.js";
7
+ } from "../../chunk-E67IKDZ4.js";
8
8
  import "../../chunk-UM5J477V.js";
9
9
  import "../../chunk-EERNUGUK.js";
10
10
  import "../../chunk-E3ZD2GGG.js";
11
11
  import "../../chunk-YIZCD4WG.js";
12
12
  import "../../chunk-EMPFZFBS.js";
13
13
  import "../../chunk-NWVSTRCG.js";
14
- import "../../chunk-7CBOXGGA.js";
15
- import "../../chunk-AKMGJWIM.js";
14
+ import "../../chunk-GFY6G6I2.js";
15
+ import "../../chunk-6HJCR6PQ.js";
16
16
  import "../../chunk-K6FHTS3F.js";
17
17
  import "../../chunk-6SXAFSBF.js";
18
18
  import "../../chunk-JIRLY7OG.js";
package/dist/uno.css CHANGED
@@ -176,8 +176,8 @@
176
176
  .max-w-100\%,
177
177
  .max-w-full{max-width:100%;}
178
178
  .max-w-1368px{max-width:1368px;}
179
- .max-w-190px{max-width:190px;}
180
179
  .max-w-192px{max-width:192px;}
180
+ .max-w-220px{max-width:220px;}
181
181
  .max-w-260px{max-width:260px;}
182
182
  .max-w-320px{max-width:320px;}
183
183
  .max-w-fit{max-width:fit-content;}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfxjs/sirius-next-common",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/**"
@@ -78,8 +78,8 @@
78
78
  "typescript": "^5.4.2",
79
79
  "unocss": "0.58.6",
80
80
  "vitest": "3.2.3",
81
- "@cfxjs/sirius-next-eslint-config": "0.0.0",
82
81
  "@cfxjs/sirius-next-i18n": "0.2.9",
82
+ "@cfxjs/sirius-next-eslint-config": "0.0.0",
83
83
  "@cfxjs/sirius-next-typescript-config": "0.0.0"
84
84
  },
85
85
  "publishConfig": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/OutputData/index.tsx"],"sourcesContent":["import { DataType } from 'src/utils/hooks/useDecodedDataType';\nimport { DecodedFunctionData } from 'src/utils/hooks/useDecodeFunctionData';\nimport { ErrorDecode } from './ErrorDecode';\nimport { Original } from '../InputData/Original';\nimport { UTF8 } from '../InputData/UTF8';\nimport { GeneralDecode } from '../InputData/GeneralDecode';\nimport { DecodedParameters } from '../InputData/OptimizationDecode';\n\nexport const OutputData = ({\n decodedData,\n dataType,\n output,\n to,\n space,\n success,\n proxy,\n labelClassName,\n}: {\n decodedData?: DecodedFunctionData;\n dataType: DataType;\n output?: `0x${string}`;\n space: 'evm' | 'core';\n to?: string;\n labelClassName?: string;\n success?: boolean;\n proxy?: {\n beaconAddress?: string;\n implAddress: string;\n };\n}) => {\n const isReturnDataEmpty = !output || output === '0x';\n if (isReturnDataEmpty) return null;\n if (dataType === 'utf8') {\n return <UTF8 data={output}></UTF8>;\n } else if (dataType === 'generalDecode') {\n if (!success) return <Original data={output}></Original>;\n if (decodedData) {\n return (\n <GeneralDecode\n data={output}\n fullName={decodedData.fullName}\n ></GeneralDecode>\n );\n }\n } else if (dataType === 'optimizationDecode') {\n if (!success) {\n return (\n <ErrorDecode\n to={to}\n space={space}\n errorData={output}\n proxy={proxy}\n labelClassName={labelClassName}\n ></ErrorDecode>\n );\n }\n if (decodedData) {\n return (\n <DecodedParameters\n args={decodedData.decodedResults}\n params={decodedData.abiItem?.outputs ?? []}\n label=\"Return:\"\n labelClassName={labelClassName}\n space={space}\n />\n );\n }\n }\n return <Original data={output}></Original>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAiCW;AAzBJ,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAYM;AACJ,QAAM,oBAAoB,CAAC,UAAU,WAAW;AAChD,MAAI;AAAmB,WAAO;AAC9B,MAAI,aAAa,QAAQ;AACvB,WAAO,oBAAC,QAAK,MAAM,QAAQ;AAAA,EAC7B,WAAW,aAAa,iBAAiB;AACvC,QAAI,CAAC;AAAS,aAAO,oBAAC,YAAS,MAAM,QAAQ;AAC7C,QAAI,aAAa;AACf,aACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,UAAU,YAAY;AAAA;AAAA,MACvB;AAAA,IAEL;AAAA,EACF,WAAW,aAAa,sBAAsB;AAC5C,QAAI,CAAC,SAAS;AACZ,aACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA,WAAW;AAAA,UACX;AAAA,UACA;AAAA;AAAA,MACD;AAAA,IAEL;AACA,QAAI,aAAa;AACf,aACE;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,YAAY;AAAA,UAClB,QAAQ,YAAY,SAAS,WAAW,CAAC;AAAA,UACzC,OAAM;AAAA,UACN;AAAA,UACA;AAAA;AAAA,MACF;AAAA,IAEJ;AAAA,EACF;AACA,SAAO,oBAAC,YAAS,MAAM,QAAQ;AACjC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/OutputData/ErrorDecode.tsx"],"sourcesContent":["import { cn } from 'src/utils';\nimport { useDecodeFunctionError } from 'src/utils/hooks/useDecodeFunctionError';\nimport { Original } from '../InputData/Original';\nimport { DecodedParameters } from '../InputData/OptimizationDecode';\nimport { FunctionName } from '../InputData/FunctionName';\n\nexport const ErrorDecode = ({\n to,\n errorData,\n space,\n labelClassName,\n proxy,\n}: {\n errorData: `0x${string}`;\n to?: string;\n space: 'evm' | 'core';\n labelClassName?: string;\n proxy?: {\n beaconAddress?: string;\n implAddress: string;\n };\n}) => {\n const [decodedError, isLoading] = useDecodeFunctionError({\n to,\n implementation: proxy?.implAddress,\n errorData,\n space,\n });\n\n if (\n isLoading ||\n !decodedError ||\n !decodedError.abiItem ||\n decodedError.abiItem.type !== 'error'\n )\n return (\n <div className=\"flex min-h-32px\">\n <div\n className={cn(\n 'w-100px shrink-0 grow-0 text-14px lh-18px pt-6px text-#6a737d',\n labelClassName,\n )}\n >\n Error:\n </div>\n <Original data={errorData} />\n </div>\n );\n return (\n <>\n <div className=\"flex min-h-32px\">\n <div\n className={cn(\n 'w-100px shrink-0 grow-0 text-14px lh-18px text-#6a737d pt-1px',\n labelClassName,\n )}\n >\n Error:{' '}\n </div>\n <div>\n <FunctionName abiItem={decodedError.abiItem}></FunctionName>\n </div>\n </div>\n {decodedError.args && decodedError.args.length > 0 && (\n <DecodedParameters\n args={decodedError.args}\n params={decodedError.abiItem.inputs}\n label=\"Parameters:\"\n labelClassName={labelClassName}\n space={space}\n />\n )}\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAoCM,SAaF,UAZI,KADF;AA9BC,IAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MASM;AACJ,QAAM,CAAC,cAAc,SAAS,IAAI,uBAAuB;AAAA,IACvD;AAAA,IACA,gBAAgB,OAAO;AAAA,IACvB;AAAA,IACA;AAAA,EACF,CAAC;AAED,MACE,aACA,CAAC,gBACD,CAAC,aAAa,WACd,aAAa,QAAQ,SAAS;AAE9B,WACE,qBAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACD;AAAA;AAAA,MAED;AAAA,MACA,oBAAC,YAAS,MAAM,WAAW;AAAA,OAC7B;AAEJ,SACE,iCACE;AAAA,yBAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA,UACD;AAAA;AAAA,YACQ;AAAA;AAAA;AAAA,MACT;AAAA,MACA,oBAAC,SACC,8BAAC,gBAAa,SAAS,aAAa,SAAS,GAC/C;AAAA,OACF;AAAA,IACC,aAAa,QAAQ,aAAa,KAAK,SAAS,KAC/C;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,aAAa;AAAA,QACnB,QAAQ,aAAa,QAAQ;AAAA,QAC7B,OAAM;AAAA,QACN;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;","names":[]}