@cfxjs/sirius-next-common 0.2.25 → 0.2.27
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-QUEYGZEY.js → chunk-3HNKXBB2.js} +3 -3
- package/dist/{chunk-7R6SGHOG.js → chunk-473ZUYVX.js} +17 -2
- package/dist/chunk-473ZUYVX.js.map +1 -0
- package/dist/{chunk-RIWM6DB5.js → chunk-5H6N5Q5P.js} +3 -3
- package/dist/{chunk-2KOLEWOS.js → chunk-5XGZICOO.js} +2 -2
- package/dist/{chunk-UAUOFPHA.js → chunk-5ZPPSS5X.js} +2 -2
- package/dist/{chunk-ZTGRS6WM.js → chunk-6SZGOJED.js} +5 -5
- package/dist/{chunk-442632G5.js → chunk-A3X4WFVY.js} +3 -3
- package/dist/{chunk-S4M4LBVQ.js → chunk-BH7IUB4D.js} +2 -2
- package/dist/{chunk-COMABNT2.js → chunk-C6GIUAFP.js} +5 -5
- package/dist/{chunk-2PGGAIEP.js → chunk-C7C75OAD.js} +6 -6
- package/dist/{chunk-2UN57Q5P.js → chunk-CETP4T6Y.js} +3 -3
- package/dist/{chunk-AKS6URWT.js → chunk-CVM3Y2WQ.js} +5 -5
- package/dist/{chunk-NG6K2B3F.js → chunk-DMBRTCEL.js} +4 -2
- package/dist/chunk-DMBRTCEL.js.map +1 -0
- package/dist/{chunk-TNVFEZBN.js → chunk-ETK4EU74.js} +6 -6
- package/dist/{chunk-D6FWT557.js → chunk-FW4RU2AH.js} +4 -4
- package/dist/{chunk-MBRAYFD4.js → chunk-FXFHGUJG.js} +2 -2
- package/dist/{chunk-XASQUPYS.js → chunk-G6N3L7XQ.js} +2 -2
- package/dist/{chunk-2PQY4AOY.js → chunk-H2HTJNMZ.js} +2 -2
- package/dist/{chunk-BHL6OY3L.js → chunk-H5ZIEB6Y.js} +53 -6
- package/dist/chunk-H5ZIEB6Y.js.map +1 -0
- package/dist/{chunk-WBV3BSDG.js → chunk-HBJOTRGP.js} +2 -2
- package/dist/chunk-I5YTFVQB.js +19 -0
- package/dist/chunk-I5YTFVQB.js.map +1 -0
- package/dist/{chunk-6PDWJNOG.js → chunk-IUFQJFZW.js} +4 -4
- package/dist/{chunk-SWH3CIYY.js → chunk-IW36ZVPL.js} +2 -2
- package/dist/{chunk-UQQJ37UO.js → chunk-J3WGGVAB.js} +4 -4
- package/dist/{chunk-C2BON7HP.js → chunk-MKBKASBZ.js} +2 -2
- package/dist/{chunk-73PNXQWF.js → chunk-RM25O3LE.js} +2 -2
- package/dist/{chunk-IUL5FJSO.js → chunk-RP23W2AA.js} +2 -2
- package/dist/{chunk-UDR62T6C.js → chunk-S7FVSBBH.js} +2 -2
- package/dist/{chunk-RDIVTGYB.js → chunk-VIXYY5CK.js} +2 -2
- package/dist/{chunk-NQFK4HOS.js → chunk-W2CLMFMA.js} +4 -4
- package/dist/{chunk-FUZVMDLY.js → chunk-WSEFUFEL.js} +4 -4
- package/dist/{chunk-DWU7DZBU.js → chunk-X4VWQ2HL.js} +3 -3
- package/dist/{chunk-NRHFGPN6.js → chunk-XDBZBV4L.js} +4 -4
- package/dist/{chunk-75SROBSE.js → chunk-Z7YF2BJY.js} +2 -2
- package/dist/components/AAFailedReason/index.d.ts +1 -3
- package/dist/components/AAFailedReason/index.js +9 -13
- package/dist/components/AAFailedReason/index.js.map +1 -1
- 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 +5 -5
- package/dist/components/InputData/JsonDecode.js +5 -5
- package/dist/components/InputData/OptimizationDecode.js +12 -12
- package/dist/components/InputData/UTF8.js +3 -3
- package/dist/components/InputData/index.js +16 -16
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/NetworkIcon/index.js +2 -2
- package/dist/components/OutputData/ErrorDecode.js +16 -15
- package/dist/components/OutputData/index.js +18 -17
- 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.js +6 -6
- package/dist/components/Text/index.js +4 -4
- package/dist/components/Tooltip/index.js +3 -3
- package/dist/components/TransactionAction/coreTransactionAction.js +10 -10
- package/dist/components/TransactionAction/evmTransactionAction.js +9 -9
- package/dist/components/TransactionTrace/TraceDetail.js +26 -25
- package/dist/components/TransactionTrace/TreeTraceTable.d.ts +2 -1
- package/dist/components/TransactionTrace/TreeTraceTable.js +27 -26
- package/dist/components/TransactionTrace/index.js +27 -26
- package/dist/utils/address.js +2 -2
- package/dist/utils/contractManagerTool.js +2 -2
- package/dist/utils/hooks/useAbiItemById.d.ts +6 -0
- package/dist/utils/hooks/useAbiItemById.js +12 -0
- package/dist/utils/hooks/useAbiItemById.js.map +1 -0
- 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.d.ts +2 -1
- package/dist/utils/hooks/useDecodeFunctionError.js +5 -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 +7 -2
- package/dist/utils/request.js +3 -1
- package/dist/utils/request.types.d.ts +11 -1
- package/package.json +3 -3
- package/dist/chunk-7R6SGHOG.js.map +0 -1
- package/dist/chunk-BHL6OY3L.js.map +0 -1
- package/dist/chunk-NG6K2B3F.js.map +0 -1
- /package/dist/{chunk-QUEYGZEY.js.map → chunk-3HNKXBB2.js.map} +0 -0
- /package/dist/{chunk-RIWM6DB5.js.map → chunk-5H6N5Q5P.js.map} +0 -0
- /package/dist/{chunk-2KOLEWOS.js.map → chunk-5XGZICOO.js.map} +0 -0
- /package/dist/{chunk-UAUOFPHA.js.map → chunk-5ZPPSS5X.js.map} +0 -0
- /package/dist/{chunk-ZTGRS6WM.js.map → chunk-6SZGOJED.js.map} +0 -0
- /package/dist/{chunk-442632G5.js.map → chunk-A3X4WFVY.js.map} +0 -0
- /package/dist/{chunk-S4M4LBVQ.js.map → chunk-BH7IUB4D.js.map} +0 -0
- /package/dist/{chunk-COMABNT2.js.map → chunk-C6GIUAFP.js.map} +0 -0
- /package/dist/{chunk-2PGGAIEP.js.map → chunk-C7C75OAD.js.map} +0 -0
- /package/dist/{chunk-2UN57Q5P.js.map → chunk-CETP4T6Y.js.map} +0 -0
- /package/dist/{chunk-AKS6URWT.js.map → chunk-CVM3Y2WQ.js.map} +0 -0
- /package/dist/{chunk-TNVFEZBN.js.map → chunk-ETK4EU74.js.map} +0 -0
- /package/dist/{chunk-D6FWT557.js.map → chunk-FW4RU2AH.js.map} +0 -0
- /package/dist/{chunk-MBRAYFD4.js.map → chunk-FXFHGUJG.js.map} +0 -0
- /package/dist/{chunk-XASQUPYS.js.map → chunk-G6N3L7XQ.js.map} +0 -0
- /package/dist/{chunk-2PQY4AOY.js.map → chunk-H2HTJNMZ.js.map} +0 -0
- /package/dist/{chunk-WBV3BSDG.js.map → chunk-HBJOTRGP.js.map} +0 -0
- /package/dist/{chunk-6PDWJNOG.js.map → chunk-IUFQJFZW.js.map} +0 -0
- /package/dist/{chunk-SWH3CIYY.js.map → chunk-IW36ZVPL.js.map} +0 -0
- /package/dist/{chunk-UQQJ37UO.js.map → chunk-J3WGGVAB.js.map} +0 -0
- /package/dist/{chunk-C2BON7HP.js.map → chunk-MKBKASBZ.js.map} +0 -0
- /package/dist/{chunk-73PNXQWF.js.map → chunk-RM25O3LE.js.map} +0 -0
- /package/dist/{chunk-IUL5FJSO.js.map → chunk-RP23W2AA.js.map} +0 -0
- /package/dist/{chunk-UDR62T6C.js.map → chunk-S7FVSBBH.js.map} +0 -0
- /package/dist/{chunk-RDIVTGYB.js.map → chunk-VIXYY5CK.js.map} +0 -0
- /package/dist/{chunk-NQFK4HOS.js.map → chunk-W2CLMFMA.js.map} +0 -0
- /package/dist/{chunk-FUZVMDLY.js.map → chunk-WSEFUFEL.js.map} +0 -0
- /package/dist/{chunk-DWU7DZBU.js.map → chunk-X4VWQ2HL.js.map} +0 -0
- /package/dist/{chunk-NRHFGPN6.js.map → chunk-XDBZBV4L.js.map} +0 -0
- /package/dist/{chunk-75SROBSE.js.map → chunk-Z7YF2BJY.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
convertCheckSum
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RP23W2AA.js";
|
|
4
4
|
import {
|
|
5
5
|
Text
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A3X4WFVY.js";
|
|
7
7
|
import {
|
|
8
8
|
getTranslations
|
|
9
9
|
} from "./chunk-DQGLZCIG.js";
|
|
@@ -143,4 +143,4 @@ var RenderAddress = ({
|
|
|
143
143
|
export {
|
|
144
144
|
RenderAddress
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-3HNKXBB2.js.map
|
|
@@ -266,6 +266,20 @@ var fetchAddressNameMap = (addresses, params = {}) => {
|
|
|
266
266
|
method: "GET"
|
|
267
267
|
});
|
|
268
268
|
};
|
|
269
|
+
var reqAbiById = fetchWithCache(
|
|
270
|
+
(params) => {
|
|
271
|
+
const url = qs.stringifyUrl({
|
|
272
|
+
url: "/contract/lookupAbi",
|
|
273
|
+
query: params
|
|
274
|
+
});
|
|
275
|
+
return fetchWithOpenApi(url, {
|
|
276
|
+
method: "GET"
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
maxAge: 1e3 * 60 * 60
|
|
281
|
+
}
|
|
282
|
+
);
|
|
269
283
|
|
|
270
284
|
export {
|
|
271
285
|
fetch,
|
|
@@ -281,6 +295,7 @@ export {
|
|
|
281
295
|
getContractDetail,
|
|
282
296
|
detectAccountType,
|
|
283
297
|
reqAbiByMethodId,
|
|
284
|
-
fetchAddressNameMap
|
|
298
|
+
fetchAddressNameMap,
|
|
299
|
+
reqAbiById
|
|
285
300
|
};
|
|
286
|
-
//# sourceMappingURL=chunk-
|
|
301
|
+
//# sourceMappingURL=chunk-473ZUYVX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/request.ts"],"sourcesContent":["import qs from 'query-string';\nimport { publishRequestError } from './pubsub';\nimport {\n AbiByIdResponse,\n AddressNameMap,\n BaseContractInfo,\n DetectAccountTypeResponse,\n MethodAbiItemResponse,\n} from './request.types';\nimport { getEnvConfig } from '../store';\nimport { fetchWithCache } from './cache';\ninterface FetchWithAbortType<T> {\n promise: Promise<T>;\n abort: () => void;\n}\n\ninterface FetchOptions extends RequestInit {\n timeout?: number;\n showErrorMessage?: boolean;\n}\n\nconst TIMEOUT_TIMESTAMP = 60000;\n\nconst isHeadRequest = (opts?: FetchOptions) =>\n opts?.method?.toUpperCase() === 'HEAD';\n\nconst createHeadFailureResponse = (\n status: number,\n statusText: string,\n): Response => new Response(null, { status, statusText });\n\nconst checkStatus = (response: Response) => {\n if (\n (response.status >= 200 && response.status < 300) ||\n response.status === 600\n ) {\n return response;\n } else {\n const error = new Error(response.statusText);\n error.name = 'HttpError';\n (error as any).status = response.status;\n (error as any).response = response;\n throw error;\n }\n};\n\n// 格式化 response data\nconst parseJSON = async (response: Response) => {\n const contentType = response.headers.get('content-type');\n try {\n if (contentType?.includes('application/json')) {\n return { data: await response.json(), response };\n } else if (contentType?.includes('text/html')) {\n return { data: await response.text(), response };\n } else {\n // contentType 还有其他类型,目前项目中用不到\n // 不能简单的报错,比如 image/x-icon 是 favicon 请求\n // 此处直接返回 response,由业务代码处理其他类型的数据\n return { data: response, response };\n }\n } catch (error) {\n if ((error as any).name === 'AbortError') {\n return { data: response, response };\n }\n (error as any).response = response;\n (error as any).status = 20001;\n throw error;\n }\n};\n\n// 检查返回值中是否包含错误\nconst checkResponse = function (\n url: string,\n {\n data,\n response,\n }: {\n data: any;\n response: Response;\n },\n opts: FetchOptions,\n) {\n // 兼容 data.code 和 data.data, 是关于 core space 的数据结构\n if (response.status === 200 && (data.status === '1' || data.code === 0)) {\n return data.result || data.data;\n } else if (isHeadRequest(opts)) {\n // handle of HEAD method\n return response;\n } else {\n const code = Number(data.status ?? data.code);\n const error: Partial<ErrorEvent> & {\n response?: ResponseType;\n status?: number;\n } = new Error(data.message);\n error.response = data;\n error.status = code;\n throw error;\n }\n};\n\nconst fetchWithAbort = <T>(\n url: string,\n options: FetchOptions = {},\n): FetchWithAbortType<T> => {\n const controller = new AbortController();\n const opts: FetchOptions = { ...options, signal: controller.signal };\n const showErrorMessage = options.showErrorMessage ?? true;\n const timeout = options.timeout || TIMEOUT_TIMESTAMP;\n\n let timeoutId: ReturnType<typeof setTimeout>;\n const promise: Promise<T> = new Promise((resolve, reject) => {\n timeoutId = setTimeout(() => {\n controller.abort();\n if (isHeadRequest(opts)) {\n return resolve(createHeadFailureResponse(408, 'Request timeout') as T);\n }\n showErrorMessage &&\n publishRequestError(\n { url, code: 20002, message: 'Request timeout' },\n 'http',\n );\n reject(new Error('Request timeout'));\n }, timeout);\n\n window\n .fetch(url, opts)\n .then(checkStatus)\n .then(parseJSON)\n .then((...args) => checkResponse(url, ...args, opts))\n .then(data => resolve(data as T))\n .catch(error => {\n if (isHeadRequest(opts)) {\n return resolve(\n createHeadFailureResponse(\n 599,\n error?.message || 'Request failed',\n ) as T,\n );\n }\n\n // A fetch() promise will reject with a TypeError when a network error is encountered or CORS is misconfigured on the server-side,\n // although this usually means permission issues or similar — a 404 does not constitute a network error, for example.\n // For detail: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch\n if (error.name === 'TypeError') {\n showErrorMessage && publishRequestError({ url, code: 20004 }, 'http');\n reject(new Error('Network error'));\n } else if (error.name === 'AbortError') {\n showErrorMessage &&\n publishRequestError(\n { url, code: 20003, message: 'Fetch aborted' },\n 'http',\n );\n reject(new Error('Fetch aborted'));\n } else {\n showErrorMessage &&\n publishRequestError(\n { url, code: (error as any).status, message: error.message },\n 'http',\n );\n reject(error);\n }\n })\n .finally(() => clearTimeout(timeoutId));\n });\n\n return {\n promise,\n abort: () => {\n clearTimeout(timeoutId);\n controller.abort();\n },\n };\n};\n\nexport const fetch = <T>(\n url: string,\n options: FetchOptions = {},\n): Promise<T> => {\n const { promise } = fetchWithAbort<T>(url, options);\n return promise;\n};\n\nexport const appendApiPrefix = (url: string) => {\n // for cfx top N\n if (url.startsWith('/stat/')) {\n return url;\n }\n if (url.startsWith('http')) {\n return url;\n }\n return `/v1${url.startsWith('/') ? url : '/' + url}`;\n};\n\nexport const fetchWithPrefix = <T>(url: string, opts?: FetchOptions) => {\n return fetch<T>(appendApiPrefix(url), opts);\n};\n\nexport const fetchWithOpenApi = <T>(url: string, opts?: FetchOptions) => {\n const ENV_CONFIG = getEnvConfig();\n if (!ENV_CONFIG.ENV_OPEN_API_HOST) {\n throw new Error('ENV_OPEN_API_HOST is not set');\n }\n return fetch<T>(\n `${ENV_CONFIG.ENV_OPEN_API_HOST}${url.startsWith('/') ? url : '/' + url}`,\n opts,\n );\n};\n\nexport const simpleGetFetcher = async <T>(args: any[]) => {\n let [url, query] = args;\n if (query) {\n url = qs.stringifyUrl({ url, query });\n }\n return await fetchWithPrefix<T>(url, {\n method: 'get',\n });\n};\n\ntype RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';\ninterface QueryParams {\n [key: string]: string | undefined;\n}\ninterface Config {\n url: string;\n query: QueryParams;\n type?: RequestMethod;\n body?: any;\n headers?: Headers;\n signal?: AbortSignal;\n}\n\nconst queryAddress = (address: string[]) => {\n return address.reduce((prev, curr, index) => {\n return !index ? `address=${curr}` : `${prev}&address=${curr}`;\n }, '');\n};\n\nexport const sendRequestChart = async (config: Config) => {\n try {\n const res: any = await fetch(\n qs.stringifyUrl({ url: config.url, query: config.query }),\n {\n method: config.type || 'GET',\n body: config.body,\n headers: config.headers,\n signal: config.signal,\n },\n );\n const data = res;\n data.list = [...(data.list || [])].reverse();\n return data;\n } catch (error) {\n console.error('Request failed', error);\n throw error;\n }\n};\n\nexport const sendRequestENSInfo = async (url?: string | null) => {\n if (!url) return {};\n try {\n const res: any = await fetch(url, {\n method: 'GET',\n });\n\n return res?.map;\n } catch (error) {\n console.error('Request failed', error);\n throw error;\n }\n};\n\nexport const sendRequestGasPrice = async () => {\n try {\n const res: any = await fetch(`/stat/gasprice/tracker`, {\n method: 'GET',\n });\n return res;\n } catch (error) {\n console.error('Request failed', error);\n throw error;\n }\n};\n\nexport const reqNametag = async (address: string[]) => {\n const query = queryAddress(address);\n\n const res: any = await fetch(`/v1/nametag?${query}`, {\n method: 'GET',\n });\n return res?.map;\n};\n\nexport const reqContractAndToken = fetchWithCache(\n async (address: string[]) => {\n const query = queryAddress(address);\n\n const res: any = await fetch(`/v1/contract-and-token?${query}`, {\n method: 'GET',\n });\n return res;\n },\n {\n key: 'contract-and-token',\n maxAge: 1000 * 60 * 60,\n },\n);\n\nexport const getContractDetail = fetchWithCache(\n <T extends string>(contractAddress?: string, fields: T[] = []) => {\n const url = qs.stringifyUrl({\n url: `/v1/contract/${contractAddress}`,\n query: { fields },\n });\n\n return fetch<BaseContractInfo & Record<T, unknown>>(url, {\n method: 'GET',\n });\n },\n {\n key: 'contract-detail',\n maxAge: 1000 * 60 * 60,\n },\n);\n\nexport const detectAccountType = fetchWithCache(\n (address: string) => {\n return fetchWithOpenApi<DetectAccountTypeResponse>(\n `/util/detectAccountType?hex=${address}`,\n {\n method: 'GET',\n },\n );\n },\n {\n // 10 seconds\n maxAge: 1000 * 10,\n },\n);\n\nexport const reqAbiByMethodId = (methodId: string) => {\n return fetchWithPrefix<{\n list: MethodAbiItemResponse[];\n }>(\n qs.stringifyUrl({\n url: '/stat/list-abi-method',\n query: {\n id: methodId,\n },\n }),\n );\n};\n\nexport const fetchAddressNameMap = (\n addresses: string[],\n params: {\n withContractInfo?: 'true' | 'false';\n withNameTagInfo?: 'true' | 'false';\n withENSInfo?: 'true' | 'false';\n } = {},\n) => {\n const url = qs.stringifyUrl({\n url: '/account/infos',\n query: {\n accounts: addresses.join(','),\n ...params,\n },\n });\n return fetchWithOpenApi<Record<string, AddressNameMap>>(url, {\n method: 'GET',\n });\n};\n\nexport const reqAbiById = fetchWithCache(\n (params: { function?: string; error?: string; event?: string }) => {\n const url = qs.stringifyUrl({\n url: '/contract/lookupAbi',\n query: params,\n });\n return fetchWithOpenApi<AbiByIdResponse>(url, {\n method: 'GET',\n });\n },\n {\n maxAge: 1000 * 60 * 60,\n },\n);\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,QAAQ;AAqBf,IA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E;AACjE,UAAM,MAAM,GAAG,aAAa;AAAA,MAC1B,KAAK;AAAA,MACL,OAAO;AAAA,IACT,CAAC;AACD,WAAO,iBAAkC,KAAK;AAAA,MAC5C,QAAQ;AAAA,IACV,CAAC;AAAA,EACH;AAAA,EACA;AAAA,IACE,QAAQ,MAAO,KAAK;AAAA,EACtB;AACF;","names":[]}
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5ZPPSS5X.js";
|
|
9
9
|
import {
|
|
10
10
|
cn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-G6N3L7XQ.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-5H6N5Q5P.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tooltip
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FXFHGUJG.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-5XGZICOO.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-LRCAKRPK.js";
|
|
15
15
|
import {
|
|
16
16
|
cn
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-G6N3L7XQ.js";
|
|
18
18
|
|
|
19
19
|
// src/components/Select/select.tsx
|
|
20
20
|
import * as React9 from "react";
|
|
@@ -3613,4 +3613,4 @@ export {
|
|
|
3613
3613
|
SelectItem,
|
|
3614
3614
|
SelectSeparator
|
|
3615
3615
|
};
|
|
3616
|
-
//# sourceMappingURL=chunk-
|
|
3616
|
+
//# sourceMappingURL=chunk-5ZPPSS5X.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useDecodeFunctionData
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IUFQJFZW.js";
|
|
4
4
|
import {
|
|
5
5
|
useDecodedDataType
|
|
6
6
|
} from "./chunk-UM5J477V.js";
|
|
7
7
|
import {
|
|
8
8
|
Select
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5H6N5Q5P.js";
|
|
10
10
|
import {
|
|
11
11
|
OutputData
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FW4RU2AH.js";
|
|
13
13
|
import {
|
|
14
14
|
InputData
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WSEFUFEL.js";
|
|
16
16
|
import {
|
|
17
17
|
AbiWarning
|
|
18
18
|
} from "./chunk-XBEBAU77.js";
|
|
@@ -189,4 +189,4 @@ var TraceDetail = (props) => {
|
|
|
189
189
|
export {
|
|
190
190
|
TraceDetail
|
|
191
191
|
};
|
|
192
|
-
//# sourceMappingURL=chunk-
|
|
192
|
+
//# sourceMappingURL=chunk-6SZGOJED.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-TOKKKTFG.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FXFHGUJG.js";
|
|
7
7
|
import {
|
|
8
8
|
selectText
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G6N3L7XQ.js";
|
|
10
10
|
|
|
11
11
|
// src/components/Text/index.tsx
|
|
12
12
|
import React from "react";
|
|
@@ -102,4 +102,4 @@ var Text = React.memo(
|
|
|
102
102
|
export {
|
|
103
103
|
Text
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-A3X4WFVY.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-65X53DMW.js";
|
|
4
4
|
import {
|
|
5
5
|
Tooltip
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FXFHGUJG.js";
|
|
7
7
|
|
|
8
8
|
// src/components/InfoIconWithTooltip/index.tsx
|
|
9
9
|
import clsx from "clsx";
|
|
@@ -23,4 +23,4 @@ var InfoIconWithTooltip = ({
|
|
|
23
23
|
export {
|
|
24
24
|
InfoIconWithTooltip
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-BH7IUB4D.js.map
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-MWAD4CIG.js";
|
|
4
4
|
import {
|
|
5
5
|
RenderAddress
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3HNKXBB2.js";
|
|
7
7
|
import {
|
|
8
8
|
formatAddress,
|
|
9
9
|
isInnerContractAddress
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RP23W2AA.js";
|
|
11
11
|
import {
|
|
12
12
|
Tooltip
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FXFHGUJG.js";
|
|
14
14
|
import {
|
|
15
15
|
coreCorrespondsToEspace,
|
|
16
16
|
getNetwork
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-G6N3L7XQ.js";
|
|
18
18
|
import {
|
|
19
19
|
getEnvConfig,
|
|
20
20
|
getTranslations,
|
|
@@ -209,4 +209,4 @@ export {
|
|
|
209
209
|
MyAddress,
|
|
210
210
|
PosAddress
|
|
211
211
|
};
|
|
212
|
-
//# sourceMappingURL=chunk-
|
|
212
|
+
//# sourceMappingURL=chunk-C6GIUAFP.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AddressLabel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J3WGGVAB.js";
|
|
4
4
|
import {
|
|
5
5
|
ContractDetail
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W2CLMFMA.js";
|
|
7
7
|
import {
|
|
8
8
|
FunctionName,
|
|
9
9
|
getParameterType
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
} from "./chunk-2Y57U43P.js";
|
|
17
17
|
import {
|
|
18
18
|
convertCheckSum
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RP23W2AA.js";
|
|
20
20
|
import {
|
|
21
21
|
Text
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-A3X4WFVY.js";
|
|
23
23
|
import {
|
|
24
24
|
cn
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-G6N3L7XQ.js";
|
|
26
26
|
|
|
27
27
|
// src/components/InputData/OptimizationDecode.tsx
|
|
28
28
|
import { useMemo } from "react";
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
DecodedParameters,
|
|
155
155
|
OptimizationDecode
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=chunk-
|
|
157
|
+
//# sourceMappingURL=chunk-C7C75OAD.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-XI5WO2NW.js";
|
|
4
4
|
import {
|
|
5
5
|
AceEditor
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5XGZICOO.js";
|
|
7
7
|
import {
|
|
8
8
|
formatABI
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G6N3L7XQ.js";
|
|
10
10
|
|
|
11
11
|
// src/components/InputData/JsonDecode.tsx
|
|
12
12
|
import { useId, useMemo } from "react";
|
|
@@ -68,4 +68,4 @@ var JsonDecode = ({
|
|
|
68
68
|
export {
|
|
69
69
|
JsonDecode
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-CETP4T6Y.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAddressNameInfo
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VIXYY5CK.js";
|
|
4
4
|
import {
|
|
5
5
|
ContractAddress,
|
|
6
6
|
ContractCreatedAddress,
|
|
7
7
|
InvalidAddress,
|
|
8
8
|
MyAddress
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-C6GIUAFP.js";
|
|
10
10
|
import {
|
|
11
11
|
RenderAddress
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3HNKXBB2.js";
|
|
13
13
|
import {
|
|
14
14
|
convertCheckSum,
|
|
15
15
|
formatAddress,
|
|
16
16
|
isEvmAddress,
|
|
17
17
|
isZeroAddress
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RP23W2AA.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-CVM3Y2WQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TraceDetail
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6SZGOJED.js";
|
|
4
4
|
import {
|
|
5
5
|
Table
|
|
6
6
|
} from "./chunk-XZ7IV2FF.js";
|
|
@@ -12,6 +12,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
var TreeTraceTable = ({
|
|
13
13
|
data,
|
|
14
14
|
columns,
|
|
15
|
+
scroll = { x: 1200 },
|
|
15
16
|
loading = false,
|
|
16
17
|
showHeader = true,
|
|
17
18
|
colorReverse,
|
|
@@ -27,6 +28,7 @@ var TreeTraceTable = ({
|
|
|
27
28
|
{
|
|
28
29
|
columns,
|
|
29
30
|
rowKey: "index",
|
|
31
|
+
scroll,
|
|
30
32
|
data,
|
|
31
33
|
loading,
|
|
32
34
|
showHeader,
|
|
@@ -79,4 +81,4 @@ var TreeTraceTable = ({
|
|
|
79
81
|
export {
|
|
80
82
|
TreeTraceTable
|
|
81
83
|
};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-DMBRTCEL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TransactionTrace/TreeTraceTable.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Table, TableProps } from '../Table';\nimport { concat, uniq } from 'lodash';\nimport { TraceDetail } from './TraceDetail';\nimport { TreeTraceForUI } from 'src/utils/hooks/useTxTrace';\n\nexport const TreeTraceTable = ({\n data,\n columns,\n scroll = { x: 1200 },\n loading = false,\n showHeader = true,\n colorReverse,\n treeExpandedKeys,\n detailExpandedKeys,\n space,\n}: {\n data?: TreeTraceForUI[];\n columns: TableProps<TreeTraceForUI>['columns'];\n scroll?: TableProps<TreeTraceForUI>['scroll'];\n loading?: boolean;\n showHeader?: boolean;\n colorReverse?: boolean;\n treeExpandedKeys: string[];\n detailExpandedKeys: string[];\n space: 'evm' | 'core';\n}) => {\n const expandedRowKeys = useMemo(() => {\n return uniq(concat(treeExpandedKeys, detailExpandedKeys));\n }, [treeExpandedKeys, detailExpandedKeys]);\n\n return (\n <Table\n columns={columns}\n rowKey=\"index\"\n scroll={scroll}\n data={data}\n loading={loading}\n showHeader={showHeader}\n rowClassName={(record, index) => {\n if (detailExpandedKeys.includes(record.index)) return '!bg-#f0f5ff';\n return colorReverse\n ? index % 2 !== 0\n ? '!bg-#f9fafb'\n : '!bg-transparent'\n : index % 2 !== 0\n ? '!bg-transparent'\n : '!bg-#f9fafb';\n }}\n expandable={{\n showExpandColumn: false,\n expandedRowKeys,\n expandedRowRender: (\n record: TreeTraceForUI,\n index,\n indent,\n expanded,\n ) => {\n if (!expanded) return null;\n const isDetailedExpanded = detailExpandedKeys.includes(record.index);\n const isTreeExpanded = treeExpandedKeys.includes(record.index);\n return (\n <div>\n {isDetailedExpanded && (\n <TraceDetail\n abi={record.abi}\n input={record.input}\n output={record.result?.returnData}\n to={record.to}\n outcome={record.result?.outcome}\n isContractCreated={!!record.contractCreated}\n space={space}\n implementation={\n record.delegatedTo ?? record.proxy?.implAddress\n }\n />\n )}\n {isTreeExpanded && (\n <TreeTraceTable\n data={record.calls}\n columns={columns}\n // scroll={scroll}\n showHeader={false}\n colorReverse={\n colorReverse ? index % 2 !== 0 : index % 2 === 0\n }\n treeExpandedKeys={treeExpandedKeys}\n detailExpandedKeys={detailExpandedKeys}\n space={space}\n />\n )}\n </div>\n );\n },\n }}\n />\n );\n};\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AAExB,SAAS,QAAQ,YAAY;AA4DjB,SAEI,KAFJ;AAxDL,IAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,SAAS,EAAE,GAAG,KAAK;AAAA,EACnB,UAAU;AAAA,EACV,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAUM;AACJ,QAAM,kBAAkB,QAAQ,MAAM;AACpC,WAAO,KAAK,OAAO,kBAAkB,kBAAkB,CAAC;AAAA,EAC1D,GAAG,CAAC,kBAAkB,kBAAkB,CAAC;AAEzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,QAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,CAAC,QAAQ,UAAU;AAC/B,YAAI,mBAAmB,SAAS,OAAO,KAAK;AAAG,iBAAO;AACtD,eAAO,eACH,QAAQ,MAAM,IACZ,gBACA,oBACF,QAAQ,MAAM,IACZ,oBACA;AAAA,MACR;AAAA,MACA,YAAY;AAAA,QACV,kBAAkB;AAAA,QAClB;AAAA,QACA,mBAAmB,CACjB,QACA,OACA,QACA,aACG;AACH,cAAI,CAAC;AAAU,mBAAO;AACtB,gBAAM,qBAAqB,mBAAmB,SAAS,OAAO,KAAK;AACnE,gBAAM,iBAAiB,iBAAiB,SAAS,OAAO,KAAK;AAC7D,iBACE,qBAAC,SACE;AAAA,kCACC;AAAA,cAAC;AAAA;AAAA,gBACC,KAAK,OAAO;AAAA,gBACZ,OAAO,OAAO;AAAA,gBACd,QAAQ,OAAO,QAAQ;AAAA,gBACvB,IAAI,OAAO;AAAA,gBACX,SAAS,OAAO,QAAQ;AAAA,gBACxB,mBAAmB,CAAC,CAAC,OAAO;AAAA,gBAC5B;AAAA,gBACA,gBACE,OAAO,eAAe,OAAO,OAAO;AAAA;AAAA,YAExC;AAAA,YAED,kBACC;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM,OAAO;AAAA,gBACb;AAAA,gBAEA,YAAY;AAAA,gBACZ,cACE,eAAe,QAAQ,MAAM,IAAI,QAAQ,MAAM;AAAA,gBAEjD;AAAA,gBACA;AAAA,gBACA;AAAA;AAAA,YACF;AAAA,aAEJ;AAAA,QAEJ;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useENS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X4VWQ2HL.js";
|
|
4
4
|
import {
|
|
5
5
|
getAddressNameInfo
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VIXYY5CK.js";
|
|
7
7
|
import {
|
|
8
8
|
ContractAddress,
|
|
9
9
|
ContractCreatedAddress,
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
InvalidAddress,
|
|
12
12
|
MyAddress,
|
|
13
13
|
PosAddress
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-C6GIUAFP.js";
|
|
15
15
|
import {
|
|
16
16
|
RenderAddress
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3HNKXBB2.js";
|
|
18
18
|
import {
|
|
19
19
|
formatAddress,
|
|
20
20
|
isCoreAddress,
|
|
21
21
|
isCoreContractAddress,
|
|
22
22
|
isZeroAddress
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RP23W2AA.js";
|
|
24
24
|
import {
|
|
25
25
|
getTranslations,
|
|
26
26
|
useGlobalData
|
|
@@ -143,4 +143,4 @@ var CoreAddressContainer = withTranslation()(
|
|
|
143
143
|
export {
|
|
144
144
|
CoreAddressContainer
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-ETK4EU74.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ErrorDecode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XDBZBV4L.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-C7C75OAD.js";
|
|
10
10
|
import {
|
|
11
11
|
Original
|
|
12
12
|
} from "./chunk-5AM5HM3B.js";
|
|
13
13
|
import {
|
|
14
14
|
UTF8
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Z7YF2BJY.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-FW4RU2AH.js.map
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-BMO4IZHV.js";
|
|
24
24
|
import {
|
|
25
25
|
cn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-G6N3L7XQ.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-FXFHGUJG.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-WIB76E7O.js";
|
|
4
4
|
import {
|
|
5
5
|
fetch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-473ZUYVX.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/index.ts
|
|
9
9
|
import BigNumber from "bignumber.js";
|
|
@@ -809,4 +809,4 @@ export {
|
|
|
809
809
|
formatABI,
|
|
810
810
|
decodeAANonce
|
|
811
811
|
};
|
|
812
|
-
//# sourceMappingURL=chunk-
|
|
812
|
+
//# sourceMappingURL=chunk-G6N3L7XQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getContractDetail
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-473ZUYVX.js";
|
|
4
4
|
|
|
5
5
|
// src/utils/hooks/useContractDetail.ts
|
|
6
6
|
import useSWRImmutable from "swr/immutable";
|
|
@@ -14,4 +14,4 @@ var useContractDetail = (contractAddress, fields = [], shouldFetch = true) => {
|
|
|
14
14
|
export {
|
|
15
15
|
useContractDetail
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-H2HTJNMZ.js.map
|
|
@@ -3,13 +3,19 @@ import {
|
|
|
3
3
|
} from "./chunk-6SXAFSBF.js";
|
|
4
4
|
import {
|
|
5
5
|
useContractDetail
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-H2HTJNMZ.js";
|
|
7
|
+
import {
|
|
8
|
+
useAbiItemById
|
|
9
|
+
} from "./chunk-I5YTFVQB.js";
|
|
7
10
|
import {
|
|
8
11
|
CommonError_default
|
|
9
12
|
} from "./chunk-5TGK2EA2.js";
|
|
10
13
|
import {
|
|
11
14
|
CommonPanic_default
|
|
12
15
|
} from "./chunk-ADNS57X5.js";
|
|
16
|
+
import {
|
|
17
|
+
formatABI
|
|
18
|
+
} from "./chunk-G6N3L7XQ.js";
|
|
13
19
|
import {
|
|
14
20
|
COMMON_ERROR_OUTPUT_PREFIX,
|
|
15
21
|
COMMON_PANIC_OUTPUT_PREFIX
|
|
@@ -22,7 +28,8 @@ var useDecodeFunctionError = ({
|
|
|
22
28
|
to,
|
|
23
29
|
implementation: _implementation,
|
|
24
30
|
errorData,
|
|
25
|
-
space
|
|
31
|
+
space,
|
|
32
|
+
supportErrorAbi
|
|
26
33
|
}) => {
|
|
27
34
|
const standardErrorAbi = useMemo(() => {
|
|
28
35
|
if (!errorData)
|
|
@@ -94,6 +101,42 @@ var useDecodeFunctionError = ({
|
|
|
94
101
|
};
|
|
95
102
|
}
|
|
96
103
|
}, [errorData, implementationData, space]);
|
|
104
|
+
const errorId = errorData?.startsWith("0x") ? errorData.slice(0, 10) : null;
|
|
105
|
+
const needErrorAbi = supportErrorAbi && !!errorId && // contract abi decoded failed
|
|
106
|
+
!contractLoading && (!decoded || decoded.failed) && // implementation contract abi decoded failed
|
|
107
|
+
!implementationLoading && (!decodedByImplementation || decodedByImplementation.failed);
|
|
108
|
+
const { data: errorAbiResponse, isLoading: errorAbiLoading } = useAbiItemById(
|
|
109
|
+
errorId,
|
|
110
|
+
"error",
|
|
111
|
+
needErrorAbi
|
|
112
|
+
);
|
|
113
|
+
const decodedByErrorAbi = useMemo(() => {
|
|
114
|
+
if (!errorAbiResponse || !errorData || !errorId)
|
|
115
|
+
return null;
|
|
116
|
+
const errorAbiList = errorAbiResponse?.error?.[errorId];
|
|
117
|
+
if (!errorAbiList || errorAbiList.length !== 1)
|
|
118
|
+
return null;
|
|
119
|
+
const errorAbi = errorAbiList[0];
|
|
120
|
+
try {
|
|
121
|
+
const signature = errorAbi.signature;
|
|
122
|
+
const fullFormat = errorAbi.fullFormat;
|
|
123
|
+
const abi = formatABI([fullFormat || `error ${signature}`], {
|
|
124
|
+
json: true
|
|
125
|
+
});
|
|
126
|
+
const result = decodeErrorResult({
|
|
127
|
+
abi: JSON.parse(abi),
|
|
128
|
+
data: errorData,
|
|
129
|
+
space
|
|
130
|
+
});
|
|
131
|
+
return result;
|
|
132
|
+
} catch (error) {
|
|
133
|
+
console.log("decode error data with error abi failed", error);
|
|
134
|
+
return {
|
|
135
|
+
errorName: "unknown",
|
|
136
|
+
failed: true
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}, [errorAbiResponse, errorData, errorId, space]);
|
|
97
140
|
return useMemo(() => {
|
|
98
141
|
if (!errorData)
|
|
99
142
|
return [null, false];
|
|
@@ -103,13 +146,15 @@ var useDecodeFunctionError = ({
|
|
|
103
146
|
return [decodedByImplementation, implementationLoading];
|
|
104
147
|
if (decoded && !decoded.failed)
|
|
105
148
|
return [decoded, contractLoading];
|
|
106
|
-
if (
|
|
149
|
+
if (decodedByErrorAbi && !decodedByErrorAbi.failed)
|
|
150
|
+
return [decodedByErrorAbi, errorAbiLoading];
|
|
151
|
+
if (contractLoading || implementationLoading || errorAbiLoading)
|
|
107
152
|
return [null, true];
|
|
108
153
|
return [
|
|
109
154
|
{
|
|
110
155
|
errorName: "unknown",
|
|
111
|
-
noAbi: !decodedByStandardError && !decodedByImplementation && !decoded,
|
|
112
|
-
failed: decodedByImplementation?.failed || decoded?.failed ||
|
|
156
|
+
noAbi: !decodedByStandardError && !decodedByImplementation && !decoded && !decodedByErrorAbi,
|
|
157
|
+
failed: decodedByStandardError?.failed || decodedByImplementation?.failed || decoded?.failed || decodedByErrorAbi?.failed
|
|
113
158
|
},
|
|
114
159
|
false
|
|
115
160
|
];
|
|
@@ -118,8 +163,10 @@ var useDecodeFunctionError = ({
|
|
|
118
163
|
decodedByStandardError,
|
|
119
164
|
decoded,
|
|
120
165
|
decodedByImplementation,
|
|
166
|
+
decodedByErrorAbi,
|
|
121
167
|
contractLoading,
|
|
122
168
|
implementationLoading,
|
|
169
|
+
errorAbiLoading,
|
|
123
170
|
space
|
|
124
171
|
]);
|
|
125
172
|
};
|
|
@@ -127,4 +174,4 @@ var useDecodeFunctionError = ({
|
|
|
127
174
|
export {
|
|
128
175
|
useDecodeFunctionError
|
|
129
176
|
};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
177
|
+
//# sourceMappingURL=chunk-H5ZIEB6Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/hooks/useDecodeFunctionError.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { decodeErrorResult } from 'src/utils/sdk';\nimport type { AbiItem } from 'src/utils/sdk';\nimport { useContractDetail } from './useContractDetail';\nimport {\n COMMON_ERROR_OUTPUT_PREFIX,\n COMMON_PANIC_OUTPUT_PREFIX,\n} from '../constants';\nimport CommonError from 'src/abis/CommonError';\nimport CommonPanic from 'src/abis/CommonPanic';\nimport { useAbiItemById } from './useAbiItemById';\nimport { formatABI } from '..';\n\nconst fields = ['abi' as const];\n\ninterface Result {\n abiItem?: AbiItem;\n args?: readonly unknown[];\n errorName: string;\n // no abi for decoded\n noAbi?: boolean;\n // decoded failed\n failed?: boolean;\n}\n\nexport const useDecodeFunctionError = ({\n to,\n implementation: _implementation,\n errorData,\n space,\n supportErrorAbi,\n}: {\n errorData?: `0x${string}`;\n to?: string;\n implementation?: string;\n space: 'evm' | 'core';\n supportErrorAbi?: boolean;\n}): [Result | null, boolean] => {\n const standardErrorAbi = useMemo(() => {\n if (!errorData) return null;\n if (errorData.startsWith(COMMON_ERROR_OUTPUT_PREFIX)) return CommonError;\n if (errorData.startsWith(COMMON_PANIC_OUTPUT_PREFIX)) return CommonPanic;\n return null;\n }, [errorData]);\n const { data, isLoading: contractLoading } = useContractDetail(\n to,\n fields,\n !standardErrorAbi && !!errorData,\n );\n const implementation = _implementation ?? data?.implementation?.address;\n const { data: implementationData, isLoading: implementationLoading } =\n useContractDetail(implementation, fields, !standardErrorAbi && !!errorData);\n const decodedByStandardError = useMemo(() => {\n if (!standardErrorAbi || !errorData) return null;\n try {\n const result = decodeErrorResult({\n abi: standardErrorAbi,\n data: errorData,\n space,\n });\n return result as Result;\n } catch (error) {\n console.log('decode error data with standard error abi failed', error);\n return {\n errorName: 'unknown',\n failed: true,\n };\n }\n }, [errorData, standardErrorAbi, space]);\n const decoded = useMemo(() => {\n if (!data?.abi || !errorData) return null;\n try {\n const result = decodeErrorResult({\n abi: JSON.parse(data.abi as string),\n data: errorData,\n space,\n });\n return result as Result;\n } catch (error) {\n console.log('decode error data with contract abi failed', error);\n return {\n errorName: 'unknown',\n failed: true,\n };\n }\n }, [errorData, data, space]);\n const decodedByImplementation = useMemo(() => {\n if (!implementationData?.abi || !errorData) return null;\n try {\n const result = decodeErrorResult({\n abi: JSON.parse(implementationData.abi as string),\n data: errorData,\n space,\n });\n return result as Result;\n } catch (error) {\n console.log('decode error data with implementation abi failed', error);\n return {\n errorName: 'unknown',\n failed: true,\n };\n }\n }, [errorData, implementationData, space]);\n const errorId = errorData?.startsWith('0x') ? errorData.slice(0, 10) : null;\n const needErrorAbi =\n supportErrorAbi &&\n !!errorId &&\n // contract abi decoded failed\n !contractLoading &&\n (!decoded || decoded.failed) &&\n // implementation contract abi decoded failed\n !implementationLoading &&\n (!decodedByImplementation || decodedByImplementation.failed);\n const { data: errorAbiResponse, isLoading: errorAbiLoading } = useAbiItemById(\n errorId,\n 'error',\n needErrorAbi,\n );\n const decodedByErrorAbi = useMemo(() => {\n if (!errorAbiResponse || !errorData || !errorId) return null;\n const errorAbiList = errorAbiResponse?.error?.[errorId];\n // decode tx data with error abi only if there is only one abi\n if (!errorAbiList || errorAbiList.length !== 1) return null;\n const errorAbi = errorAbiList[0]!;\n try {\n // e.g. NotFromEntryPoint(address,address,address)\n const signature = errorAbi.signature;\n // e.g. error NotFromEntryPoint(address msgSender, address entity, address entryPoint)\n const fullFormat = errorAbi.fullFormat;\n const abi = formatABI([fullFormat || `error ${signature}`], {\n json: true,\n });\n const result = decodeErrorResult({\n abi: JSON.parse(abi),\n data: errorData,\n space,\n });\n return result as Result;\n } catch (error) {\n console.log('decode error data with error abi failed', error);\n return {\n errorName: 'unknown',\n failed: true,\n };\n }\n }, [errorAbiResponse, errorData, errorId, space]);\n\n return useMemo(() => {\n if (!errorData) return [null, false];\n if (decodedByStandardError && !decodedByStandardError.failed)\n return [decodedByStandardError, false];\n if (decodedByImplementation && !decodedByImplementation.failed)\n return [decodedByImplementation, implementationLoading];\n if (decoded && !decoded.failed) return [decoded, contractLoading];\n if (decodedByErrorAbi && !decodedByErrorAbi.failed)\n return [decodedByErrorAbi, errorAbiLoading];\n if (contractLoading || implementationLoading || errorAbiLoading)\n return [null, true];\n return [\n {\n errorName: 'unknown',\n noAbi:\n !decodedByStandardError &&\n !decodedByImplementation &&\n !decoded &&\n !decodedByErrorAbi,\n failed:\n decodedByStandardError?.failed ||\n decodedByImplementation?.failed ||\n decoded?.failed ||\n decodedByErrorAbi?.failed,\n },\n false,\n ];\n }, [\n errorData,\n decodedByStandardError,\n decoded,\n decodedByImplementation,\n decodedByErrorAbi,\n contractLoading,\n implementationLoading,\n errorAbiLoading,\n space,\n ]);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAe;AAaxB,IAAM,SAAS,CAAC,KAAc;AAYvB,IAAM,yBAAyB,CAAC;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MACF,CAAC;AACD,aAAO;AAAA,IACT,SAAS,OAAP;AACA,cAAQ,IAAI,2CAA2C,KAAK;AAC5D,aAAO;AAAA,QACL,WAAW;AAAA,QACX,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,EACF,GAAG,CAAC,kBAAkB,WAAW,SAAS,KAAK,CAAC;AAEhD,SAAO,QAAQ,MAAM;AACnB,QAAI,CAAC;AAAW,aAAO,CAAC,MAAM,KAAK;AACnC,QAAI,0BAA0B,CAAC,uBAAuB;AACpD,aAAO,CAAC,wBAAwB,KAAK;AACvC,QAAI,2BAA2B,CAAC,wBAAwB;AACtD,aAAO,CAAC,yBAAyB,qBAAqB;AACxD,QAAI,WAAW,CAAC,QAAQ;AAAQ,aAAO,CAAC,SAAS,eAAe;AAChE,QAAI,qBAAqB,CAAC,kBAAkB;AAC1C,aAAO,CAAC,mBAAmB,eAAe;AAC5C,QAAI,mBAAmB,yBAAyB;AAC9C,aAAO,CAAC,MAAM,IAAI;AACpB,WAAO;AAAA,MACL;AAAA,QACE,WAAW;AAAA,QACX,OACE,CAAC,0BACD,CAAC,2BACD,CAAC,WACD,CAAC;AAAA,QACH,QACE,wBAAwB,UACxB,yBAAyB,UACzB,SAAS,UACT,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,IACF;AAAA,EACF,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-BMO4IZHV.js";
|
|
30
30
|
import {
|
|
31
31
|
cn
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-G6N3L7XQ.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-HBJOTRGP.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
reqAbiById
|
|
3
|
+
} from "./chunk-473ZUYVX.js";
|
|
4
|
+
|
|
5
|
+
// src/utils/hooks/useAbiItemById.ts
|
|
6
|
+
import useSWRImmutable from "swr/immutable";
|
|
7
|
+
var useAbiItemById = (id, type = "function", shouldFetch = true) => {
|
|
8
|
+
return useSWRImmutable(
|
|
9
|
+
shouldFetch && id ? `abi-item-by-id:${id}-${type}` : null,
|
|
10
|
+
() => reqAbiById({
|
|
11
|
+
[type]: id
|
|
12
|
+
})
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
useAbiItemById
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=chunk-I5YTFVQB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/hooks/useAbiItemById.ts"],"sourcesContent":["import useSWRImmutable from 'swr/immutable';\nimport { reqAbiById } from '../request';\n\nexport const useAbiItemById = (\n id?: string | null,\n type: 'function' | 'event' | 'error' = 'function',\n shouldFetch = true,\n) => {\n return useSWRImmutable(\n shouldFetch && id ? `abi-item-by-id:${id}-${type}` : null,\n () =>\n reqAbiById({\n [type]: id,\n }),\n );\n};\n"],"mappings":";;;;;AAAA,OAAO,qBAAqB;AAGrB,IAAM,iBAAiB,CAC5B,IACA,OAAuC,YACvC,cAAc,SACX;AACH,SAAO;AAAA,IACL,eAAe,KAAK,kBAAkB,MAAM,SAAS;AAAA,IACrD,MACE,WAAW;AAAA,MACT,CAAC,IAAI,GAAG;AAAA,IACV,CAAC;AAAA,EACL;AACF;","names":[]}
|