@cfxjs/sirius-next-common 0.2.20 → 0.2.21-fix-error-publish
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-CMOP3BKX.js → chunk-225VMTCA.js} +3 -3
- package/dist/{chunk-LCIBOT5P.js → chunk-3JIAKQ23.js} +2 -2
- package/dist/{chunk-C7OIVXE3.js → chunk-4B7BV62E.js} +3 -3
- package/dist/chunk-4BS66NNM.js +29 -0
- package/dist/chunk-4BS66NNM.js.map +1 -0
- package/dist/{chunk-J6ZC77OY.js → chunk-4M53GHPD.js} +6 -6
- package/dist/{chunk-GHHUAWSG.js → chunk-524EB4WC.js} +3 -3
- package/dist/chunk-5AM5HM3B.js +10 -0
- package/dist/chunk-5AM5HM3B.js.map +1 -0
- package/dist/{chunk-XZL5CZFT.js → chunk-5MJZWIYI.js} +4 -4
- package/dist/chunk-6C5NQACS.js +202 -0
- package/dist/chunk-6C5NQACS.js.map +1 -0
- package/dist/{chunk-H5ZJBRIK.js → chunk-6PKWA444.js} +4 -4
- package/dist/{chunk-4LSM4TMM.js → chunk-734CQOS7.js} +3 -3
- package/dist/chunk-7RLNWQIR.js +192 -0
- package/dist/chunk-7RLNWQIR.js.map +1 -0
- package/dist/{chunk-RUU22F7R.js → chunk-7VFOHX3W.js} +2 -2
- package/dist/{chunk-BEI5TWJL.js → chunk-7WDLTRBN.js} +2 -2
- package/dist/{chunk-AYCHKB2Y.js → chunk-A3IT7RYO.js} +2 -2
- package/dist/{chunk-UF5BN4QN.js → chunk-A3VPSWVX.js} +2 -2
- package/dist/chunk-A46LVI25.js +82 -0
- package/dist/chunk-A46LVI25.js.map +1 -0
- package/dist/chunk-A6B5V6XY.js +140 -0
- package/dist/chunk-A6B5V6XY.js.map +1 -0
- package/dist/{chunk-ELF2EOGF.js → chunk-AQFNXW4W.js} +2 -2
- package/dist/chunk-ASS6TOFE.js +72 -0
- package/dist/chunk-ASS6TOFE.js.map +1 -0
- package/dist/{chunk-NM3BMITL.js → chunk-B5JCHBO3.js} +2 -2
- package/dist/{chunk-DCQANK66.js → chunk-BGNBKP5R.js} +2 -2
- package/dist/{chunk-6L4ZEJQI.js → chunk-BN3ATGHU.js} +2 -2
- package/dist/chunk-C6GUZVQ2.js +130 -0
- package/dist/chunk-C6GUZVQ2.js.map +1 -0
- package/dist/chunk-CNXGYDZG.js +146 -0
- package/dist/chunk-CNXGYDZG.js.map +1 -0
- package/dist/chunk-DASMAZXS.js +71 -0
- package/dist/{chunk-LCV3NUFR.js → chunk-DO6PJAZB.js} +5 -5
- package/dist/chunk-E7FB4S3X.js +276 -0
- package/dist/chunk-E7FB4S3X.js.map +1 -0
- package/dist/{chunk-BHAXBHVC.js → chunk-EHRGH3HS.js} +4 -4
- package/dist/chunk-EOSVUB2G.js +51 -0
- package/dist/chunk-EOSVUB2G.js.map +1 -0
- package/dist/chunk-FGPRA3A4.js +80 -0
- package/dist/chunk-FGPRA3A4.js.map +1 -0
- package/dist/{chunk-UZALXR3J.js → chunk-FJMV3UA7.js} +4 -4
- package/dist/{chunk-YVV32ON3.js → chunk-FSYB23NA.js} +2 -2
- package/dist/{chunk-XUKHHB5L.js → chunk-FTAFV6RE.js} +5 -5
- package/dist/chunk-FW5ON36S.js +212 -0
- package/dist/chunk-FW5ON36S.js.map +1 -0
- package/dist/chunk-HCEXWKMZ.js +90 -0
- package/dist/chunk-HCEXWKMZ.js.map +1 -0
- package/dist/chunk-HW5VD7EO.js +17 -0
- package/dist/chunk-HW5VD7EO.js.map +1 -0
- package/dist/{chunk-GQRCW7WX.js → chunk-J536GL5G.js} +2 -2
- package/dist/{chunk-DYNSSHD5.js → chunk-J7UQ2R3H.js} +7 -7
- package/dist/{chunk-YEAWH772.js → chunk-JBCKAHH7.js} +2 -2
- package/dist/{chunk-7VQL3G7K.js → chunk-JKFT4JUY.js} +4 -4
- package/dist/chunk-L7RD6ZPE.js +534 -0
- package/dist/chunk-L7RD6ZPE.js.map +1 -0
- package/dist/{chunk-W64AF7LA.js → chunk-MFCMTOYM.js} +5 -5
- package/dist/chunk-MQY7EQPG.js +284 -0
- package/dist/chunk-MQY7EQPG.js.map +1 -0
- package/dist/chunk-MWSXXVVL.js +157 -0
- package/dist/chunk-MWSXXVVL.js.map +1 -0
- package/dist/chunk-O6BP54O6.js +63 -0
- package/dist/chunk-O6BP54O6.js.map +1 -0
- package/dist/chunk-OFAM2QTT.js +17 -0
- package/dist/chunk-OFAM2QTT.js.map +1 -0
- package/dist/{chunk-2WEBXRNL.js → chunk-OSPPP5W5.js} +2 -2
- package/dist/chunk-OT252GGM.js +66 -0
- package/dist/chunk-OT252GGM.js.map +1 -0
- package/dist/{chunk-WZIT54AU.js → chunk-OTSNM4CR.js} +2 -2
- package/dist/chunk-OTSNM4CR.js.map +1 -0
- package/dist/chunk-QX7AGYA5.js +2149 -0
- package/dist/chunk-QX7AGYA5.js.map +1 -0
- package/dist/chunk-R62HRSIY.js +145 -0
- package/dist/chunk-R62HRSIY.js.map +1 -0
- package/dist/{chunk-OT7NZ4PK.js → chunk-RLA5XZT2.js} +3 -3
- package/dist/chunk-RLA5XZT2.js.map +1 -0
- package/dist/{chunk-HF7RD7UD.js → chunk-RWTNG7SM.js} +2 -2
- package/dist/chunk-SIZYE6WH.js +3616 -0
- package/dist/chunk-SIZYE6WH.js.map +1 -0
- package/dist/chunk-SNUPCZY7.js +812 -0
- package/dist/chunk-SNUPCZY7.js.map +1 -0
- package/dist/{chunk-VGYNHJFT.js → chunk-SYWQ2T57.js} +8 -7
- package/dist/chunk-SYWQ2T57.js.map +1 -0
- package/dist/chunk-TGWQSVFC.js +26 -0
- package/dist/chunk-TGWQSVFC.js.map +1 -0
- package/dist/chunk-UVRMLFMC.js +21 -0
- package/dist/chunk-UVRMLFMC.js.map +1 -0
- package/dist/chunk-UX6IRX2M.js +146 -0
- package/dist/chunk-UX6IRX2M.js.map +1 -0
- package/dist/chunk-VD73ULXJ.js +107 -0
- package/dist/chunk-VD73ULXJ.js.map +1 -0
- package/dist/chunk-VEK5DLFI.js +23 -0
- package/dist/chunk-VEK5DLFI.js.map +1 -0
- package/dist/chunk-VTHVXZOP.js +112 -0
- package/dist/chunk-VTHVXZOP.js.map +1 -0
- package/dist/chunk-WY3RJ3A6.js +51 -0
- package/dist/chunk-XI5WO2NW.js +37 -0
- package/dist/chunk-XI5WO2NW.js.map +1 -0
- package/dist/{chunk-C6CGZ6KN.js → chunk-YOCMEOLX.js} +2 -2
- package/dist/chunk-YOVNVFY2.js +105 -0
- package/dist/chunk-YOVNVFY2.js.map +1 -0
- package/dist/{chunk-7AVQOIDM.js → chunk-Z64Z5HLJ.js} +2 -2
- package/dist/components/AAFailedReason/index.d.ts +11 -0
- package/dist/components/AAFailedReason/index.js +41 -0
- package/dist/components/AAFailedReason/index.js.map +1 -0
- package/dist/components/AceEditor/index.js +4 -4
- package/dist/components/AddressContainer/CoreAddressContainer.js +10 -10
- package/dist/components/AddressContainer/EVMAddressContainer.js +9 -9
- package/dist/components/AddressContainer/addressSwitcher.js +7 -7
- package/dist/components/AddressContainer/addressView.js +6 -6
- package/dist/components/AddressContainer/label.js +3 -3
- package/dist/components/AddressContainer/utils.js +3 -3
- package/dist/components/Age/index.js +4 -4
- package/dist/components/AutoComplete/index.js +3 -3
- package/dist/components/Charts/PreviewChartTemplate.js +1 -1
- package/dist/components/Charts/StockChartTemplate.js +1 -1
- package/dist/components/CopyButton/index.js +3 -3
- package/dist/components/DecimalsSelect/index.js +3 -3
- package/dist/components/DownloadCSV/index.js +4 -4
- package/dist/components/GasPriceDropdown/index.js +2 -2
- package/dist/components/IncreasePercent/index.js +2 -2
- package/dist/components/InfoIconWithTooltip/index.js +4 -4
- package/dist/components/InputData/AddressLabel.js +8 -8
- package/dist/components/InputData/ContractDetail.js +3 -3
- package/dist/components/InputData/JsonDecode.js +5 -5
- package/dist/components/InputData/OptimizationDecode.js +10 -10
- package/dist/components/InputData/UTF8.js +3 -3
- package/dist/components/InputData/index.js +14 -14
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/NetworkIcon/index.js +2 -2
- package/dist/components/OutputData/ErrorDecode.js +13 -13
- package/dist/components/OutputData/index.js +15 -15
- package/dist/components/PhishingAddressContainer/index.js +4 -4
- package/dist/components/Popover/index.js +3 -3
- package/dist/components/Price/index.js +3 -3
- package/dist/components/ProxyContractAddress/index.js +6 -6
- package/dist/components/Radio/index.js +2 -2
- package/dist/components/SearchInput/index.js +4 -4
- package/dist/components/Select/index.js +4 -4
- package/dist/components/Select/select.js +3 -3
- package/dist/components/SmartAccountAddress/index.d.ts +11 -0
- package/dist/components/SmartAccountAddress/index.js +94 -0
- package/dist/components/SmartAccountAddress/index.js.map +1 -0
- package/dist/components/Text/index.js +4 -4
- package/dist/components/Tooltip/index.js +3 -3
- package/dist/components/TransactionAction/coreTransactionAction.js +23 -18
- package/dist/components/TransactionAction/coreTransactionAction.js.map +1 -1
- package/dist/components/TransactionAction/evmTransactionAction.js +22 -17
- package/dist/components/TransactionAction/evmTransactionAction.js.map +1 -1
- package/dist/components/TransactionTrace/TraceDetail.js +23 -23
- package/dist/components/TransactionTrace/TreeTraceTable.js +24 -24
- package/dist/components/TransactionTrace/index.js +24 -24
- package/dist/utils/address.js +2 -2
- package/dist/utils/contractManagerTool.js +2 -2
- package/dist/utils/hooks/useAddressLabel.js +3 -3
- package/dist/utils/hooks/useAddressNameMap.js +2 -2
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js +2 -2
- package/dist/utils/hooks/useContractDetail.js +2 -2
- package/dist/utils/hooks/useDecodeFunctionData.js +5 -5
- package/dist/utils/hooks/useDecodeFunctionError.js +3 -3
- package/dist/utils/hooks/useENS.js +3 -3
- package/dist/utils/hooks/useEnhanceDataWithNameMap.js +2 -2
- package/dist/utils/hooks/useMethodAbi.js +2 -2
- package/dist/utils/hooks/useTableData.js +1 -1
- package/dist/utils/hooks/useTxTrace.js +3 -3
- package/dist/utils/index.js +2 -2
- package/dist/utils/request.d.ts +1 -0
- package/dist/utils/request.js +1 -1
- package/package.json +17 -17
- package/dist/chunk-VGYNHJFT.js.map +0 -1
- /package/dist/{chunk-CMOP3BKX.js.map → chunk-225VMTCA.js.map} +0 -0
- /package/dist/{chunk-LCIBOT5P.js.map → chunk-3JIAKQ23.js.map} +0 -0
- /package/dist/{chunk-C7OIVXE3.js.map → chunk-4B7BV62E.js.map} +0 -0
- /package/dist/{chunk-J6ZC77OY.js.map → chunk-4M53GHPD.js.map} +0 -0
- /package/dist/{chunk-GHHUAWSG.js.map → chunk-524EB4WC.js.map} +0 -0
- /package/dist/{chunk-XZL5CZFT.js.map → chunk-5MJZWIYI.js.map} +0 -0
- /package/dist/{chunk-H5ZJBRIK.js.map → chunk-6PKWA444.js.map} +0 -0
- /package/dist/{chunk-4LSM4TMM.js.map → chunk-734CQOS7.js.map} +0 -0
- /package/dist/{chunk-RUU22F7R.js.map → chunk-7VFOHX3W.js.map} +0 -0
- /package/dist/{chunk-BEI5TWJL.js.map → chunk-7WDLTRBN.js.map} +0 -0
- /package/dist/{chunk-AYCHKB2Y.js.map → chunk-A3IT7RYO.js.map} +0 -0
- /package/dist/{chunk-UF5BN4QN.js.map → chunk-A3VPSWVX.js.map} +0 -0
- /package/dist/{chunk-ELF2EOGF.js.map → chunk-AQFNXW4W.js.map} +0 -0
- /package/dist/{chunk-NM3BMITL.js.map → chunk-B5JCHBO3.js.map} +0 -0
- /package/dist/{chunk-DCQANK66.js.map → chunk-BGNBKP5R.js.map} +0 -0
- /package/dist/{chunk-6L4ZEJQI.js.map → chunk-BN3ATGHU.js.map} +0 -0
- /package/dist/{chunk-OT7NZ4PK.js.map → chunk-DASMAZXS.js.map} +0 -0
- /package/dist/{chunk-LCV3NUFR.js.map → chunk-DO6PJAZB.js.map} +0 -0
- /package/dist/{chunk-BHAXBHVC.js.map → chunk-EHRGH3HS.js.map} +0 -0
- /package/dist/{chunk-UZALXR3J.js.map → chunk-FJMV3UA7.js.map} +0 -0
- /package/dist/{chunk-YVV32ON3.js.map → chunk-FSYB23NA.js.map} +0 -0
- /package/dist/{chunk-XUKHHB5L.js.map → chunk-FTAFV6RE.js.map} +0 -0
- /package/dist/{chunk-GQRCW7WX.js.map → chunk-J536GL5G.js.map} +0 -0
- /package/dist/{chunk-DYNSSHD5.js.map → chunk-J7UQ2R3H.js.map} +0 -0
- /package/dist/{chunk-YEAWH772.js.map → chunk-JBCKAHH7.js.map} +0 -0
- /package/dist/{chunk-7VQL3G7K.js.map → chunk-JKFT4JUY.js.map} +0 -0
- /package/dist/{chunk-W64AF7LA.js.map → chunk-MFCMTOYM.js.map} +0 -0
- /package/dist/{chunk-2WEBXRNL.js.map → chunk-OSPPP5W5.js.map} +0 -0
- /package/dist/{chunk-HF7RD7UD.js.map → chunk-RWTNG7SM.js.map} +0 -0
- /package/dist/{chunk-WZIT54AU.js.map → chunk-WY3RJ3A6.js.map} +0 -0
- /package/dist/{chunk-C6CGZ6KN.js.map → chunk-YOCMEOLX.js.map} +0 -0
- /package/dist/{chunk-7AVQOIDM.js.map → chunk-Z64Z5HLJ.js.map} +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useAddressNameMap
|
|
3
|
+
} from "./chunk-4BS66NNM.js";
|
|
4
|
+
import {
|
|
5
|
+
Link
|
|
6
|
+
} from "./chunk-2Y57U43P.js";
|
|
7
|
+
import {
|
|
8
|
+
getAddressNameInfo
|
|
9
|
+
} from "./chunk-OTSNM4CR.js";
|
|
10
|
+
import {
|
|
11
|
+
DefaultTokenIcon
|
|
12
|
+
} from "./chunk-MWAD4CIG.js";
|
|
13
|
+
import {
|
|
14
|
+
formatAddress
|
|
15
|
+
} from "./chunk-MQY7EQPG.js";
|
|
16
|
+
|
|
17
|
+
// src/components/InputData/ContractDetail.tsx
|
|
18
|
+
import clsx from "clsx";
|
|
19
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var Icon = ({ icon, className }) => {
|
|
21
|
+
return icon ? /* @__PURE__ */ jsx(
|
|
22
|
+
"img",
|
|
23
|
+
{
|
|
24
|
+
src: icon,
|
|
25
|
+
alt: "icon",
|
|
26
|
+
className: clsx("w-1.1429rem mr-2px mb-3px", className)
|
|
27
|
+
}
|
|
28
|
+
) : /* @__PURE__ */ jsx(
|
|
29
|
+
DefaultTokenIcon,
|
|
30
|
+
{
|
|
31
|
+
className: clsx("w-1.1429rem mr-2px mb-3px", className)
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
var ContractDetail = ({ address, addressType }) => {
|
|
36
|
+
const { data: nameMap } = useAddressNameMap([address]);
|
|
37
|
+
const nameInfo = getAddressNameInfo(address, nameMap);
|
|
38
|
+
if (nameInfo) {
|
|
39
|
+
const {
|
|
40
|
+
tokenName,
|
|
41
|
+
tokenSymbol,
|
|
42
|
+
tokenIconUrl,
|
|
43
|
+
contractName,
|
|
44
|
+
verificationName
|
|
45
|
+
} = nameInfo;
|
|
46
|
+
let child = null;
|
|
47
|
+
if (tokenName || tokenSymbol) {
|
|
48
|
+
const name = tokenName || "--";
|
|
49
|
+
const symbol = `(${tokenSymbol ? tokenSymbol : "--"})`;
|
|
50
|
+
const icon = tokenIconUrl;
|
|
51
|
+
child = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Icon, { icon }),
|
|
53
|
+
/* @__PURE__ */ jsxs(Link, { href: `/token/${formatAddress(address, addressType)}`, children: [
|
|
54
|
+
name,
|
|
55
|
+
" ",
|
|
56
|
+
symbol
|
|
57
|
+
] }),
|
|
58
|
+
" "
|
|
59
|
+
] });
|
|
60
|
+
} else if (contractName || verificationName) {
|
|
61
|
+
const name = contractName || verificationName;
|
|
62
|
+
const icon = tokenIconUrl;
|
|
63
|
+
child = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64
|
+
/* @__PURE__ */ jsx(Icon, { icon }),
|
|
65
|
+
/* @__PURE__ */ jsx(Link, { href: `/address/${formatAddress(address, addressType)}`, children: name }),
|
|
66
|
+
" "
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
+
" ",
|
|
71
|
+
child
|
|
72
|
+
] });
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
ContractDetail
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=chunk-FGPRA3A4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/InputData/ContractDetail.tsx"],"sourcesContent":["import React from 'react';\nimport { formatAddress } from '../../utils/address';\nimport { Link } from '../Link';\nimport { DefaultTokenIcon } from '../Icons';\nimport clsx from 'clsx';\nimport { useAddressNameMap } from 'src/utils/hooks/useAddressNameMap';\nimport { getAddressNameInfo } from '../AddressContainer/utils';\n\nconst Icon = ({ icon, className }: { icon?: string; className?: string }) => {\n return icon ? (\n <img\n src={icon}\n alt=\"icon\"\n className={clsx('w-1.1429rem mr-2px mb-3px', className)}\n />\n ) : (\n <DefaultTokenIcon\n className={clsx('w-1.1429rem mr-2px mb-3px', className)}\n />\n );\n};\n\ninterface Props {\n address: string;\n addressType: 'hex' | 'base32';\n}\n\nexport const ContractDetail = ({ address, addressType }: Props) => {\n const { data: nameMap } = useAddressNameMap([address]);\n const nameInfo = getAddressNameInfo(address, nameMap);\n if (nameInfo) {\n const {\n tokenName,\n tokenSymbol,\n tokenIconUrl,\n contractName,\n verificationName,\n } = nameInfo;\n let child: React.ReactNode = null;\n\n if (tokenName || tokenSymbol) {\n const name = tokenName || '--';\n const symbol = `(${tokenSymbol ? tokenSymbol : '--'})`;\n const icon = tokenIconUrl;\n\n child = (\n <>\n <Icon icon={icon} />\n <Link href={`/token/${formatAddress(address, addressType)}`}>\n {name} {symbol}\n </Link>{' '}\n </>\n );\n } else if (contractName || verificationName) {\n const name = contractName || verificationName;\n const icon = tokenIconUrl;\n\n child = (\n <>\n <Icon icon={icon} />\n <Link href={`/address/${formatAddress(address, addressType)}`}>\n {name}\n </Link>{' '}\n </>\n );\n }\n\n return <> {child}</>;\n }\n return null;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAIA,OAAO,UAAU;AAMb,SAoCI,UApCJ,KAsCM,YAtCN;AAFJ,IAAM,OAAO,CAAC,EAAE,MAAM,UAAU,MAA6C;AAC3E,SAAO,OACL;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,KAAI;AAAA,MACJ,WAAW,KAAK,6BAA6B,SAAS;AAAA;AAAA,EACxD,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,KAAK,6BAA6B,SAAS;AAAA;AAAA,EACxD;AAEJ;AAOO,IAAM,iBAAiB,CAAC,EAAE,SAAS,YAAY,MAAa;AACjE,QAAM,EAAE,MAAM,QAAQ,IAAI,kBAAkB,CAAC,OAAO,CAAC;AACrD,QAAM,WAAW,mBAAmB,SAAS,OAAO;AACpD,MAAI,UAAU;AACZ,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI;AACJ,QAAI,QAAyB;AAE7B,QAAI,aAAa,aAAa;AAC5B,YAAM,OAAO,aAAa;AAC1B,YAAM,SAAS,IAAI,cAAc,cAAc;AAC/C,YAAM,OAAO;AAEb,cACE,iCACE;AAAA,4BAAC,QAAK,MAAY;AAAA,QAClB,qBAAC,QAAK,MAAM,UAAU,cAAc,SAAS,WAAW,KACrD;AAAA;AAAA,UAAK;AAAA,UAAE;AAAA,WACV;AAAA,QAAQ;AAAA,SACV;AAAA,IAEJ,WAAW,gBAAgB,kBAAkB;AAC3C,YAAM,OAAO,gBAAgB;AAC7B,YAAM,OAAO;AAEb,cACE,iCACE;AAAA,4BAAC,QAAK,MAAY;AAAA,QAClB,oBAAC,QAAK,MAAM,YAAY,cAAc,SAAS,WAAW,KACvD,gBACH;AAAA,QAAQ;AAAA,SACV;AAAA,IAEJ;AAEA,WAAO,iCAAE;AAAA;AAAA,MAAE;AAAA,OAAM;AAAA,EACnB;AACA,SAAO;AACT;","names":[]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ErrorDecode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6PKWA444.js";
|
|
4
4
|
import {
|
|
5
5
|
GeneralDecode
|
|
6
6
|
} from "./chunk-OYESIV3F.js";
|
|
7
7
|
import {
|
|
8
8
|
DecodedParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J7UQ2R3H.js";
|
|
10
10
|
import {
|
|
11
11
|
Original
|
|
12
12
|
} from "./chunk-YBQQ72FQ.js";
|
|
13
13
|
import {
|
|
14
14
|
UTF8
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-A3VPSWVX.js";
|
|
16
16
|
|
|
17
17
|
// src/components/OutputData/index.tsx
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -69,4 +69,4 @@ var OutputData = ({
|
|
|
69
69
|
export {
|
|
70
70
|
OutputData
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-FJMV3UA7.js.map
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-BMO4IZHV.js";
|
|
30
30
|
import {
|
|
31
31
|
cn
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SNUPCZY7.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-FSYB23NA.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAddressNameInfo
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OTSNM4CR.js";
|
|
4
4
|
import {
|
|
5
5
|
ContractAddress,
|
|
6
6
|
ContractCreatedAddress,
|
|
7
7
|
InvalidAddress,
|
|
8
8
|
MyAddress
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FW5ON36S.js";
|
|
10
10
|
import {
|
|
11
11
|
RenderAddress
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UX6IRX2M.js";
|
|
13
13
|
import {
|
|
14
14
|
convertCheckSum,
|
|
15
15
|
formatAddress,
|
|
16
16
|
isEvmAddress,
|
|
17
17
|
isZeroAddress
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MQY7EQPG.js";
|
|
19
19
|
import {
|
|
20
20
|
getTranslations,
|
|
21
21
|
useGlobalData
|
|
@@ -109,4 +109,4 @@ var EVMAddressContainer = withTranslation()(
|
|
|
109
109
|
export {
|
|
110
110
|
EVMAddressContainer
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-FTAFV6RE.js.map
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ContractCreated
|
|
3
|
+
} from "./chunk-MWAD4CIG.js";
|
|
4
|
+
import {
|
|
5
|
+
RenderAddress
|
|
6
|
+
} from "./chunk-UX6IRX2M.js";
|
|
7
|
+
import {
|
|
8
|
+
formatAddress,
|
|
9
|
+
isInnerContractAddress
|
|
10
|
+
} from "./chunk-MQY7EQPG.js";
|
|
11
|
+
import {
|
|
12
|
+
Tooltip
|
|
13
|
+
} from "./chunk-J536GL5G.js";
|
|
14
|
+
import {
|
|
15
|
+
coreCorrespondsToEspace,
|
|
16
|
+
getNetwork
|
|
17
|
+
} from "./chunk-SNUPCZY7.js";
|
|
18
|
+
import {
|
|
19
|
+
getEnvConfig,
|
|
20
|
+
getTranslations,
|
|
21
|
+
useGlobalData
|
|
22
|
+
} from "./chunk-DQGLZCIG.js";
|
|
23
|
+
|
|
24
|
+
// src/components/AddressContainer/addressSwitcher.tsx
|
|
25
|
+
import { AlertTriangle, File } from "@zeit-ui/react-icons";
|
|
26
|
+
import InternalContractIcon from "./internal-contract-icon-ZH2RG3CU.png";
|
|
27
|
+
import ContractIcon from "./contract-icon-P3W2HUAA.png";
|
|
28
|
+
import VerifiedIcon from "./verified-VJRHZNN7.png";
|
|
29
|
+
import isMeIcon from "./me-SIV36SR7.png";
|
|
30
|
+
import { isPosAddress } from "@cfx-kit/dapp-utils/dist/address";
|
|
31
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
32
|
+
var ContractCreatedAddress = (props) => {
|
|
33
|
+
const { contractCreated = "", outputType, t, isFull } = props;
|
|
34
|
+
const translations = getTranslations();
|
|
35
|
+
const contractAddress = formatAddress(contractCreated, outputType);
|
|
36
|
+
const customProps = {
|
|
37
|
+
contractName: t(translations.transaction.contractCreation),
|
|
38
|
+
hrefAddress: contractAddress,
|
|
39
|
+
cfxAddress: contractAddress,
|
|
40
|
+
maxWidth: 160
|
|
41
|
+
};
|
|
42
|
+
const mergedProps = { ...props, ...customProps };
|
|
43
|
+
return RenderAddress({
|
|
44
|
+
...mergedProps,
|
|
45
|
+
prefix: /* @__PURE__ */ jsx("div", { className: `mr-[2px] flex-shrink-0 ${isFull ? "icon" : ""}`, children: /* @__PURE__ */ jsx(Tooltip, { title: mergedProps.contractName, children: /* @__PURE__ */ jsx("div", { className: "relative w-[16px] h-[16px]", children: /* @__PURE__ */ jsx(ContractCreated, { className: "w-[16px] h-[16px] align-bottom mb-[3px]" }) }) }) })
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var CoreHexAddress = (props) => {
|
|
49
|
+
const { value, t, isFull, maxWidth } = props;
|
|
50
|
+
const { globalData } = useGlobalData();
|
|
51
|
+
const ENV_CONFIG = getEnvConfig();
|
|
52
|
+
const translations = getTranslations();
|
|
53
|
+
const hexAddress = formatAddress(value, "hex");
|
|
54
|
+
const network = getNetwork(
|
|
55
|
+
globalData?.networks,
|
|
56
|
+
coreCorrespondsToEspace(ENV_CONFIG.ENV_NETWORK_ID)
|
|
57
|
+
);
|
|
58
|
+
const url = `${network.url}/address/${hexAddress}`;
|
|
59
|
+
return RenderAddress({
|
|
60
|
+
cfxAddress: hexAddress,
|
|
61
|
+
hoverValue: hexAddress,
|
|
62
|
+
link: url,
|
|
63
|
+
isFull,
|
|
64
|
+
maxWidth,
|
|
65
|
+
suffixSize: 0,
|
|
66
|
+
prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: t(translations.general.eSpaceAddress), children: /* @__PURE__ */ jsx(File, { size: 16, color: "#17B38A" }) }) })
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
var InvalidAddress = (props) => {
|
|
70
|
+
const {
|
|
71
|
+
value,
|
|
72
|
+
tokenName,
|
|
73
|
+
contractName,
|
|
74
|
+
verificationName,
|
|
75
|
+
t,
|
|
76
|
+
isFull,
|
|
77
|
+
maxWidth,
|
|
78
|
+
isFullNameTag,
|
|
79
|
+
hideAliasPrefixInHover
|
|
80
|
+
} = props;
|
|
81
|
+
const translations = getTranslations();
|
|
82
|
+
const tip = t(translations.general.invalidAddress);
|
|
83
|
+
return RenderAddress({
|
|
84
|
+
cfxAddress: value,
|
|
85
|
+
contractName,
|
|
86
|
+
tokenName,
|
|
87
|
+
verificationName,
|
|
88
|
+
hoverValue: `${tip}: ${value}`,
|
|
89
|
+
link: false,
|
|
90
|
+
isFull,
|
|
91
|
+
isFullNameTag,
|
|
92
|
+
maxWidth,
|
|
93
|
+
style: { color: "#e00909" },
|
|
94
|
+
prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: tip, children: /* @__PURE__ */ jsx(AlertTriangle, { size: 16, color: "#e00909" }) }) }),
|
|
95
|
+
hideAliasPrefixInHover
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var ContractAddress = (props) => {
|
|
99
|
+
const { showIcon, verify, t, cfxAddress, isFull } = props;
|
|
100
|
+
const translations = getTranslations();
|
|
101
|
+
const isInnerContract = cfxAddress && isInnerContractAddress(cfxAddress);
|
|
102
|
+
const typeText = t(
|
|
103
|
+
isInnerContract ? translations.general.internalContract : verify ? translations.general.verifiedContract : translations.general.unverifiedContract
|
|
104
|
+
);
|
|
105
|
+
return RenderAddress({
|
|
106
|
+
...props,
|
|
107
|
+
prefix: showIcon ? /* @__PURE__ */ jsx("div", { className: `mr-[2px] flex-shrink-0 ${isFull ? "icon" : ""}`, children: /* @__PURE__ */ jsx(Tooltip, { title: typeText, children: /* @__PURE__ */ jsx("div", { className: "relative w-[16px] h-[16px]", children: isInnerContract ? /* @__PURE__ */ jsx(
|
|
108
|
+
"img",
|
|
109
|
+
{
|
|
110
|
+
className: "w-[16px] h-[16px] align-bottom mb-[5px]",
|
|
111
|
+
src: InternalContractIcon,
|
|
112
|
+
alt: typeText
|
|
113
|
+
}
|
|
114
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
115
|
+
/* @__PURE__ */ jsx(
|
|
116
|
+
"img",
|
|
117
|
+
{
|
|
118
|
+
className: "w-[16px] h-[16px] align-bottom mb-[5px]",
|
|
119
|
+
src: ContractIcon,
|
|
120
|
+
alt: typeText
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
verify ? /* @__PURE__ */ jsx(
|
|
124
|
+
"img",
|
|
125
|
+
{
|
|
126
|
+
className: "w-[8px] h-[8px] absolute bottom-[-1px] right-[1px]",
|
|
127
|
+
src: VerifiedIcon,
|
|
128
|
+
alt: ""
|
|
129
|
+
}
|
|
130
|
+
) : /* @__PURE__ */ jsx(Fragment, {})
|
|
131
|
+
] }) }) }) }) : /* @__PURE__ */ jsx(Fragment, {})
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
var MyAddress = (props) => {
|
|
135
|
+
const { isFull } = props;
|
|
136
|
+
return RenderAddress({
|
|
137
|
+
...props,
|
|
138
|
+
suffix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(
|
|
139
|
+
"img",
|
|
140
|
+
{
|
|
141
|
+
className: "w-[38.5px] h-[16px] ml-[3px] align-bottom",
|
|
142
|
+
src: isMeIcon,
|
|
143
|
+
alt: "is me",
|
|
144
|
+
style: {
|
|
145
|
+
marginBottom: isFull ? "6px" : "4px"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
) })
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
var PosAddress = (props) => {
|
|
152
|
+
const {
|
|
153
|
+
tokenName,
|
|
154
|
+
contractName,
|
|
155
|
+
verificationName,
|
|
156
|
+
isFull,
|
|
157
|
+
isFullNameTag,
|
|
158
|
+
maxWidth,
|
|
159
|
+
t,
|
|
160
|
+
link,
|
|
161
|
+
isMe,
|
|
162
|
+
hideAliasPrefixInHover
|
|
163
|
+
} = props;
|
|
164
|
+
const value = props.value;
|
|
165
|
+
if (!value) {
|
|
166
|
+
return /* @__PURE__ */ jsx(Fragment, { children: "--" });
|
|
167
|
+
}
|
|
168
|
+
if (isMe) {
|
|
169
|
+
return MyAddress(props);
|
|
170
|
+
}
|
|
171
|
+
const translations = getTranslations();
|
|
172
|
+
if (!isPosAddress(value)) {
|
|
173
|
+
const tip = t(translations.general.invalidPosAddress);
|
|
174
|
+
return RenderAddress({
|
|
175
|
+
cfxAddress: value,
|
|
176
|
+
tokenName,
|
|
177
|
+
contractName,
|
|
178
|
+
verificationName,
|
|
179
|
+
hoverValue: `${tip}: ${value}`,
|
|
180
|
+
link: false,
|
|
181
|
+
isFull,
|
|
182
|
+
isFullNameTag,
|
|
183
|
+
maxWidth,
|
|
184
|
+
style: { color: "#e00909" },
|
|
185
|
+
prefix: /* @__PURE__ */ jsx("div", { className: "mr-[2px] flex-shrink-0", children: /* @__PURE__ */ jsx(Tooltip, { title: tip, children: /* @__PURE__ */ jsx(AlertTriangle, { size: 16, color: "#e00909" }) }) }),
|
|
186
|
+
type: "pos",
|
|
187
|
+
hideAliasPrefixInHover
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
return RenderAddress({
|
|
191
|
+
cfxAddress: value,
|
|
192
|
+
tokenName,
|
|
193
|
+
contractName,
|
|
194
|
+
verificationName,
|
|
195
|
+
link,
|
|
196
|
+
isFull,
|
|
197
|
+
isFullNameTag,
|
|
198
|
+
maxWidth,
|
|
199
|
+
type: "pos",
|
|
200
|
+
hideAliasPrefixInHover
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export {
|
|
205
|
+
ContractCreatedAddress,
|
|
206
|
+
CoreHexAddress,
|
|
207
|
+
InvalidAddress,
|
|
208
|
+
ContractAddress,
|
|
209
|
+
MyAddress,
|
|
210
|
+
PosAddress
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=chunk-FW5ON36S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/AddressContainer/addressSwitcher.tsx"],"sourcesContent":["import { WithTranslation } from 'react-i18next';\nimport { AlertTriangle, File } from '@zeit-ui/react-icons';\nimport InternalContractIcon from '../../images/internal-contract-icon.png';\nimport ContractIcon from '../../images/contract-icon.png';\nimport VerifiedIcon from '../../images/verified.png';\nimport isMeIcon from '../../images/me.png';\nimport { Tooltip } from '../Tooltip';\nimport { isPosAddress } from '@cfx-kit/dapp-utils/dist/address';\nimport { formatAddress, isInnerContractAddress } from '../../utils/address';\nimport { getTranslations, getEnvConfig, useGlobalData } from '../../store';\nimport { getNetwork, coreCorrespondsToEspace } from 'src/utils';\nimport { Props } from './types';\nimport { RenderAddress } from './addressView';\nimport { ContractCreated } from '../Icons';\n\n// common\nexport const ContractCreatedAddress = (\n props: Props & WithTranslation & { outputType: 'hex' | 'base32' },\n) => {\n const { contractCreated = '', outputType, t, isFull } = props;\n\n const translations = getTranslations();\n\n const contractAddress = formatAddress(contractCreated, outputType);\n\n const customProps = {\n contractName: t(translations.transaction.contractCreation),\n hrefAddress: contractAddress,\n cfxAddress: contractAddress,\n maxWidth: 160,\n };\n\n const mergedProps = { ...props, ...customProps };\n return RenderAddress({\n ...mergedProps,\n prefix: (\n <div className={`mr-[2px] flex-shrink-0 ${isFull ? 'icon' : ''}`}>\n <Tooltip title={mergedProps.contractName}>\n <div className=\"relative w-[16px] h-[16px]\">\n <ContractCreated className=\"w-[16px] h-[16px] align-bottom mb-[3px]\" />\n </div>\n </Tooltip>\n </div>\n ),\n });\n};\n\n// core\nexport const CoreHexAddress = (props: Props & WithTranslation) => {\n const { value, t, isFull, maxWidth } = props;\n const { globalData } = useGlobalData();\n\n const ENV_CONFIG = getEnvConfig();\n const translations = getTranslations();\n const hexAddress = formatAddress(value, 'hex');\n const network = getNetwork(\n globalData?.networks,\n coreCorrespondsToEspace(ENV_CONFIG.ENV_NETWORK_ID),\n );\n const url = `${network.url}/address/${hexAddress}`;\n\n return RenderAddress({\n cfxAddress: hexAddress,\n hoverValue: hexAddress,\n link: url,\n isFull,\n maxWidth,\n suffixSize: 0,\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={t((translations as any).general.eSpaceAddress)}>\n <File size={16} color=\"#17B38A\" />\n </Tooltip>\n </div>\n ),\n });\n};\n\n// common\nexport const InvalidAddress = (props: Props & WithTranslation) => {\n const {\n value,\n tokenName,\n contractName,\n verificationName,\n t,\n isFull,\n maxWidth,\n isFullNameTag,\n hideAliasPrefixInHover,\n } = props;\n\n const translations = getTranslations();\n\n const tip = t(translations.general.invalidAddress);\n\n return RenderAddress({\n cfxAddress: value,\n contractName,\n tokenName,\n verificationName,\n hoverValue: `${tip}: ${value}`,\n link: false,\n isFull,\n isFullNameTag,\n maxWidth,\n style: { color: '#e00909' },\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={tip}>\n <AlertTriangle size={16} color=\"#e00909\" />\n </Tooltip>\n </div>\n ),\n hideAliasPrefixInHover,\n });\n};\n\n// common\nexport const ContractAddress = (props: Props & WithTranslation) => {\n const { showIcon, verify, t, cfxAddress, isFull } = props;\n\n const translations = getTranslations();\n\n const isInnerContract = cfxAddress && isInnerContractAddress(cfxAddress);\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 RenderAddress({\n ...props,\n prefix: showIcon ? (\n <div className={`mr-[2px] flex-shrink-0 ${isFull ? 'icon' : ''}`}>\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 <></>\n ),\n });\n};\n\n// common\nexport const MyAddress = (props: Props & WithTranslation) => {\n const { isFull } = props;\n return RenderAddress({\n ...props,\n suffix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <img\n className=\"w-[38.5px] h-[16px] ml-[3px] align-bottom\"\n src={isMeIcon}\n alt=\"is me\"\n style={{\n marginBottom: isFull ? '6px' : '4px',\n }}\n />\n </div>\n ),\n });\n};\n\n// core\nexport const PosAddress = (props: Props & WithTranslation) => {\n const {\n tokenName,\n contractName,\n verificationName,\n isFull,\n isFullNameTag,\n maxWidth,\n t,\n link,\n isMe,\n hideAliasPrefixInHover,\n } = props;\n const value = props.value;\n if (!value) {\n return <>--</>;\n }\n if (isMe) {\n return MyAddress(props);\n }\n const translations = getTranslations();\n if (!isPosAddress(value)) {\n const tip = t(translations.general.invalidPosAddress);\n return RenderAddress({\n cfxAddress: value,\n tokenName,\n contractName,\n verificationName,\n hoverValue: `${tip}: ${value}`,\n link: false,\n isFull,\n isFullNameTag,\n maxWidth,\n style: { color: '#e00909' },\n prefix: (\n <div className=\"mr-[2px] flex-shrink-0\">\n <Tooltip title={tip}>\n <AlertTriangle size={16} color=\"#e00909\" />\n </Tooltip>\n </div>\n ),\n type: 'pos',\n hideAliasPrefixInHover,\n });\n }\n\n return RenderAddress({\n cfxAddress: value,\n tokenName,\n contractName,\n verificationName,\n link,\n isFull,\n isFullNameTag,\n maxWidth,\n type: 'pos',\n hideAliasPrefixInHover,\n });\n};\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DecodedParameters
|
|
3
|
+
} from "./chunk-MWSXXVVL.js";
|
|
4
|
+
import {
|
|
5
|
+
FunctionName
|
|
6
|
+
} from "./chunk-FYLAXC3R.js";
|
|
7
|
+
import {
|
|
8
|
+
Original
|
|
9
|
+
} from "./chunk-5AM5HM3B.js";
|
|
10
|
+
import {
|
|
11
|
+
AbiWarning
|
|
12
|
+
} from "./chunk-XBEBAU77.js";
|
|
13
|
+
import {
|
|
14
|
+
useDecodeFunctionError
|
|
15
|
+
} from "./chunk-C6GUZVQ2.js";
|
|
16
|
+
import {
|
|
17
|
+
cn
|
|
18
|
+
} from "./chunk-SNUPCZY7.js";
|
|
19
|
+
|
|
20
|
+
// src/components/OutputData/ErrorDecode.tsx
|
|
21
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
var ErrorDecode = ({
|
|
23
|
+
to,
|
|
24
|
+
errorData,
|
|
25
|
+
space,
|
|
26
|
+
labelClassName,
|
|
27
|
+
implementation
|
|
28
|
+
}) => {
|
|
29
|
+
const [decodedError, isLoading] = useDecodeFunctionError({
|
|
30
|
+
to,
|
|
31
|
+
implementation,
|
|
32
|
+
errorData,
|
|
33
|
+
space
|
|
34
|
+
});
|
|
35
|
+
if (isLoading || !decodedError || !decodedError.abiItem || decodedError.abiItem.type !== "error")
|
|
36
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-h-32px", children: [
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: cn(
|
|
41
|
+
"w-100px shrink-0 grow-0 text-14px lh-18px pt-6px text-#6a737d",
|
|
42
|
+
labelClassName
|
|
43
|
+
),
|
|
44
|
+
children: "Error:"
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
48
|
+
/* @__PURE__ */ jsx(Original, { data: errorData ?? "" }),
|
|
49
|
+
!isLoading && /* @__PURE__ */ jsx(
|
|
50
|
+
AbiWarning,
|
|
51
|
+
{
|
|
52
|
+
tip: decodedError?.failed ? "contract.abiError" : decodedError?.noAbi ? "contract.abiNotUploaded" : void 0
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] })
|
|
56
|
+
] });
|
|
57
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-32px", children: [
|
|
59
|
+
/* @__PURE__ */ jsxs(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: cn(
|
|
63
|
+
"w-100px shrink-0 grow-0 text-14px lh-18px text-#6a737d pt-1px",
|
|
64
|
+
labelClassName
|
|
65
|
+
),
|
|
66
|
+
children: [
|
|
67
|
+
"Error:",
|
|
68
|
+
" "
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(FunctionName, { abiItem: decodedError.abiItem }) })
|
|
73
|
+
] }),
|
|
74
|
+
decodedError.args && decodedError.args.length > 0 && /* @__PURE__ */ jsx(
|
|
75
|
+
DecodedParameters,
|
|
76
|
+
{
|
|
77
|
+
args: decodedError.args,
|
|
78
|
+
params: decodedError.abiItem.inputs,
|
|
79
|
+
label: "Parameters:",
|
|
80
|
+
labelClassName,
|
|
81
|
+
space
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
] });
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
ErrorDecode
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=chunk-HCEXWKMZ.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';\nimport { AbiWarning } from '../InputData/AbiWarning';\n\nexport const ErrorDecode = ({\n to,\n errorData,\n space,\n labelClassName,\n implementation,\n}: {\n errorData?: `0x${string}`;\n to?: string;\n space: 'evm' | 'core';\n labelClassName?: string;\n implementation?: string;\n}) => {\n const [decodedError, isLoading] = useDecodeFunctionError({\n to,\n implementation,\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 {!isLoading && (\n <AbiWarning\n tip={\n decodedError?.failed\n ? 'contract.abiError'\n : decodedError?.noAbi\n ? 'contract.abiNotUploaded'\n : undefined\n }\n />\n )}\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":";;;;;;;;;;;;;;;;;;;;AAmCQ,SAyBJ,UAzBI,KAQA,YARA;AA5BD,IAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAMM;AACJ,QAAM,CAAC,cAAc,SAAS,IAAI,uBAAuB;AAAA,IACvD;AAAA,IACA;AAAA,IACA;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,qBAAC,SAAI,WAAU,UACb;AAAA,4BAAC,YAAS,MAAM,aAAa,IAAI;AAAA,QAChC,CAAC,aACA;AAAA,UAAC;AAAA;AAAA,YACC,KACE,cAAc,SACV,sBACA,cAAc,QACZ,4BACA;AAAA;AAAA,QAEV;AAAA,SAEJ;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":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
reqAbiByMethodId
|
|
3
|
+
} from "./chunk-SYWQ2T57.js";
|
|
4
|
+
|
|
5
|
+
// src/utils/hooks/useMethodAbi.ts
|
|
6
|
+
import useSWRImmutable from "swr/immutable";
|
|
7
|
+
var useMethodAbi = (methodId, shouldFetch = true) => {
|
|
8
|
+
return useSWRImmutable(
|
|
9
|
+
shouldFetch && methodId ? `method-abi-${methodId}` : null,
|
|
10
|
+
() => reqAbiByMethodId(methodId ?? "")
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
useMethodAbi
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=chunk-HW5VD7EO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/hooks/useMethodAbi.ts"],"sourcesContent":["import useSWRImmutable from 'swr/immutable';\nimport { reqAbiByMethodId } from '../request';\n\nexport const useMethodAbi = (methodId?: string, shouldFetch = true) => {\n return useSWRImmutable(\n shouldFetch && methodId ? `method-abi-${methodId}` : null,\n () => reqAbiByMethodId(methodId ?? ''),\n );\n};\n"],"mappings":";;;;;AAAA,OAAO,qBAAqB;AAGrB,IAAM,eAAe,CAAC,UAAmB,cAAc,SAAS;AACrE,SAAO;AAAA,IACL,eAAe,WAAW,cAAc,aAAa;AAAA,IACrD,MAAM,iBAAiB,YAAY,EAAE;AAAA,EACvC;AACF;","names":[]}
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-BMO4IZHV.js";
|
|
24
24
|
import {
|
|
25
25
|
cn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SNUPCZY7.js";
|
|
27
27
|
|
|
28
28
|
// src/components/Tooltip/index.tsx
|
|
29
29
|
import {
|
|
@@ -531,4 +531,4 @@ var Tooltip2 = ({
|
|
|
531
531
|
export {
|
|
532
532
|
Tooltip2 as Tooltip
|
|
533
533
|
};
|
|
534
|
-
//# sourceMappingURL=chunk-
|
|
534
|
+
//# sourceMappingURL=chunk-J536GL5G.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ContractDetail,
|
|
3
3
|
formatContractAndTokenInfoMap
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OSPPP5W5.js";
|
|
5
5
|
import {
|
|
6
6
|
FunctionName,
|
|
7
7
|
getParameterType
|
|
@@ -11,22 +11,22 @@ import {
|
|
|
11
11
|
} from "./chunk-SFCNLOQ5.js";
|
|
12
12
|
import {
|
|
13
13
|
AddressLabel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EOSVUB2G.js";
|
|
15
15
|
import {
|
|
16
16
|
Link
|
|
17
17
|
} from "./chunk-2Y57U43P.js";
|
|
18
18
|
import {
|
|
19
19
|
convertCheckSum
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BN3ATGHU.js";
|
|
21
21
|
import {
|
|
22
22
|
Text
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YOVNVFY2.js";
|
|
24
24
|
import {
|
|
25
25
|
cn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-B5JCHBO3.js";
|
|
27
27
|
import {
|
|
28
28
|
reqContractAndToken
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SYWQ2T57.js";
|
|
30
30
|
|
|
31
31
|
// src/components/InputData/OptimizationDecode.tsx
|
|
32
32
|
import { useEffect, useMemo, useState } from "react";
|
|
@@ -181,4 +181,4 @@ export {
|
|
|
181
181
|
DecodedParameters,
|
|
182
182
|
OptimizationDecode
|
|
183
183
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-J7UQ2R3H.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tooltip
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L7RD6ZPE.js";
|
|
4
4
|
import {
|
|
5
5
|
useI18n
|
|
6
6
|
} from "./chunk-DQGLZCIG.js";
|
|
@@ -142,4 +142,4 @@ var AceEditor = forwardRef(
|
|
|
142
142
|
export {
|
|
143
143
|
AceEditor
|
|
144
144
|
};
|
|
145
|
-
//# sourceMappingURL=chunk-
|
|
145
|
+
//# sourceMappingURL=chunk-JBCKAHH7.js.map
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-OYESIV3F.js";
|
|
4
4
|
import {
|
|
5
5
|
JsonDecode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RLA5XZT2.js";
|
|
7
7
|
import {
|
|
8
8
|
OptimizationDecode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J7UQ2R3H.js";
|
|
10
10
|
import {
|
|
11
11
|
Original
|
|
12
12
|
} from "./chunk-YBQQ72FQ.js";
|
|
13
13
|
import {
|
|
14
14
|
UTF8
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-A3VPSWVX.js";
|
|
16
16
|
|
|
17
17
|
// src/components/InputData/index.tsx
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -63,4 +63,4 @@ var InputData = ({
|
|
|
63
63
|
export {
|
|
64
64
|
InputData
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-JKFT4JUY.js.map
|