@cfxjs/sirius-next-common 0.2.28 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ccip-DBSI27GO.js → ccip-4OIZJRM7.js} +3 -3
- package/dist/chunk-267JWZ3X.js +20 -0
- package/dist/chunk-267JWZ3X.js.map +1 -0
- package/dist/{chunk-WIB76E7O.js → chunk-2MY3T2VH.js} +2 -2
- package/dist/{chunk-CTHYDPXG.js → chunk-3CY7SRAN.js} +7 -7
- package/dist/{chunk-RP23W2AA.js → chunk-4QR5LKPG.js} +3 -3
- package/dist/{chunk-XZ7IV2FF.js → chunk-4WLXG7ZY.js} +2 -2
- package/dist/{chunk-YOI54A6M.js → chunk-5DFWDFAH.js} +2 -2
- package/dist/{chunk-XMBEB34D.js → chunk-5PYC44RX.js} +2 -2
- package/dist/{chunk-5H6N5Q5P.js → chunk-63ULYLAC.js} +3 -3
- package/dist/chunk-6JLI3Y4J.js +159 -0
- package/dist/chunk-6JLI3Y4J.js.map +1 -0
- package/dist/chunk-6JXQS4XH.js +14 -0
- package/dist/chunk-6JXQS4XH.js.map +1 -0
- package/dist/{chunk-RFN3GPMD.js → chunk-7BAN6GKP.js} +4 -4
- package/dist/chunk-7HK6APFZ.js +28 -0
- package/dist/chunk-7HK6APFZ.js.map +1 -0
- package/dist/{chunk-GLGZXDJJ.js → chunk-7JU7QHQV.js} +5 -5
- package/dist/chunk-7JU7QHQV.js.map +1 -0
- package/dist/{chunk-HBJOTRGP.js → chunk-7NVZPYT3.js} +2 -2
- package/dist/chunk-A3VDKIWS.js +60 -0
- package/dist/chunk-A3VDKIWS.js.map +1 -0
- package/dist/{chunk-3LFAB7KP.js → chunk-A64ILFRR.js} +5 -5
- package/dist/{chunk-CQ7PIGKY.js → chunk-AJB2BZ6T.js} +2 -2
- package/dist/{secp256k1-WGKMGTUQ.js → chunk-CGDNDBBP.js} +8 -7
- package/dist/{secp256k1-WGKMGTUQ.js.map → chunk-CGDNDBBP.js.map} +1 -1
- package/dist/{chunk-337L4DV3.js → chunk-CMM72NR3.js} +3 -3
- package/dist/{chunk-Z2UXDMUA.js → chunk-CWTDFCRF.js} +3 -3
- package/dist/{chunk-G6N3L7XQ.js → chunk-D6INJ4N5.js} +7 -5
- package/dist/chunk-D6INJ4N5.js.map +1 -0
- package/dist/{chunk-OSFR346H.js → chunk-E2X6TO6O.js} +15 -11
- package/dist/chunk-E2X6TO6O.js.map +1 -0
- package/dist/{chunk-473ZUYVX.js → chunk-EN25IHGP.js} +3 -3
- package/dist/{chunk-5FNTPYWO.js → chunk-EZVQ6JRV.js} +3 -3
- package/dist/{chunk-S7FVSBBH.js → chunk-FGUCFE4W.js} +2 -2
- package/dist/{chunk-Z7YF2BJY.js → chunk-G56ZGF4A.js} +2 -2
- package/dist/chunk-GNOB77UA.js +14 -0
- package/dist/chunk-GNOB77UA.js.map +1 -0
- package/dist/{chunk-XMIIVHXZ.js → chunk-HX46BO44.js} +10 -10
- package/dist/{chunk-5ZPPSS5X.js → chunk-IKPPUNBU.js} +2 -2
- package/dist/{chunk-VIXYY5CK.js → chunk-IXMDBWQH.js} +2 -2
- package/dist/{chunk-IUFQJFZW.js → chunk-IYEJLUAY.js} +11 -10
- package/dist/chunk-IYEJLUAY.js.map +1 -0
- package/dist/chunk-JLEQ7K57.js +23 -0
- package/dist/chunk-JLEQ7K57.js.map +1 -0
- package/dist/{chunk-OYESIV3F.js → chunk-JVCFVNGV.js} +12 -8
- package/dist/chunk-JVCFVNGV.js.map +1 -0
- package/dist/{chunk-DQGLZCIG.js → chunk-L4AFJGXJ.js} +1 -1
- package/dist/{chunk-DQGLZCIG.js.map → chunk-L4AFJGXJ.js.map} +1 -1
- package/dist/{chunk-4B6ASBYQ.js → chunk-LBAEFEJU.js} +10 -1
- package/dist/{chunk-4B6ASBYQ.js.map → chunk-LBAEFEJU.js.map} +1 -1
- package/dist/{chunk-H5ZIEB6Y.js → chunk-LN6OC6U3.js} +51 -25
- package/dist/chunk-LN6OC6U3.js.map +1 -0
- package/dist/{chunk-WREHZWND.js → chunk-MQZUIZMG.js} +8 -8
- package/dist/{chunk-I5YTFVQB.js → chunk-NDGJLSZN.js} +2 -2
- package/dist/chunk-NSSKV676.js +50 -0
- package/dist/chunk-NSSKV676.js.map +1 -0
- package/dist/{chunk-MOVBVQ73.js → chunk-NZ32DWUZ.js} +6 -6
- package/dist/chunk-PCTL7FBZ.js +10 -0
- package/dist/chunk-PCTL7FBZ.js.map +1 -0
- package/dist/{chunk-JIRLY7OG.js → chunk-S6O6Q2GQ.js} +1735 -174
- package/dist/chunk-S6O6Q2GQ.js.map +1 -0
- package/dist/{chunk-MKBKASBZ.js → chunk-SCTG3SCG.js} +3 -3
- package/dist/{chunk-RM25O3LE.js → chunk-SEIHZVZU.js} +2 -2
- package/dist/{chunk-X4VWQ2HL.js → chunk-SFULLYYL.js} +5 -5
- package/dist/{chunk-W2CLMFMA.js → chunk-T5IOTGTQ.js} +4 -4
- package/dist/{chunk-IW36ZVPL.js → chunk-UARYZ4C2.js} +2 -2
- package/dist/chunk-UKYPIPLP.js +21480 -0
- package/dist/chunk-UKYPIPLP.js.map +1 -0
- package/dist/chunk-VRA7CSHI.js +132 -0
- package/dist/chunk-VRA7CSHI.js.map +1 -0
- package/dist/{chunk-5L5VDFFK.js → chunk-VSVZWF66.js} +6 -6
- package/dist/chunk-VYI4IZMQ.js +9448 -0
- package/dist/chunk-VYI4IZMQ.js.map +1 -0
- package/dist/{chunk-EMY3TQJY.js → chunk-WJPIKXWT.js} +2 -2
- package/dist/{chunk-FJCNYFOG.js → chunk-WZ6MS4XP.js} +10 -10
- package/dist/{chunk-Y7OVL5US.js → chunk-XCLT7DP4.js} +2 -2
- package/dist/{chunk-H2HTJNMZ.js → chunk-XN2TDIIK.js} +2 -2
- package/dist/chunk-Y362QJNT.js +65 -0
- package/dist/chunk-Y362QJNT.js.map +1 -0
- package/dist/chunk-YEJRYVZ3.js +167 -0
- package/dist/chunk-YEJRYVZ3.js.map +1 -0
- package/dist/{chunk-J2I22Q2M.js → chunk-ZZLGINAC.js} +2 -2
- package/dist/components/AAFailedReason/index.js +13 -11
- package/dist/components/AAFailedReason/index.js.map +1 -1
- package/dist/components/AceEditor/index.js +7 -7
- package/dist/components/AddressContainer/CoreAddressContainer.js +13 -13
- package/dist/components/AddressContainer/EVMAddressContainer.js +12 -12
- package/dist/components/AddressContainer/addressSwitcher.js +10 -10
- package/dist/components/AddressContainer/addressView.js +9 -9
- package/dist/components/AddressContainer/label.js +6 -6
- package/dist/components/AddressContainer/utils.js +6 -6
- package/dist/components/Age/index.js +7 -7
- package/dist/components/AutoComplete/index.js +6 -6
- package/dist/components/Charts/ChartOptions.js +2 -2
- package/dist/components/Charts/PreviewChartTemplate.js +4 -4
- package/dist/components/Charts/PreviewTitle.js +2 -2
- package/dist/components/Charts/StockChartTemplate.js +4 -4
- package/dist/components/Collapse/index.d.ts +31 -0
- package/dist/components/Collapse/index.js +105 -0
- package/dist/components/Collapse/index.js.map +1 -0
- package/dist/components/ContractAbi/Error.d.ts +8 -0
- package/dist/components/ContractAbi/Error.js +8 -0
- package/dist/components/ContractAbi/Error.js.map +1 -0
- package/dist/components/ContractAbi/FuncBody.d.ts +9 -0
- package/dist/components/ContractAbi/FuncBody.js +8 -0
- package/dist/components/ContractAbi/FuncBody.js.map +1 -0
- package/dist/components/ContractAbi/FuncResponse.d.ts +13 -0
- package/dist/components/ContractAbi/FuncResponse.js +8 -0
- package/dist/components/ContractAbi/FuncResponse.js.map +1 -0
- package/dist/components/ContractAbi/IntValueFormatter.d.ts +9 -0
- package/dist/components/ContractAbi/IntValueFormatter.js +18 -0
- package/dist/components/ContractAbi/IntValueFormatter.js.map +1 -0
- package/dist/components/ContractAbi/OutputParams.d.ts +11 -0
- package/dist/components/ContractAbi/OutputParams.js +8 -0
- package/dist/components/ContractAbi/OutputParams.js.map +1 -0
- package/dist/components/ContractAbi/ParamTitle.d.ts +13 -0
- package/dist/components/ContractAbi/ParamTitle.js +20 -0
- package/dist/components/ContractAbi/ParamTitle.js.map +1 -0
- package/dist/components/ContractAbi/constants.d.ts +9 -0
- package/dist/components/ContractAbi/constants.js +10 -0
- package/dist/components/ContractAbi/constants.js.map +1 -0
- package/dist/components/ContractAbi/index.d.ts +10 -0
- package/dist/components/ContractAbi/index.js +52 -0
- package/dist/components/ContractAbi/index.js.map +1 -0
- package/dist/components/ContractAbi/utils.d.ts +9 -0
- package/dist/components/ContractAbi/utils.js +14 -0
- package/dist/components/ContractAbi/utils.js.map +1 -0
- package/dist/components/CookieTip/index.js +2 -2
- package/dist/components/CopyButton/index.d.ts +5 -2
- package/dist/components/CopyButton/index.js +50 -33
- package/dist/components/CopyButton/index.js.map +1 -1
- package/dist/components/DecimalsSelect/index.js +8 -131
- package/dist/components/DecimalsSelect/index.js.map +1 -1
- package/dist/components/DownloadCSV/index.js +7 -7
- package/dist/components/Empty/index.js +2 -2
- package/dist/components/GasPriceDropdown/index.js +5 -5
- package/dist/components/Highlight/index.d.ts +1 -1
- package/dist/components/Highlight/index.js +2 -2
- package/dist/components/Highlight/index.js.map +1 -1
- package/dist/components/IncreasePercent/index.js +5 -5
- package/dist/components/InfoIconWithTooltip/index.js +7 -7
- package/dist/components/InputData/AddressLabel.js +11 -11
- package/dist/components/InputData/ContractDetail.js +8 -8
- package/dist/components/InputData/FunctionName.d.ts +2 -0
- package/dist/components/InputData/GeneralDecode.js +1 -1
- package/dist/components/InputData/JsonDecode.d.ts +2 -0
- package/dist/components/InputData/JsonDecode.js +8 -8
- package/dist/components/InputData/OptimizationDecode.d.ts +4 -1
- package/dist/components/InputData/OptimizationDecode.js +15 -15
- package/dist/components/InputData/Original.d.ts +2 -1
- package/dist/components/InputData/Original.js +7 -1
- package/dist/components/InputData/UTF8.js +6 -6
- package/dist/components/InputData/index.d.ts +2 -0
- package/dist/components/InputData/index.js +21 -21
- package/dist/components/List/index.js +3 -3
- package/dist/components/Modal/index.js +6 -6
- package/dist/components/NetworkIcon/index.js +5 -5
- package/dist/components/OutputData/ErrorDecode.d.ts +10 -6
- package/dist/components/OutputData/ErrorDecode.js +26 -24
- package/dist/components/OutputData/index.d.ts +2 -0
- package/dist/components/OutputData/index.js +29 -27
- package/dist/components/PhishingAddressContainer/index.js +7 -7
- package/dist/components/Popover/index.js +6 -6
- package/dist/components/Price/index.js +6 -6
- package/dist/components/ProxyContractAddress/index.d.ts +2 -0
- package/dist/components/ProxyContractAddress/index.js +9 -9
- package/dist/components/Radio/index.js +5 -5
- package/dist/components/Remark/index.js +1 -1
- package/dist/components/SearchInput/index.js +7 -7
- package/dist/components/Select/index.js +7 -7
- package/dist/components/Select/select.js +6 -6
- package/dist/components/SmartAccountAddress/index.js +9 -9
- package/dist/components/Table/index.js +3 -3
- package/dist/components/Text/index.js +7 -7
- package/dist/components/Tooltip/index.js +6 -6
- package/dist/components/TransactionAction/coreTransactionAction.js +13 -13
- package/dist/components/TransactionAction/evmTransactionAction.js +12 -12
- package/dist/components/TransactionTrace/TraceDetail.d.ts +2 -0
- package/dist/components/TransactionTrace/TraceDetail.js +37 -35
- package/dist/components/TransactionTrace/TreeTraceTable.d.ts +2 -0
- package/dist/components/TransactionTrace/TreeTraceTable.js +40 -38
- package/dist/components/TransactionTrace/index.d.ts +2 -0
- package/dist/components/TransactionTrace/index.js +40 -38
- package/dist/secp256k1-2GKRGI5Q.js +17 -0
- package/dist/secp256k1-2GKRGI5Q.js.map +1 -0
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +1 -1
- package/dist/two-arrow-VZ3CKZHM.png +0 -0
- package/dist/uno.css +40 -4
- package/dist/utils/address.js +5 -5
- package/dist/utils/cive-plugins.d.ts +22 -0
- package/dist/utils/cive-plugins.js +17 -0
- package/dist/utils/cive-plugins.js.map +1 -0
- package/dist/utils/constants.js +2 -2
- package/dist/utils/contractManagerTool.js +5 -5
- package/dist/utils/hooks/useAbiItemById.js +4 -4
- package/dist/utils/hooks/useAddressLabel.js +6 -6
- package/dist/utils/hooks/useAddressNameMap.js +4 -4
- package/dist/utils/hooks/useAge.js +2 -2
- package/dist/utils/hooks/useAutoSetHolderFilterParams.js +5 -5
- package/dist/utils/hooks/useContractDetail.js +4 -4
- package/dist/utils/hooks/useDecodeFunctionData.d.ts +3 -1
- package/dist/utils/hooks/useDecodeFunctionData.js +15 -11
- package/dist/utils/hooks/useDecodeFunctionError.d.ts +9 -7
- package/dist/utils/hooks/useDecodeFunctionError.js +13 -11
- package/dist/utils/hooks/useDecodedDataType.d.ts +2 -0
- package/dist/utils/hooks/useENS.js +6 -6
- package/dist/utils/hooks/useEnhanceDataWithNameMap.js +4 -4
- package/dist/utils/hooks/useMethodAbi.js +4 -4
- package/dist/utils/hooks/useSimulateTrace.d.ts +71 -0
- package/dist/utils/hooks/useSimulateTrace.js +185 -0
- package/dist/utils/hooks/useSimulateTrace.js.map +1 -0
- package/dist/utils/hooks/useTableData.js +3 -3
- package/dist/utils/hooks/useTxTrace.d.ts +10 -3
- package/dist/utils/hooks/useTxTrace.js +16 -146
- package/dist/utils/hooks/useTxTrace.js.map +1 -1
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/index.js +7 -5
- package/dist/utils/pubsub.js +2 -2
- package/dist/utils/request.js +3 -3
- package/dist/utils/rpcRequest.js +2 -2
- package/dist/utils/sdk.d.ts +34 -9
- package/dist/utils/sdk.js +17 -7
- package/package.json +6 -3
- package/dist/chunk-5AM5HM3B.js +0 -10
- package/dist/chunk-5AM5HM3B.js.map +0 -1
- package/dist/chunk-6SXAFSBF.js +0 -1032
- package/dist/chunk-6SXAFSBF.js.map +0 -1
- package/dist/chunk-G6N3L7XQ.js.map +0 -1
- package/dist/chunk-GLGZXDJJ.js.map +0 -1
- package/dist/chunk-H5ZIEB6Y.js.map +0 -1
- package/dist/chunk-IUFQJFZW.js.map +0 -1
- package/dist/chunk-JIRLY7OG.js.map +0 -1
- package/dist/chunk-OSFR346H.js.map +0 -1
- package/dist/chunk-OYESIV3F.js.map +0 -1
- package/dist/chunk-SK75VWEO.js +0 -157
- package/dist/chunk-SK75VWEO.js.map +0 -1
- /package/dist/{ccip-DBSI27GO.js.map → ccip-4OIZJRM7.js.map} +0 -0
- /package/dist/{chunk-WIB76E7O.js.map → chunk-2MY3T2VH.js.map} +0 -0
- /package/dist/{chunk-CTHYDPXG.js.map → chunk-3CY7SRAN.js.map} +0 -0
- /package/dist/{chunk-RP23W2AA.js.map → chunk-4QR5LKPG.js.map} +0 -0
- /package/dist/{chunk-XZ7IV2FF.js.map → chunk-4WLXG7ZY.js.map} +0 -0
- /package/dist/{chunk-YOI54A6M.js.map → chunk-5DFWDFAH.js.map} +0 -0
- /package/dist/{chunk-XMBEB34D.js.map → chunk-5PYC44RX.js.map} +0 -0
- /package/dist/{chunk-5H6N5Q5P.js.map → chunk-63ULYLAC.js.map} +0 -0
- /package/dist/{chunk-RFN3GPMD.js.map → chunk-7BAN6GKP.js.map} +0 -0
- /package/dist/{chunk-HBJOTRGP.js.map → chunk-7NVZPYT3.js.map} +0 -0
- /package/dist/{chunk-3LFAB7KP.js.map → chunk-A64ILFRR.js.map} +0 -0
- /package/dist/{chunk-CQ7PIGKY.js.map → chunk-AJB2BZ6T.js.map} +0 -0
- /package/dist/{chunk-337L4DV3.js.map → chunk-CMM72NR3.js.map} +0 -0
- /package/dist/{chunk-Z2UXDMUA.js.map → chunk-CWTDFCRF.js.map} +0 -0
- /package/dist/{chunk-473ZUYVX.js.map → chunk-EN25IHGP.js.map} +0 -0
- /package/dist/{chunk-5FNTPYWO.js.map → chunk-EZVQ6JRV.js.map} +0 -0
- /package/dist/{chunk-S7FVSBBH.js.map → chunk-FGUCFE4W.js.map} +0 -0
- /package/dist/{chunk-Z7YF2BJY.js.map → chunk-G56ZGF4A.js.map} +0 -0
- /package/dist/{chunk-XMIIVHXZ.js.map → chunk-HX46BO44.js.map} +0 -0
- /package/dist/{chunk-5ZPPSS5X.js.map → chunk-IKPPUNBU.js.map} +0 -0
- /package/dist/{chunk-VIXYY5CK.js.map → chunk-IXMDBWQH.js.map} +0 -0
- /package/dist/{chunk-WREHZWND.js.map → chunk-MQZUIZMG.js.map} +0 -0
- /package/dist/{chunk-I5YTFVQB.js.map → chunk-NDGJLSZN.js.map} +0 -0
- /package/dist/{chunk-MOVBVQ73.js.map → chunk-NZ32DWUZ.js.map} +0 -0
- /package/dist/{chunk-MKBKASBZ.js.map → chunk-SCTG3SCG.js.map} +0 -0
- /package/dist/{chunk-RM25O3LE.js.map → chunk-SEIHZVZU.js.map} +0 -0
- /package/dist/{chunk-X4VWQ2HL.js.map → chunk-SFULLYYL.js.map} +0 -0
- /package/dist/{chunk-W2CLMFMA.js.map → chunk-T5IOTGTQ.js.map} +0 -0
- /package/dist/{chunk-IW36ZVPL.js.map → chunk-UARYZ4C2.js.map} +0 -0
- /package/dist/{chunk-5L5VDFFK.js.map → chunk-VSVZWF66.js.map} +0 -0
- /package/dist/{chunk-EMY3TQJY.js.map → chunk-WJPIKXWT.js.map} +0 -0
- /package/dist/{chunk-FJCNYFOG.js.map → chunk-WZ6MS4XP.js.map} +0 -0
- /package/dist/{chunk-Y7OVL5US.js.map → chunk-XCLT7DP4.js.map} +0 -0
- /package/dist/{chunk-H2HTJNMZ.js.map → chunk-XN2TDIIK.js.map} +0 -0
- /package/dist/{chunk-J2I22Q2M.js.map → chunk-ZZLGINAC.js.map} +0 -0
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
swap32IfBE,
|
|
15
15
|
toBytes,
|
|
16
16
|
u32
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LBAEFEJU.js";
|
|
18
18
|
|
|
19
19
|
// ../../node_modules/.pnpm/abitype@1.1.0_typescript@5.4.3_zod@3.25.76/node_modules/abitype/dist/esm/version.js
|
|
20
20
|
var version = "1.1.0";
|
|
@@ -829,31 +829,381 @@ function walk(err, fn) {
|
|
|
829
829
|
return fn ? null : err;
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
+
// ../../node_modules/.pnpm/ox@0.9.6_typescript@5.4.3_zod@3.25.76/node_modules/ox/_esm/core/internal/bytes.js
|
|
833
|
+
function assertSize(bytes, size_) {
|
|
834
|
+
if (size(bytes) > size_)
|
|
835
|
+
throw new SizeOverflowError({
|
|
836
|
+
givenSize: size(bytes),
|
|
837
|
+
maxSize: size_
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
function assertStartOffset(value, start) {
|
|
841
|
+
if (typeof start === "number" && start > 0 && start > size(value) - 1)
|
|
842
|
+
throw new SliceOffsetOutOfBoundsError({
|
|
843
|
+
offset: start,
|
|
844
|
+
position: "start",
|
|
845
|
+
size: size(value)
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
function assertEndOffset(value, start, end) {
|
|
849
|
+
if (typeof start === "number" && typeof end === "number" && size(value) !== end - start) {
|
|
850
|
+
throw new SliceOffsetOutOfBoundsError({
|
|
851
|
+
offset: end,
|
|
852
|
+
position: "end",
|
|
853
|
+
size: size(value)
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
var charCodeMap = {
|
|
858
|
+
zero: 48,
|
|
859
|
+
nine: 57,
|
|
860
|
+
A: 65,
|
|
861
|
+
F: 70,
|
|
862
|
+
a: 97,
|
|
863
|
+
f: 102
|
|
864
|
+
};
|
|
865
|
+
function charCodeToBase16(char) {
|
|
866
|
+
if (char >= charCodeMap.zero && char <= charCodeMap.nine)
|
|
867
|
+
return char - charCodeMap.zero;
|
|
868
|
+
if (char >= charCodeMap.A && char <= charCodeMap.F)
|
|
869
|
+
return char - (charCodeMap.A - 10);
|
|
870
|
+
if (char >= charCodeMap.a && char <= charCodeMap.f)
|
|
871
|
+
return char - (charCodeMap.a - 10);
|
|
872
|
+
return void 0;
|
|
873
|
+
}
|
|
874
|
+
function pad(bytes, options = {}) {
|
|
875
|
+
const { dir, size: size4 = 32 } = options;
|
|
876
|
+
if (size4 === 0)
|
|
877
|
+
return bytes;
|
|
878
|
+
if (bytes.length > size4)
|
|
879
|
+
throw new SizeExceedsPaddingSizeError({
|
|
880
|
+
size: bytes.length,
|
|
881
|
+
targetSize: size4,
|
|
882
|
+
type: "Bytes"
|
|
883
|
+
});
|
|
884
|
+
const paddedBytes = new Uint8Array(size4);
|
|
885
|
+
for (let i = 0; i < size4; i++) {
|
|
886
|
+
const padEnd = dir === "right";
|
|
887
|
+
paddedBytes[padEnd ? i : size4 - i - 1] = bytes[padEnd ? i : bytes.length - i - 1];
|
|
888
|
+
}
|
|
889
|
+
return paddedBytes;
|
|
890
|
+
}
|
|
891
|
+
function trim(value, options = {}) {
|
|
892
|
+
const { dir = "left" } = options;
|
|
893
|
+
let data = value;
|
|
894
|
+
let sliceLength = 0;
|
|
895
|
+
for (let i = 0; i < data.length - 1; i++) {
|
|
896
|
+
if (data[dir === "left" ? i : data.length - i - 1].toString() === "0")
|
|
897
|
+
sliceLength++;
|
|
898
|
+
else
|
|
899
|
+
break;
|
|
900
|
+
}
|
|
901
|
+
data = dir === "left" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);
|
|
902
|
+
return data;
|
|
903
|
+
}
|
|
904
|
+
|
|
832
905
|
// ../../node_modules/.pnpm/ox@0.9.6_typescript@5.4.3_zod@3.25.76/node_modules/ox/_esm/core/internal/hex.js
|
|
833
|
-
function
|
|
834
|
-
|
|
835
|
-
|
|
906
|
+
function assertSize2(hex, size_) {
|
|
907
|
+
if (size2(hex) > size_)
|
|
908
|
+
throw new SizeOverflowError2({
|
|
909
|
+
givenSize: size2(hex),
|
|
910
|
+
maxSize: size_
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
function assertStartOffset2(value, start) {
|
|
914
|
+
if (typeof start === "number" && start > 0 && start > size2(value) - 1)
|
|
915
|
+
throw new SliceOffsetOutOfBoundsError2({
|
|
916
|
+
offset: start,
|
|
917
|
+
position: "start",
|
|
918
|
+
size: size2(value)
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
function assertEndOffset2(value, start, end) {
|
|
922
|
+
if (typeof start === "number" && typeof end === "number" && size2(value) !== end - start) {
|
|
923
|
+
throw new SliceOffsetOutOfBoundsError2({
|
|
924
|
+
offset: end,
|
|
925
|
+
position: "end",
|
|
926
|
+
size: size2(value)
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
function pad2(hex_, options = {}) {
|
|
931
|
+
const { dir, size: size4 = 32 } = options;
|
|
932
|
+
if (size4 === 0)
|
|
836
933
|
return hex_;
|
|
837
934
|
const hex = hex_.replace("0x", "");
|
|
838
|
-
if (hex.length >
|
|
839
|
-
throw new
|
|
935
|
+
if (hex.length > size4 * 2)
|
|
936
|
+
throw new SizeExceedsPaddingSizeError2({
|
|
840
937
|
size: Math.ceil(hex.length / 2),
|
|
841
|
-
targetSize:
|
|
938
|
+
targetSize: size4,
|
|
842
939
|
type: "Hex"
|
|
843
940
|
});
|
|
844
|
-
return `0x${hex[dir === "right" ? "padEnd" : "padStart"](
|
|
941
|
+
return `0x${hex[dir === "right" ? "padEnd" : "padStart"](size4 * 2, "0")}`;
|
|
942
|
+
}
|
|
943
|
+
function trim2(value, options = {}) {
|
|
944
|
+
const { dir = "left" } = options;
|
|
945
|
+
let data = value.replace("0x", "");
|
|
946
|
+
let sliceLength = 0;
|
|
947
|
+
for (let i = 0; i < data.length - 1; i++) {
|
|
948
|
+
if (data[dir === "left" ? i : data.length - i - 1].toString() === "0")
|
|
949
|
+
sliceLength++;
|
|
950
|
+
else
|
|
951
|
+
break;
|
|
952
|
+
}
|
|
953
|
+
data = dir === "left" ? data.slice(sliceLength) : data.slice(0, data.length - sliceLength);
|
|
954
|
+
if (data === "0")
|
|
955
|
+
return "0x";
|
|
956
|
+
if (dir === "right" && data.length % 2 === 1)
|
|
957
|
+
return `0x${data}0`;
|
|
958
|
+
return `0x${data}`;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
// ../../node_modules/.pnpm/ox@0.9.6_typescript@5.4.3_zod@3.25.76/node_modules/ox/_esm/core/Json.js
|
|
962
|
+
var bigIntSuffix = "#__bigint";
|
|
963
|
+
function stringify(value, replacer, space) {
|
|
964
|
+
return JSON.stringify(value, (key, value2) => {
|
|
965
|
+
if (typeof replacer === "function")
|
|
966
|
+
return replacer(key, value2);
|
|
967
|
+
if (typeof value2 === "bigint")
|
|
968
|
+
return value2.toString() + bigIntSuffix;
|
|
969
|
+
return value2;
|
|
970
|
+
}, space);
|
|
845
971
|
}
|
|
846
972
|
|
|
973
|
+
// ../../node_modules/.pnpm/ox@0.9.6_typescript@5.4.3_zod@3.25.76/node_modules/ox/_esm/core/Bytes.js
|
|
974
|
+
var decoder = /* @__PURE__ */ new TextDecoder();
|
|
975
|
+
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
976
|
+
function assert(value) {
|
|
977
|
+
if (value instanceof Uint8Array)
|
|
978
|
+
return;
|
|
979
|
+
if (!value)
|
|
980
|
+
throw new InvalidBytesTypeError(value);
|
|
981
|
+
if (typeof value !== "object")
|
|
982
|
+
throw new InvalidBytesTypeError(value);
|
|
983
|
+
if (!("BYTES_PER_ELEMENT" in value))
|
|
984
|
+
throw new InvalidBytesTypeError(value);
|
|
985
|
+
if (value.BYTES_PER_ELEMENT !== 1 || value.constructor.name !== "Uint8Array")
|
|
986
|
+
throw new InvalidBytesTypeError(value);
|
|
987
|
+
}
|
|
988
|
+
function from(value) {
|
|
989
|
+
if (value instanceof Uint8Array)
|
|
990
|
+
return value;
|
|
991
|
+
if (typeof value === "string")
|
|
992
|
+
return fromHex(value);
|
|
993
|
+
return fromArray(value);
|
|
994
|
+
}
|
|
995
|
+
function fromArray(value) {
|
|
996
|
+
return value instanceof Uint8Array ? value : new Uint8Array(value);
|
|
997
|
+
}
|
|
998
|
+
function fromHex(value, options = {}) {
|
|
999
|
+
const { size: size4 } = options;
|
|
1000
|
+
let hex = value;
|
|
1001
|
+
if (size4) {
|
|
1002
|
+
assertSize2(value, size4);
|
|
1003
|
+
hex = padRight(value, size4);
|
|
1004
|
+
}
|
|
1005
|
+
let hexString = hex.slice(2);
|
|
1006
|
+
if (hexString.length % 2)
|
|
1007
|
+
hexString = `0${hexString}`;
|
|
1008
|
+
const length = hexString.length / 2;
|
|
1009
|
+
const bytes = new Uint8Array(length);
|
|
1010
|
+
for (let index = 0, j = 0; index < length; index++) {
|
|
1011
|
+
const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));
|
|
1012
|
+
const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));
|
|
1013
|
+
if (nibbleLeft === void 0 || nibbleRight === void 0) {
|
|
1014
|
+
throw new BaseError2(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
|
|
1015
|
+
}
|
|
1016
|
+
bytes[index] = nibbleLeft * 16 + nibbleRight;
|
|
1017
|
+
}
|
|
1018
|
+
return bytes;
|
|
1019
|
+
}
|
|
1020
|
+
function fromString(value, options = {}) {
|
|
1021
|
+
const { size: size4 } = options;
|
|
1022
|
+
const bytes = encoder.encode(value);
|
|
1023
|
+
if (typeof size4 === "number") {
|
|
1024
|
+
assertSize(bytes, size4);
|
|
1025
|
+
return padRight2(bytes, size4);
|
|
1026
|
+
}
|
|
1027
|
+
return bytes;
|
|
1028
|
+
}
|
|
1029
|
+
function padRight2(value, size4) {
|
|
1030
|
+
return pad(value, { dir: "right", size: size4 });
|
|
1031
|
+
}
|
|
1032
|
+
function size(value) {
|
|
1033
|
+
return value.length;
|
|
1034
|
+
}
|
|
1035
|
+
function slice(value, start, end, options = {}) {
|
|
1036
|
+
const { strict } = options;
|
|
1037
|
+
assertStartOffset(value, start);
|
|
1038
|
+
const value_ = value.slice(start, end);
|
|
1039
|
+
if (strict)
|
|
1040
|
+
assertEndOffset(value_, start, end);
|
|
1041
|
+
return value_;
|
|
1042
|
+
}
|
|
1043
|
+
function toBigInt2(bytes, options = {}) {
|
|
1044
|
+
const { size: size4 } = options;
|
|
1045
|
+
if (typeof size4 !== "undefined")
|
|
1046
|
+
assertSize(bytes, size4);
|
|
1047
|
+
const hex = fromBytes(bytes, options);
|
|
1048
|
+
return toBigInt(hex, options);
|
|
1049
|
+
}
|
|
1050
|
+
function toBoolean(bytes, options = {}) {
|
|
1051
|
+
const { size: size4 } = options;
|
|
1052
|
+
let bytes_ = bytes;
|
|
1053
|
+
if (typeof size4 !== "undefined") {
|
|
1054
|
+
assertSize(bytes_, size4);
|
|
1055
|
+
bytes_ = trimLeft(bytes_);
|
|
1056
|
+
}
|
|
1057
|
+
if (bytes_.length > 1 || bytes_[0] > 1)
|
|
1058
|
+
throw new InvalidBytesBooleanError(bytes_);
|
|
1059
|
+
return Boolean(bytes_[0]);
|
|
1060
|
+
}
|
|
1061
|
+
function toNumber2(bytes, options = {}) {
|
|
1062
|
+
const { size: size4 } = options;
|
|
1063
|
+
if (typeof size4 !== "undefined")
|
|
1064
|
+
assertSize(bytes, size4);
|
|
1065
|
+
const hex = fromBytes(bytes, options);
|
|
1066
|
+
return toNumber(hex, options);
|
|
1067
|
+
}
|
|
1068
|
+
function toString(bytes, options = {}) {
|
|
1069
|
+
const { size: size4 } = options;
|
|
1070
|
+
let bytes_ = bytes;
|
|
1071
|
+
if (typeof size4 !== "undefined") {
|
|
1072
|
+
assertSize(bytes_, size4);
|
|
1073
|
+
bytes_ = trimRight(bytes_);
|
|
1074
|
+
}
|
|
1075
|
+
return decoder.decode(bytes_);
|
|
1076
|
+
}
|
|
1077
|
+
function trimLeft(value) {
|
|
1078
|
+
return trim(value, { dir: "left" });
|
|
1079
|
+
}
|
|
1080
|
+
function trimRight(value) {
|
|
1081
|
+
return trim(value, { dir: "right" });
|
|
1082
|
+
}
|
|
1083
|
+
function validate(value) {
|
|
1084
|
+
try {
|
|
1085
|
+
assert(value);
|
|
1086
|
+
return true;
|
|
1087
|
+
} catch {
|
|
1088
|
+
return false;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
var InvalidBytesBooleanError = class extends BaseError2 {
|
|
1092
|
+
constructor(bytes) {
|
|
1093
|
+
super(`Bytes value \`${bytes}\` is not a valid boolean.`, {
|
|
1094
|
+
metaMessages: [
|
|
1095
|
+
"The bytes array must contain a single byte of either a `0` or `1` value."
|
|
1096
|
+
]
|
|
1097
|
+
});
|
|
1098
|
+
Object.defineProperty(this, "name", {
|
|
1099
|
+
enumerable: true,
|
|
1100
|
+
configurable: true,
|
|
1101
|
+
writable: true,
|
|
1102
|
+
value: "Bytes.InvalidBytesBooleanError"
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
var InvalidBytesTypeError = class extends BaseError2 {
|
|
1107
|
+
constructor(value) {
|
|
1108
|
+
super(`Value \`${typeof value === "object" ? stringify(value) : value}\` of type \`${typeof value}\` is an invalid Bytes value.`, {
|
|
1109
|
+
metaMessages: ["Bytes values must be of type `Bytes`."]
|
|
1110
|
+
});
|
|
1111
|
+
Object.defineProperty(this, "name", {
|
|
1112
|
+
enumerable: true,
|
|
1113
|
+
configurable: true,
|
|
1114
|
+
writable: true,
|
|
1115
|
+
value: "Bytes.InvalidBytesTypeError"
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
var SizeOverflowError = class extends BaseError2 {
|
|
1120
|
+
constructor({ givenSize, maxSize }) {
|
|
1121
|
+
super(`Size cannot exceed \`${maxSize}\` bytes. Given size: \`${givenSize}\` bytes.`);
|
|
1122
|
+
Object.defineProperty(this, "name", {
|
|
1123
|
+
enumerable: true,
|
|
1124
|
+
configurable: true,
|
|
1125
|
+
writable: true,
|
|
1126
|
+
value: "Bytes.SizeOverflowError"
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
};
|
|
1130
|
+
var SliceOffsetOutOfBoundsError = class extends BaseError2 {
|
|
1131
|
+
constructor({ offset, position, size: size4 }) {
|
|
1132
|
+
super(`Slice ${position === "start" ? "starting" : "ending"} at offset \`${offset}\` is out-of-bounds (size: \`${size4}\`).`);
|
|
1133
|
+
Object.defineProperty(this, "name", {
|
|
1134
|
+
enumerable: true,
|
|
1135
|
+
configurable: true,
|
|
1136
|
+
writable: true,
|
|
1137
|
+
value: "Bytes.SliceOffsetOutOfBoundsError"
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
};
|
|
1141
|
+
var SizeExceedsPaddingSizeError = class extends BaseError2 {
|
|
1142
|
+
constructor({ size: size4, targetSize, type }) {
|
|
1143
|
+
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\`${size4}\`) exceeds padding size (\`${targetSize}\`).`);
|
|
1144
|
+
Object.defineProperty(this, "name", {
|
|
1145
|
+
enumerable: true,
|
|
1146
|
+
configurable: true,
|
|
1147
|
+
writable: true,
|
|
1148
|
+
value: "Bytes.SizeExceedsPaddingSizeError"
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
};
|
|
1152
|
+
|
|
847
1153
|
// ../../node_modules/.pnpm/ox@0.9.6_typescript@5.4.3_zod@3.25.76/node_modules/ox/_esm/core/Hex.js
|
|
1154
|
+
var encoder2 = /* @__PURE__ */ new TextEncoder();
|
|
1155
|
+
var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
|
|
1156
|
+
function assert2(value, options = {}) {
|
|
1157
|
+
const { strict = false } = options;
|
|
1158
|
+
if (!value)
|
|
1159
|
+
throw new InvalidHexTypeError(value);
|
|
1160
|
+
if (typeof value !== "string")
|
|
1161
|
+
throw new InvalidHexTypeError(value);
|
|
1162
|
+
if (strict) {
|
|
1163
|
+
if (!/^0x[0-9a-fA-F]*$/.test(value))
|
|
1164
|
+
throw new InvalidHexValueError(value);
|
|
1165
|
+
}
|
|
1166
|
+
if (!value.startsWith("0x"))
|
|
1167
|
+
throw new InvalidHexValueError(value);
|
|
1168
|
+
}
|
|
1169
|
+
function concat(...values) {
|
|
1170
|
+
return `0x${values.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
|
1171
|
+
}
|
|
1172
|
+
function from2(value) {
|
|
1173
|
+
if (value instanceof Uint8Array)
|
|
1174
|
+
return fromBytes(value);
|
|
1175
|
+
if (Array.isArray(value))
|
|
1176
|
+
return fromBytes(new Uint8Array(value));
|
|
1177
|
+
return value;
|
|
1178
|
+
}
|
|
1179
|
+
function fromBoolean(value, options = {}) {
|
|
1180
|
+
const hex = `0x${Number(value)}`;
|
|
1181
|
+
if (typeof options.size === "number") {
|
|
1182
|
+
assertSize2(hex, options.size);
|
|
1183
|
+
return padLeft(hex, options.size);
|
|
1184
|
+
}
|
|
1185
|
+
return hex;
|
|
1186
|
+
}
|
|
1187
|
+
function fromBytes(value, options = {}) {
|
|
1188
|
+
let string = "";
|
|
1189
|
+
for (let i = 0; i < value.length; i++)
|
|
1190
|
+
string += hexes[value[i]];
|
|
1191
|
+
const hex = `0x${string}`;
|
|
1192
|
+
if (typeof options.size === "number") {
|
|
1193
|
+
assertSize2(hex, options.size);
|
|
1194
|
+
return padRight(hex, options.size);
|
|
1195
|
+
}
|
|
1196
|
+
return hex;
|
|
1197
|
+
}
|
|
848
1198
|
function fromNumber(value, options = {}) {
|
|
849
|
-
const { signed, size:
|
|
1199
|
+
const { signed, size: size4 } = options;
|
|
850
1200
|
const value_ = BigInt(value);
|
|
851
1201
|
let maxValue;
|
|
852
|
-
if (
|
|
1202
|
+
if (size4) {
|
|
853
1203
|
if (signed)
|
|
854
|
-
maxValue = (1n << BigInt(
|
|
1204
|
+
maxValue = (1n << BigInt(size4) * 8n - 1n) - 1n;
|
|
855
1205
|
else
|
|
856
|
-
maxValue = 2n ** (BigInt(
|
|
1206
|
+
maxValue = 2n ** (BigInt(size4) * 8n) - 1n;
|
|
857
1207
|
} else if (typeof value === "number") {
|
|
858
1208
|
maxValue = BigInt(Number.MAX_SAFE_INTEGER);
|
|
859
1209
|
}
|
|
@@ -864,22 +1214,71 @@ function fromNumber(value, options = {}) {
|
|
|
864
1214
|
max: maxValue ? `${maxValue}${suffix}` : void 0,
|
|
865
1215
|
min: `${minValue}${suffix}`,
|
|
866
1216
|
signed,
|
|
867
|
-
size:
|
|
1217
|
+
size: size4,
|
|
868
1218
|
value: `${value}${suffix}`
|
|
869
1219
|
});
|
|
870
1220
|
}
|
|
871
|
-
const stringValue = (signed && value_ < 0 ? (1n << BigInt(
|
|
1221
|
+
const stringValue = (signed && value_ < 0 ? (1n << BigInt(size4 * 8)) + BigInt(value_) : value_).toString(16);
|
|
872
1222
|
const hex = `0x${stringValue}`;
|
|
873
|
-
if (
|
|
874
|
-
return padLeft(hex,
|
|
1223
|
+
if (size4)
|
|
1224
|
+
return padLeft(hex, size4);
|
|
875
1225
|
return hex;
|
|
876
1226
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
1227
|
+
function fromString2(value, options = {}) {
|
|
1228
|
+
return fromBytes(encoder2.encode(value), options);
|
|
1229
|
+
}
|
|
1230
|
+
function padLeft(value, size4) {
|
|
1231
|
+
return pad2(value, { dir: "left", size: size4 });
|
|
1232
|
+
}
|
|
1233
|
+
function padRight(value, size4) {
|
|
1234
|
+
return pad2(value, { dir: "right", size: size4 });
|
|
1235
|
+
}
|
|
1236
|
+
function slice2(value, start, end, options = {}) {
|
|
1237
|
+
const { strict } = options;
|
|
1238
|
+
assertStartOffset2(value, start);
|
|
1239
|
+
const value_ = `0x${value.replace("0x", "").slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;
|
|
1240
|
+
if (strict)
|
|
1241
|
+
assertEndOffset2(value_, start, end);
|
|
1242
|
+
return value_;
|
|
1243
|
+
}
|
|
1244
|
+
function size2(value) {
|
|
1245
|
+
return Math.ceil((value.length - 2) / 2);
|
|
1246
|
+
}
|
|
1247
|
+
function trimLeft2(value) {
|
|
1248
|
+
return trim2(value, { dir: "left" });
|
|
1249
|
+
}
|
|
1250
|
+
function toBigInt(hex, options = {}) {
|
|
1251
|
+
const { signed } = options;
|
|
1252
|
+
if (options.size)
|
|
1253
|
+
assertSize2(hex, options.size);
|
|
1254
|
+
const value = BigInt(hex);
|
|
1255
|
+
if (!signed)
|
|
1256
|
+
return value;
|
|
1257
|
+
const size4 = (hex.length - 2) / 2;
|
|
1258
|
+
const max_unsigned = (1n << BigInt(size4) * 8n) - 1n;
|
|
1259
|
+
const max_signed = max_unsigned >> 1n;
|
|
1260
|
+
if (value <= max_signed)
|
|
1261
|
+
return value;
|
|
1262
|
+
return value - max_unsigned - 1n;
|
|
1263
|
+
}
|
|
1264
|
+
function toNumber(hex, options = {}) {
|
|
1265
|
+
const { signed, size: size4 } = options;
|
|
1266
|
+
if (!signed && !size4)
|
|
1267
|
+
return Number(hex);
|
|
1268
|
+
return Number(toBigInt(hex, options));
|
|
1269
|
+
}
|
|
1270
|
+
function validate2(value, options = {}) {
|
|
1271
|
+
const { strict = false } = options;
|
|
1272
|
+
try {
|
|
1273
|
+
assert2(value, { strict });
|
|
1274
|
+
return true;
|
|
1275
|
+
} catch {
|
|
1276
|
+
return false;
|
|
1277
|
+
}
|
|
879
1278
|
}
|
|
880
1279
|
var IntegerOutOfRangeError = class extends BaseError2 {
|
|
881
|
-
constructor({ max, min, signed, size:
|
|
882
|
-
super(`Number \`${value}\` is not in safe${
|
|
1280
|
+
constructor({ max, min, signed, size: size4, value }) {
|
|
1281
|
+
super(`Number \`${value}\` is not in safe${size4 ? ` ${size4 * 8}-bit` : ""}${signed ? " signed" : " unsigned"} integer range ${max ? `(\`${min}\` to \`${max}\`)` : `(above \`${min}\`)`}`);
|
|
883
1282
|
Object.defineProperty(this, "name", {
|
|
884
1283
|
enumerable: true,
|
|
885
1284
|
configurable: true,
|
|
@@ -888,9 +1287,59 @@ var IntegerOutOfRangeError = class extends BaseError2 {
|
|
|
888
1287
|
});
|
|
889
1288
|
}
|
|
890
1289
|
};
|
|
891
|
-
var
|
|
892
|
-
constructor(
|
|
893
|
-
super(
|
|
1290
|
+
var InvalidHexTypeError = class extends BaseError2 {
|
|
1291
|
+
constructor(value) {
|
|
1292
|
+
super(`Value \`${typeof value === "object" ? stringify(value) : value}\` of type \`${typeof value}\` is an invalid hex type.`, {
|
|
1293
|
+
metaMessages: ['Hex types must be represented as `"0x${string}"`.']
|
|
1294
|
+
});
|
|
1295
|
+
Object.defineProperty(this, "name", {
|
|
1296
|
+
enumerable: true,
|
|
1297
|
+
configurable: true,
|
|
1298
|
+
writable: true,
|
|
1299
|
+
value: "Hex.InvalidHexTypeError"
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
};
|
|
1303
|
+
var InvalidHexValueError = class extends BaseError2 {
|
|
1304
|
+
constructor(value) {
|
|
1305
|
+
super(`Value \`${value}\` is an invalid hex value.`, {
|
|
1306
|
+
metaMessages: [
|
|
1307
|
+
'Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).'
|
|
1308
|
+
]
|
|
1309
|
+
});
|
|
1310
|
+
Object.defineProperty(this, "name", {
|
|
1311
|
+
enumerable: true,
|
|
1312
|
+
configurable: true,
|
|
1313
|
+
writable: true,
|
|
1314
|
+
value: "Hex.InvalidHexValueError"
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
var SizeOverflowError2 = class extends BaseError2 {
|
|
1319
|
+
constructor({ givenSize, maxSize }) {
|
|
1320
|
+
super(`Size cannot exceed \`${maxSize}\` bytes. Given size: \`${givenSize}\` bytes.`);
|
|
1321
|
+
Object.defineProperty(this, "name", {
|
|
1322
|
+
enumerable: true,
|
|
1323
|
+
configurable: true,
|
|
1324
|
+
writable: true,
|
|
1325
|
+
value: "Hex.SizeOverflowError"
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
var SliceOffsetOutOfBoundsError2 = class extends BaseError2 {
|
|
1330
|
+
constructor({ offset, position, size: size4 }) {
|
|
1331
|
+
super(`Slice ${position === "start" ? "starting" : "ending"} at offset \`${offset}\` is out-of-bounds (size: \`${size4}\`).`);
|
|
1332
|
+
Object.defineProperty(this, "name", {
|
|
1333
|
+
enumerable: true,
|
|
1334
|
+
configurable: true,
|
|
1335
|
+
writable: true,
|
|
1336
|
+
value: "Hex.SliceOffsetOutOfBoundsError"
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
var SizeExceedsPaddingSizeError2 = class extends BaseError2 {
|
|
1341
|
+
constructor({ size: size4, targetSize, type }) {
|
|
1342
|
+
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (\`${size4}\`) exceeds padding size (\`${targetSize}\`).`);
|
|
894
1343
|
Object.defineProperty(this, "name", {
|
|
895
1344
|
enumerable: true,
|
|
896
1345
|
configurable: true,
|
|
@@ -1195,6 +1644,93 @@ var universalResolverReverseAbi = [
|
|
|
1195
1644
|
]
|
|
1196
1645
|
}
|
|
1197
1646
|
];
|
|
1647
|
+
var textResolverAbi = [
|
|
1648
|
+
{
|
|
1649
|
+
name: "text",
|
|
1650
|
+
type: "function",
|
|
1651
|
+
stateMutability: "view",
|
|
1652
|
+
inputs: [
|
|
1653
|
+
{ name: "name", type: "bytes32" },
|
|
1654
|
+
{ name: "key", type: "string" }
|
|
1655
|
+
],
|
|
1656
|
+
outputs: [{ name: "", type: "string" }]
|
|
1657
|
+
}
|
|
1658
|
+
];
|
|
1659
|
+
var addressResolverAbi = [
|
|
1660
|
+
{
|
|
1661
|
+
name: "addr",
|
|
1662
|
+
type: "function",
|
|
1663
|
+
stateMutability: "view",
|
|
1664
|
+
inputs: [{ name: "name", type: "bytes32" }],
|
|
1665
|
+
outputs: [{ name: "", type: "address" }]
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
name: "addr",
|
|
1669
|
+
type: "function",
|
|
1670
|
+
stateMutability: "view",
|
|
1671
|
+
inputs: [
|
|
1672
|
+
{ name: "name", type: "bytes32" },
|
|
1673
|
+
{ name: "coinType", type: "uint256" }
|
|
1674
|
+
],
|
|
1675
|
+
outputs: [{ name: "", type: "bytes" }]
|
|
1676
|
+
}
|
|
1677
|
+
];
|
|
1678
|
+
var erc1271Abi = [
|
|
1679
|
+
{
|
|
1680
|
+
name: "isValidSignature",
|
|
1681
|
+
type: "function",
|
|
1682
|
+
stateMutability: "view",
|
|
1683
|
+
inputs: [
|
|
1684
|
+
{ name: "hash", type: "bytes32" },
|
|
1685
|
+
{ name: "signature", type: "bytes" }
|
|
1686
|
+
],
|
|
1687
|
+
outputs: [{ name: "", type: "bytes4" }]
|
|
1688
|
+
}
|
|
1689
|
+
];
|
|
1690
|
+
var erc6492SignatureValidatorAbi = [
|
|
1691
|
+
{
|
|
1692
|
+
inputs: [
|
|
1693
|
+
{
|
|
1694
|
+
name: "_signer",
|
|
1695
|
+
type: "address"
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
name: "_hash",
|
|
1699
|
+
type: "bytes32"
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
name: "_signature",
|
|
1703
|
+
type: "bytes"
|
|
1704
|
+
}
|
|
1705
|
+
],
|
|
1706
|
+
stateMutability: "nonpayable",
|
|
1707
|
+
type: "constructor"
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
inputs: [
|
|
1711
|
+
{
|
|
1712
|
+
name: "_signer",
|
|
1713
|
+
type: "address"
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
name: "_hash",
|
|
1717
|
+
type: "bytes32"
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
name: "_signature",
|
|
1721
|
+
type: "bytes"
|
|
1722
|
+
}
|
|
1723
|
+
],
|
|
1724
|
+
outputs: [
|
|
1725
|
+
{
|
|
1726
|
+
type: "bool"
|
|
1727
|
+
}
|
|
1728
|
+
],
|
|
1729
|
+
stateMutability: "nonpayable",
|
|
1730
|
+
type: "function",
|
|
1731
|
+
name: "isValidSig"
|
|
1732
|
+
}
|
|
1733
|
+
];
|
|
1198
1734
|
|
|
1199
1735
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/constants/contract.js
|
|
1200
1736
|
var aggregate3Signature = "0x82ad56cb";
|
|
@@ -1202,6 +1738,7 @@ var aggregate3Signature = "0x82ad56cb";
|
|
|
1202
1738
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/constants/contracts.js
|
|
1203
1739
|
var deploylessCallViaBytecodeBytecode = "0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe";
|
|
1204
1740
|
var deploylessCallViaFactoryBytecode = "0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";
|
|
1741
|
+
var erc6492SignatureValidatorByteCode = "0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";
|
|
1205
1742
|
var multicall3Bytecode = "0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";
|
|
1206
1743
|
|
|
1207
1744
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/errors/version.js
|
|
@@ -1316,6 +1853,17 @@ var ClientChainNotConfiguredError = class extends BaseError3 {
|
|
|
1316
1853
|
};
|
|
1317
1854
|
|
|
1318
1855
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/constants/solidity.js
|
|
1856
|
+
var panicReasons = {
|
|
1857
|
+
1: "An `assert` condition failed.",
|
|
1858
|
+
17: "Arithmetic operation resulted in underflow or overflow.",
|
|
1859
|
+
18: "Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",
|
|
1860
|
+
33: "Attempted to convert to an invalid type.",
|
|
1861
|
+
34: "Attempted to access a storage byte array that is incorrectly encoded.",
|
|
1862
|
+
49: "Performed `.pop()` on an empty array",
|
|
1863
|
+
50: "Array index is out of bounds.",
|
|
1864
|
+
65: "Allocated too much memory or created an array which is too large.",
|
|
1865
|
+
81: "Attempted to call a zero-initialized variable of internal function type."
|
|
1866
|
+
};
|
|
1319
1867
|
var solidityError = {
|
|
1320
1868
|
inputs: [
|
|
1321
1869
|
{
|
|
@@ -1365,7 +1913,7 @@ function isHex(value, { strict = true } = {}) {
|
|
|
1365
1913
|
}
|
|
1366
1914
|
|
|
1367
1915
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/data/size.js
|
|
1368
|
-
function
|
|
1916
|
+
function size3(value) {
|
|
1369
1917
|
if (isHex(value, { strict: false }))
|
|
1370
1918
|
return Math.ceil((value.length - 2) / 2);
|
|
1371
1919
|
return value.length;
|
|
@@ -1395,11 +1943,11 @@ var AbiConstructorParamsNotFoundError = class extends BaseError3 {
|
|
|
1395
1943
|
}
|
|
1396
1944
|
};
|
|
1397
1945
|
var AbiDecodingDataSizeTooSmallError = class extends BaseError3 {
|
|
1398
|
-
constructor({ data, params, size:
|
|
1399
|
-
super([`Data size of ${
|
|
1946
|
+
constructor({ data, params, size: size4 }) {
|
|
1947
|
+
super([`Data size of ${size4} bytes is too small for given parameters.`].join("\n"), {
|
|
1400
1948
|
metaMessages: [
|
|
1401
1949
|
`Params: (${formatAbiParams(params, { includeName: true })})`,
|
|
1402
|
-
`Data: ${data} (${
|
|
1950
|
+
`Data: ${data} (${size4} bytes)`
|
|
1403
1951
|
],
|
|
1404
1952
|
name: "AbiDecodingDataSizeTooSmallError"
|
|
1405
1953
|
});
|
|
@@ -1423,7 +1971,7 @@ var AbiDecodingDataSizeTooSmallError = class extends BaseError3 {
|
|
|
1423
1971
|
});
|
|
1424
1972
|
this.data = data;
|
|
1425
1973
|
this.params = params;
|
|
1426
|
-
this.size =
|
|
1974
|
+
this.size = size4;
|
|
1427
1975
|
}
|
|
1428
1976
|
};
|
|
1429
1977
|
var AbiDecodingZeroDataError = class extends BaseError3 {
|
|
@@ -1444,7 +1992,7 @@ var AbiEncodingArrayLengthMismatchError = class extends BaseError3 {
|
|
|
1444
1992
|
};
|
|
1445
1993
|
var AbiEncodingBytesSizeMismatchError = class extends BaseError3 {
|
|
1446
1994
|
constructor({ expectedSize, value }) {
|
|
1447
|
-
super(`Size of bytes "${value}" (bytes${
|
|
1995
|
+
super(`Size of bytes "${value}" (bytes${size3(value)}) does not match expected size (bytes${expectedSize}).`, { name: "AbiEncodingBytesSizeMismatchError" });
|
|
1448
1996
|
}
|
|
1449
1997
|
};
|
|
1450
1998
|
var AbiEncodingLengthMismatchError = class extends BaseError3 {
|
|
@@ -1498,6 +2046,37 @@ var AbiErrorSignatureNotFoundError = class extends BaseError3 {
|
|
|
1498
2046
|
this.signature = signature;
|
|
1499
2047
|
}
|
|
1500
2048
|
};
|
|
2049
|
+
var AbiEventSignatureEmptyTopicsError = class extends BaseError3 {
|
|
2050
|
+
constructor({ docsPath: docsPath6 }) {
|
|
2051
|
+
super("Cannot extract event signature from empty topics.", {
|
|
2052
|
+
docsPath: docsPath6,
|
|
2053
|
+
name: "AbiEventSignatureEmptyTopicsError"
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
};
|
|
2057
|
+
var AbiEventSignatureNotFoundError = class extends BaseError3 {
|
|
2058
|
+
constructor(signature, { docsPath: docsPath6 }) {
|
|
2059
|
+
super([
|
|
2060
|
+
`Encoded event signature "${signature}" not found on ABI.`,
|
|
2061
|
+
"Make sure you are using the correct ABI and that the event exists on it.",
|
|
2062
|
+
`You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`
|
|
2063
|
+
].join("\n"), {
|
|
2064
|
+
docsPath: docsPath6,
|
|
2065
|
+
name: "AbiEventSignatureNotFoundError"
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2068
|
+
};
|
|
2069
|
+
var AbiEventNotFoundError = class extends BaseError3 {
|
|
2070
|
+
constructor(eventName, { docsPath: docsPath6 } = {}) {
|
|
2071
|
+
super([
|
|
2072
|
+
`Event ${eventName ? `"${eventName}" ` : ""}not found on ABI.`,
|
|
2073
|
+
"Make sure you are using the correct ABI and that the event exists on it."
|
|
2074
|
+
].join("\n"), {
|
|
2075
|
+
docsPath: docsPath6,
|
|
2076
|
+
name: "AbiEventNotFoundError"
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
};
|
|
1501
2080
|
var AbiFunctionNotFoundError = class extends BaseError3 {
|
|
1502
2081
|
constructor(functionName, { docsPath: docsPath6 } = {}) {
|
|
1503
2082
|
super([
|
|
@@ -1547,6 +2126,68 @@ var AbiItemAmbiguityError = class extends BaseError3 {
|
|
|
1547
2126
|
});
|
|
1548
2127
|
}
|
|
1549
2128
|
};
|
|
2129
|
+
var BytesSizeMismatchError = class extends BaseError3 {
|
|
2130
|
+
constructor({ expectedSize, givenSize }) {
|
|
2131
|
+
super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {
|
|
2132
|
+
name: "BytesSizeMismatchError"
|
|
2133
|
+
});
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
var DecodeLogDataMismatch = class extends BaseError3 {
|
|
2137
|
+
constructor({ abiItem, data, params, size: size4 }) {
|
|
2138
|
+
super([
|
|
2139
|
+
`Data size of ${size4} bytes is too small for non-indexed event parameters.`
|
|
2140
|
+
].join("\n"), {
|
|
2141
|
+
metaMessages: [
|
|
2142
|
+
`Params: (${formatAbiParams(params, { includeName: true })})`,
|
|
2143
|
+
`Data: ${data} (${size4} bytes)`
|
|
2144
|
+
],
|
|
2145
|
+
name: "DecodeLogDataMismatch"
|
|
2146
|
+
});
|
|
2147
|
+
Object.defineProperty(this, "abiItem", {
|
|
2148
|
+
enumerable: true,
|
|
2149
|
+
configurable: true,
|
|
2150
|
+
writable: true,
|
|
2151
|
+
value: void 0
|
|
2152
|
+
});
|
|
2153
|
+
Object.defineProperty(this, "data", {
|
|
2154
|
+
enumerable: true,
|
|
2155
|
+
configurable: true,
|
|
2156
|
+
writable: true,
|
|
2157
|
+
value: void 0
|
|
2158
|
+
});
|
|
2159
|
+
Object.defineProperty(this, "params", {
|
|
2160
|
+
enumerable: true,
|
|
2161
|
+
configurable: true,
|
|
2162
|
+
writable: true,
|
|
2163
|
+
value: void 0
|
|
2164
|
+
});
|
|
2165
|
+
Object.defineProperty(this, "size", {
|
|
2166
|
+
enumerable: true,
|
|
2167
|
+
configurable: true,
|
|
2168
|
+
writable: true,
|
|
2169
|
+
value: void 0
|
|
2170
|
+
});
|
|
2171
|
+
this.abiItem = abiItem;
|
|
2172
|
+
this.data = data;
|
|
2173
|
+
this.params = params;
|
|
2174
|
+
this.size = size4;
|
|
2175
|
+
}
|
|
2176
|
+
};
|
|
2177
|
+
var DecodeLogTopicsMismatch = class extends BaseError3 {
|
|
2178
|
+
constructor({ abiItem, param }) {
|
|
2179
|
+
super([
|
|
2180
|
+
`Expected a topic for indexed event parameter${param.name ? ` "${param.name}"` : ""} on event "${formatAbiItem2(abiItem, { includeName: true })}".`
|
|
2181
|
+
].join("\n"), { name: "DecodeLogTopicsMismatch" });
|
|
2182
|
+
Object.defineProperty(this, "abiItem", {
|
|
2183
|
+
enumerable: true,
|
|
2184
|
+
configurable: true,
|
|
2185
|
+
writable: true,
|
|
2186
|
+
value: void 0
|
|
2187
|
+
});
|
|
2188
|
+
this.abiItem = abiItem;
|
|
2189
|
+
}
|
|
2190
|
+
};
|
|
1550
2191
|
var InvalidAbiEncodingTypeError = class extends BaseError3 {
|
|
1551
2192
|
constructor(type, { docsPath: docsPath6 }) {
|
|
1552
2193
|
super([
|
|
@@ -1580,24 +2221,24 @@ var InvalidDefinitionTypeError = class extends BaseError3 {
|
|
|
1580
2221
|
};
|
|
1581
2222
|
|
|
1582
2223
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/errors/data.js
|
|
1583
|
-
var
|
|
1584
|
-
constructor({ offset, position, size:
|
|
1585
|
-
super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${
|
|
2224
|
+
var SliceOffsetOutOfBoundsError3 = class extends BaseError3 {
|
|
2225
|
+
constructor({ offset, position, size: size4 }) {
|
|
2226
|
+
super(`Slice ${position === "start" ? "starting" : "ending"} at offset "${offset}" is out-of-bounds (size: ${size4}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
1586
2227
|
}
|
|
1587
2228
|
};
|
|
1588
|
-
var
|
|
1589
|
-
constructor({ size:
|
|
1590
|
-
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${
|
|
2229
|
+
var SizeExceedsPaddingSizeError3 = class extends BaseError3 {
|
|
2230
|
+
constructor({ size: size4, targetSize, type }) {
|
|
2231
|
+
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} size (${size4}) exceeds padding size (${targetSize}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
1591
2232
|
}
|
|
1592
2233
|
};
|
|
1593
2234
|
var InvalidBytesLengthError = class extends BaseError3 {
|
|
1594
|
-
constructor({ size:
|
|
1595
|
-
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${
|
|
2235
|
+
constructor({ size: size4, targetSize, type }) {
|
|
2236
|
+
super(`${type.charAt(0).toUpperCase()}${type.slice(1).toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size4} ${type} long.`, { name: "InvalidBytesLengthError" });
|
|
1596
2237
|
}
|
|
1597
2238
|
};
|
|
1598
2239
|
|
|
1599
2240
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/data/slice.js
|
|
1600
|
-
function
|
|
2241
|
+
function slice3(value, start, end, { strict } = {}) {
|
|
1601
2242
|
if (isHex(value, { strict: false }))
|
|
1602
2243
|
return sliceHex(value, start, end, {
|
|
1603
2244
|
strict
|
|
@@ -1606,94 +2247,99 @@ function slice(value, start, end, { strict } = {}) {
|
|
|
1606
2247
|
strict
|
|
1607
2248
|
});
|
|
1608
2249
|
}
|
|
1609
|
-
function
|
|
1610
|
-
if (typeof start === "number" && start > 0 && start >
|
|
1611
|
-
throw new
|
|
2250
|
+
function assertStartOffset3(value, start) {
|
|
2251
|
+
if (typeof start === "number" && start > 0 && start > size3(value) - 1)
|
|
2252
|
+
throw new SliceOffsetOutOfBoundsError3({
|
|
1612
2253
|
offset: start,
|
|
1613
2254
|
position: "start",
|
|
1614
|
-
size:
|
|
2255
|
+
size: size3(value)
|
|
1615
2256
|
});
|
|
1616
2257
|
}
|
|
1617
|
-
function
|
|
1618
|
-
if (typeof start === "number" && typeof end === "number" &&
|
|
1619
|
-
throw new
|
|
2258
|
+
function assertEndOffset3(value, start, end) {
|
|
2259
|
+
if (typeof start === "number" && typeof end === "number" && size3(value) !== end - start) {
|
|
2260
|
+
throw new SliceOffsetOutOfBoundsError3({
|
|
1620
2261
|
offset: end,
|
|
1621
2262
|
position: "end",
|
|
1622
|
-
size:
|
|
2263
|
+
size: size3(value)
|
|
1623
2264
|
});
|
|
1624
2265
|
}
|
|
1625
2266
|
}
|
|
1626
2267
|
function sliceBytes(value_, start, end, { strict } = {}) {
|
|
1627
|
-
|
|
2268
|
+
assertStartOffset3(value_, start);
|
|
1628
2269
|
const value = value_.slice(start, end);
|
|
1629
2270
|
if (strict)
|
|
1630
|
-
|
|
2271
|
+
assertEndOffset3(value, start, end);
|
|
1631
2272
|
return value;
|
|
1632
2273
|
}
|
|
1633
2274
|
function sliceHex(value_, start, end, { strict } = {}) {
|
|
1634
|
-
|
|
2275
|
+
assertStartOffset3(value_, start);
|
|
1635
2276
|
const value = `0x${value_.replace("0x", "").slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;
|
|
1636
2277
|
if (strict)
|
|
1637
|
-
|
|
2278
|
+
assertEndOffset3(value, start, end);
|
|
1638
2279
|
return value;
|
|
1639
2280
|
}
|
|
1640
2281
|
|
|
1641
2282
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/data/pad.js
|
|
1642
|
-
function
|
|
2283
|
+
function pad3(hexOrBytes, { dir, size: size4 = 32 } = {}) {
|
|
1643
2284
|
if (typeof hexOrBytes === "string")
|
|
1644
|
-
return padHex(hexOrBytes, { dir, size:
|
|
1645
|
-
return padBytes(hexOrBytes, { dir, size:
|
|
2285
|
+
return padHex(hexOrBytes, { dir, size: size4 });
|
|
2286
|
+
return padBytes(hexOrBytes, { dir, size: size4 });
|
|
1646
2287
|
}
|
|
1647
|
-
function padHex(hex_, { dir, size:
|
|
1648
|
-
if (
|
|
2288
|
+
function padHex(hex_, { dir, size: size4 = 32 } = {}) {
|
|
2289
|
+
if (size4 === null)
|
|
1649
2290
|
return hex_;
|
|
1650
2291
|
const hex = hex_.replace("0x", "");
|
|
1651
|
-
if (hex.length >
|
|
1652
|
-
throw new
|
|
2292
|
+
if (hex.length > size4 * 2)
|
|
2293
|
+
throw new SizeExceedsPaddingSizeError3({
|
|
1653
2294
|
size: Math.ceil(hex.length / 2),
|
|
1654
|
-
targetSize:
|
|
2295
|
+
targetSize: size4,
|
|
1655
2296
|
type: "hex"
|
|
1656
2297
|
});
|
|
1657
|
-
return `0x${hex[dir === "right" ? "padEnd" : "padStart"](
|
|
2298
|
+
return `0x${hex[dir === "right" ? "padEnd" : "padStart"](size4 * 2, "0")}`;
|
|
1658
2299
|
}
|
|
1659
|
-
function padBytes(bytes, { dir, size:
|
|
1660
|
-
if (
|
|
2300
|
+
function padBytes(bytes, { dir, size: size4 = 32 } = {}) {
|
|
2301
|
+
if (size4 === null)
|
|
1661
2302
|
return bytes;
|
|
1662
|
-
if (bytes.length >
|
|
1663
|
-
throw new
|
|
2303
|
+
if (bytes.length > size4)
|
|
2304
|
+
throw new SizeExceedsPaddingSizeError3({
|
|
1664
2305
|
size: bytes.length,
|
|
1665
|
-
targetSize:
|
|
2306
|
+
targetSize: size4,
|
|
1666
2307
|
type: "bytes"
|
|
1667
2308
|
});
|
|
1668
|
-
const paddedBytes = new Uint8Array(
|
|
1669
|
-
for (let i = 0; i <
|
|
2309
|
+
const paddedBytes = new Uint8Array(size4);
|
|
2310
|
+
for (let i = 0; i < size4; i++) {
|
|
1670
2311
|
const padEnd = dir === "right";
|
|
1671
|
-
paddedBytes[padEnd ? i :
|
|
2312
|
+
paddedBytes[padEnd ? i : size4 - i - 1] = bytes[padEnd ? i : bytes.length - i - 1];
|
|
1672
2313
|
}
|
|
1673
2314
|
return paddedBytes;
|
|
1674
2315
|
}
|
|
1675
2316
|
|
|
1676
2317
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/errors/encoding.js
|
|
1677
2318
|
var IntegerOutOfRangeError2 = class extends BaseError3 {
|
|
1678
|
-
constructor({ max, min, signed, size:
|
|
1679
|
-
super(`Number "${value}" is not in safe ${
|
|
2319
|
+
constructor({ max, min, signed, size: size4, value }) {
|
|
2320
|
+
super(`Number "${value}" is not in safe ${size4 ? `${size4 * 8}-bit ${signed ? "signed" : "unsigned"} ` : ""}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: "IntegerOutOfRangeError" });
|
|
1680
2321
|
}
|
|
1681
2322
|
};
|
|
1682
|
-
var
|
|
2323
|
+
var InvalidBytesBooleanError2 = class extends BaseError3 {
|
|
1683
2324
|
constructor(bytes) {
|
|
1684
2325
|
super(`Bytes value "${bytes}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {
|
|
1685
2326
|
name: "InvalidBytesBooleanError"
|
|
1686
2327
|
});
|
|
1687
2328
|
}
|
|
1688
2329
|
};
|
|
1689
|
-
var
|
|
2330
|
+
var InvalidHexBooleanError = class extends BaseError3 {
|
|
2331
|
+
constructor(hex) {
|
|
2332
|
+
super(`Hex value "${hex}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`, { name: "InvalidHexBooleanError" });
|
|
2333
|
+
}
|
|
2334
|
+
};
|
|
2335
|
+
var SizeOverflowError3 = class extends BaseError3 {
|
|
1690
2336
|
constructor({ givenSize, maxSize }) {
|
|
1691
2337
|
super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: "SizeOverflowError" });
|
|
1692
2338
|
}
|
|
1693
2339
|
};
|
|
1694
2340
|
|
|
1695
2341
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/data/trim.js
|
|
1696
|
-
function
|
|
2342
|
+
function trim3(hexOrBytes, { dir = "left" } = {}) {
|
|
1697
2343
|
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
|
1698
2344
|
let sliceLength = 0;
|
|
1699
2345
|
for (let i = 0; i < data.length - 1; i++) {
|
|
@@ -1712,32 +2358,44 @@ function trim2(hexOrBytes, { dir = "left" } = {}) {
|
|
|
1712
2358
|
}
|
|
1713
2359
|
|
|
1714
2360
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/encoding/fromHex.js
|
|
1715
|
-
function
|
|
1716
|
-
if (
|
|
1717
|
-
throw new
|
|
1718
|
-
givenSize:
|
|
1719
|
-
maxSize:
|
|
2361
|
+
function assertSize3(hexOrBytes, { size: size4 }) {
|
|
2362
|
+
if (size3(hexOrBytes) > size4)
|
|
2363
|
+
throw new SizeOverflowError3({
|
|
2364
|
+
givenSize: size3(hexOrBytes),
|
|
2365
|
+
maxSize: size4
|
|
1720
2366
|
});
|
|
1721
2367
|
}
|
|
1722
2368
|
function hexToBigInt(hex, opts = {}) {
|
|
1723
2369
|
const { signed } = opts;
|
|
1724
2370
|
if (opts.size)
|
|
1725
|
-
|
|
2371
|
+
assertSize3(hex, { size: opts.size });
|
|
1726
2372
|
const value = BigInt(hex);
|
|
1727
2373
|
if (!signed)
|
|
1728
2374
|
return value;
|
|
1729
|
-
const
|
|
1730
|
-
const max = (1n << BigInt(
|
|
2375
|
+
const size4 = (hex.length - 2) / 2;
|
|
2376
|
+
const max = (1n << BigInt(size4) * 8n - 1n) - 1n;
|
|
1731
2377
|
if (value <= max)
|
|
1732
2378
|
return value;
|
|
1733
|
-
return value - BigInt(`0x${"f".padStart(
|
|
2379
|
+
return value - BigInt(`0x${"f".padStart(size4 * 2, "f")}`) - 1n;
|
|
2380
|
+
}
|
|
2381
|
+
function hexToBool(hex_, opts = {}) {
|
|
2382
|
+
let hex = hex_;
|
|
2383
|
+
if (opts.size) {
|
|
2384
|
+
assertSize3(hex, { size: opts.size });
|
|
2385
|
+
hex = trim3(hex);
|
|
2386
|
+
}
|
|
2387
|
+
if (trim3(hex) === "0x00")
|
|
2388
|
+
return false;
|
|
2389
|
+
if (trim3(hex) === "0x01")
|
|
2390
|
+
return true;
|
|
2391
|
+
throw new InvalidHexBooleanError(hex);
|
|
1734
2392
|
}
|
|
1735
2393
|
function hexToNumber(hex, opts = {}) {
|
|
1736
2394
|
return Number(hexToBigInt(hex, opts));
|
|
1737
2395
|
}
|
|
1738
2396
|
|
|
1739
2397
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/encoding/toHex.js
|
|
1740
|
-
var
|
|
2398
|
+
var hexes2 = /* @__PURE__ */ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, "0"));
|
|
1741
2399
|
function toHex(value, opts = {}) {
|
|
1742
2400
|
if (typeof value === "number" || typeof value === "bigint")
|
|
1743
2401
|
return numberToHex(value, opts);
|
|
@@ -1751,32 +2409,32 @@ function toHex(value, opts = {}) {
|
|
|
1751
2409
|
function boolToHex(value, opts = {}) {
|
|
1752
2410
|
const hex = `0x${Number(value)}`;
|
|
1753
2411
|
if (typeof opts.size === "number") {
|
|
1754
|
-
|
|
1755
|
-
return
|
|
2412
|
+
assertSize3(hex, { size: opts.size });
|
|
2413
|
+
return pad3(hex, { size: opts.size });
|
|
1756
2414
|
}
|
|
1757
2415
|
return hex;
|
|
1758
2416
|
}
|
|
1759
2417
|
function bytesToHex(value, opts = {}) {
|
|
1760
2418
|
let string = "";
|
|
1761
2419
|
for (let i = 0; i < value.length; i++) {
|
|
1762
|
-
string +=
|
|
2420
|
+
string += hexes2[value[i]];
|
|
1763
2421
|
}
|
|
1764
2422
|
const hex = `0x${string}`;
|
|
1765
2423
|
if (typeof opts.size === "number") {
|
|
1766
|
-
|
|
1767
|
-
return
|
|
2424
|
+
assertSize3(hex, { size: opts.size });
|
|
2425
|
+
return pad3(hex, { dir: "right", size: opts.size });
|
|
1768
2426
|
}
|
|
1769
2427
|
return hex;
|
|
1770
2428
|
}
|
|
1771
2429
|
function numberToHex(value_, opts = {}) {
|
|
1772
|
-
const { signed, size:
|
|
2430
|
+
const { signed, size: size4 } = opts;
|
|
1773
2431
|
const value = BigInt(value_);
|
|
1774
2432
|
let maxValue;
|
|
1775
|
-
if (
|
|
2433
|
+
if (size4) {
|
|
1776
2434
|
if (signed)
|
|
1777
|
-
maxValue = (1n << BigInt(
|
|
2435
|
+
maxValue = (1n << BigInt(size4) * 8n - 1n) - 1n;
|
|
1778
2436
|
else
|
|
1779
|
-
maxValue = 2n ** (BigInt(
|
|
2437
|
+
maxValue = 2n ** (BigInt(size4) * 8n) - 1n;
|
|
1780
2438
|
} else if (typeof value_ === "number") {
|
|
1781
2439
|
maxValue = BigInt(Number.MAX_SAFE_INTEGER);
|
|
1782
2440
|
}
|
|
@@ -1787,23 +2445,23 @@ function numberToHex(value_, opts = {}) {
|
|
|
1787
2445
|
max: maxValue ? `${maxValue}${suffix}` : void 0,
|
|
1788
2446
|
min: `${minValue}${suffix}`,
|
|
1789
2447
|
signed,
|
|
1790
|
-
size:
|
|
2448
|
+
size: size4,
|
|
1791
2449
|
value: `${value_}${suffix}`
|
|
1792
2450
|
});
|
|
1793
2451
|
}
|
|
1794
|
-
const hex = `0x${(signed && value < 0 ? (1n << BigInt(
|
|
1795
|
-
if (
|
|
1796
|
-
return
|
|
2452
|
+
const hex = `0x${(signed && value < 0 ? (1n << BigInt(size4 * 8)) + BigInt(value) : value).toString(16)}`;
|
|
2453
|
+
if (size4)
|
|
2454
|
+
return pad3(hex, { size: size4 });
|
|
1797
2455
|
return hex;
|
|
1798
2456
|
}
|
|
1799
|
-
var
|
|
2457
|
+
var encoder3 = /* @__PURE__ */ new TextEncoder();
|
|
1800
2458
|
function stringToHex(value_, opts = {}) {
|
|
1801
|
-
const value =
|
|
2459
|
+
const value = encoder3.encode(value_);
|
|
1802
2460
|
return bytesToHex(value, opts);
|
|
1803
2461
|
}
|
|
1804
2462
|
|
|
1805
2463
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/encoding/toBytes.js
|
|
1806
|
-
var
|
|
2464
|
+
var encoder4 = /* @__PURE__ */ new TextEncoder();
|
|
1807
2465
|
function toBytes2(value, opts = {}) {
|
|
1808
2466
|
if (typeof value === "number" || typeof value === "bigint")
|
|
1809
2467
|
return numberToBytes(value, opts);
|
|
@@ -1817,12 +2475,12 @@ function boolToBytes(value, opts = {}) {
|
|
|
1817
2475
|
const bytes = new Uint8Array(1);
|
|
1818
2476
|
bytes[0] = Number(value);
|
|
1819
2477
|
if (typeof opts.size === "number") {
|
|
1820
|
-
|
|
1821
|
-
return
|
|
2478
|
+
assertSize3(bytes, { size: opts.size });
|
|
2479
|
+
return pad3(bytes, { size: opts.size });
|
|
1822
2480
|
}
|
|
1823
2481
|
return bytes;
|
|
1824
2482
|
}
|
|
1825
|
-
var
|
|
2483
|
+
var charCodeMap2 = {
|
|
1826
2484
|
zero: 48,
|
|
1827
2485
|
nine: 57,
|
|
1828
2486
|
A: 65,
|
|
@@ -1830,20 +2488,20 @@ var charCodeMap = {
|
|
|
1830
2488
|
a: 97,
|
|
1831
2489
|
f: 102
|
|
1832
2490
|
};
|
|
1833
|
-
function
|
|
1834
|
-
if (char >=
|
|
1835
|
-
return char -
|
|
1836
|
-
if (char >=
|
|
1837
|
-
return char - (
|
|
1838
|
-
if (char >=
|
|
1839
|
-
return char - (
|
|
2491
|
+
function charCodeToBase162(char) {
|
|
2492
|
+
if (char >= charCodeMap2.zero && char <= charCodeMap2.nine)
|
|
2493
|
+
return char - charCodeMap2.zero;
|
|
2494
|
+
if (char >= charCodeMap2.A && char <= charCodeMap2.F)
|
|
2495
|
+
return char - (charCodeMap2.A - 10);
|
|
2496
|
+
if (char >= charCodeMap2.a && char <= charCodeMap2.f)
|
|
2497
|
+
return char - (charCodeMap2.a - 10);
|
|
1840
2498
|
return void 0;
|
|
1841
2499
|
}
|
|
1842
2500
|
function hexToBytes(hex_, opts = {}) {
|
|
1843
2501
|
let hex = hex_;
|
|
1844
2502
|
if (opts.size) {
|
|
1845
|
-
|
|
1846
|
-
hex =
|
|
2503
|
+
assertSize3(hex, { size: opts.size });
|
|
2504
|
+
hex = pad3(hex, { dir: "right", size: opts.size });
|
|
1847
2505
|
}
|
|
1848
2506
|
let hexString = hex.slice(2);
|
|
1849
2507
|
if (hexString.length % 2)
|
|
@@ -1851,8 +2509,8 @@ function hexToBytes(hex_, opts = {}) {
|
|
|
1851
2509
|
const length = hexString.length / 2;
|
|
1852
2510
|
const bytes = new Uint8Array(length);
|
|
1853
2511
|
for (let index = 0, j = 0; index < length; index++) {
|
|
1854
|
-
const nibbleLeft =
|
|
1855
|
-
const nibbleRight =
|
|
2512
|
+
const nibbleLeft = charCodeToBase162(hexString.charCodeAt(j++));
|
|
2513
|
+
const nibbleRight = charCodeToBase162(hexString.charCodeAt(j++));
|
|
1856
2514
|
if (nibbleLeft === void 0 || nibbleRight === void 0) {
|
|
1857
2515
|
throw new BaseError3(`Invalid byte sequence ("${hexString[j - 2]}${hexString[j - 1]}" in "${hexString}").`);
|
|
1858
2516
|
}
|
|
@@ -1865,10 +2523,10 @@ function numberToBytes(value, opts) {
|
|
|
1865
2523
|
return hexToBytes(hex);
|
|
1866
2524
|
}
|
|
1867
2525
|
function stringToBytes(value, opts = {}) {
|
|
1868
|
-
const bytes =
|
|
2526
|
+
const bytes = encoder4.encode(value);
|
|
1869
2527
|
if (typeof opts.size === "number") {
|
|
1870
|
-
|
|
1871
|
-
return
|
|
2528
|
+
assertSize3(bytes, { size: opts.size });
|
|
2529
|
+
return pad3(bytes, { dir: "right", size: opts.size });
|
|
1872
2530
|
}
|
|
1873
2531
|
return bytes;
|
|
1874
2532
|
}
|
|
@@ -2129,7 +2787,7 @@ function toSignatureHash(fn) {
|
|
|
2129
2787
|
}
|
|
2130
2788
|
|
|
2131
2789
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/hash/toFunctionSelector.js
|
|
2132
|
-
var toFunctionSelector = (fn) =>
|
|
2790
|
+
var toFunctionSelector = (fn) => slice3(toSignatureHash(fn), 0, 4);
|
|
2133
2791
|
|
|
2134
2792
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/errors/address.js
|
|
2135
2793
|
var InvalidAddressError = class extends BaseError3 {
|
|
@@ -2146,7 +2804,7 @@ var InvalidAddressError = class extends BaseError3 {
|
|
|
2146
2804
|
|
|
2147
2805
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/lru.js
|
|
2148
2806
|
var LruMap = class extends Map {
|
|
2149
|
-
constructor(
|
|
2807
|
+
constructor(size4) {
|
|
2150
2808
|
super();
|
|
2151
2809
|
Object.defineProperty(this, "maxSize", {
|
|
2152
2810
|
enumerable: true,
|
|
@@ -2154,7 +2812,7 @@ var LruMap = class extends Map {
|
|
|
2154
2812
|
writable: true,
|
|
2155
2813
|
value: void 0
|
|
2156
2814
|
});
|
|
2157
|
-
this.maxSize =
|
|
2815
|
+
this.maxSize = size4;
|
|
2158
2816
|
}
|
|
2159
2817
|
get(key) {
|
|
2160
2818
|
const value = super.get(key);
|
|
@@ -2216,6 +2874,11 @@ function checksumAddress(address_, chainId) {
|
|
|
2216
2874
|
checksumAddressCache.set(`${address_}.${chainId}`, result);
|
|
2217
2875
|
return result;
|
|
2218
2876
|
}
|
|
2877
|
+
function getAddress(address, chainId) {
|
|
2878
|
+
if (!isAddress(address, { strict: false }))
|
|
2879
|
+
throw new InvalidAddressError({ address });
|
|
2880
|
+
return checksumAddress(address, chainId);
|
|
2881
|
+
}
|
|
2219
2882
|
|
|
2220
2883
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/errors/cursor.js
|
|
2221
2884
|
var NegativeOffsetError = class extends BaseError3 {
|
|
@@ -2343,11 +3006,11 @@ var staticCursor = {
|
|
|
2343
3006
|
this.position++;
|
|
2344
3007
|
return value;
|
|
2345
3008
|
},
|
|
2346
|
-
readBytes(length,
|
|
3009
|
+
readBytes(length, size4) {
|
|
2347
3010
|
this.assertReadLimit();
|
|
2348
3011
|
this._touch();
|
|
2349
3012
|
const value = this.inspectBytes(length);
|
|
2350
|
-
this.position +=
|
|
3013
|
+
this.position += size4 ?? length;
|
|
2351
3014
|
return value;
|
|
2352
3015
|
},
|
|
2353
3016
|
readUint8() {
|
|
@@ -2408,37 +3071,37 @@ function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
|
|
2408
3071
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/encoding/fromBytes.js
|
|
2409
3072
|
function bytesToBigInt(bytes, opts = {}) {
|
|
2410
3073
|
if (typeof opts.size !== "undefined")
|
|
2411
|
-
|
|
3074
|
+
assertSize3(bytes, { size: opts.size });
|
|
2412
3075
|
const hex = bytesToHex(bytes, opts);
|
|
2413
3076
|
return hexToBigInt(hex, opts);
|
|
2414
3077
|
}
|
|
2415
3078
|
function bytesToBool(bytes_, opts = {}) {
|
|
2416
3079
|
let bytes = bytes_;
|
|
2417
3080
|
if (typeof opts.size !== "undefined") {
|
|
2418
|
-
|
|
2419
|
-
bytes =
|
|
3081
|
+
assertSize3(bytes, { size: opts.size });
|
|
3082
|
+
bytes = trim3(bytes);
|
|
2420
3083
|
}
|
|
2421
3084
|
if (bytes.length > 1 || bytes[0] > 1)
|
|
2422
|
-
throw new
|
|
3085
|
+
throw new InvalidBytesBooleanError2(bytes);
|
|
2423
3086
|
return Boolean(bytes[0]);
|
|
2424
3087
|
}
|
|
2425
3088
|
function bytesToNumber(bytes, opts = {}) {
|
|
2426
3089
|
if (typeof opts.size !== "undefined")
|
|
2427
|
-
|
|
3090
|
+
assertSize3(bytes, { size: opts.size });
|
|
2428
3091
|
const hex = bytesToHex(bytes, opts);
|
|
2429
3092
|
return hexToNumber(hex, opts);
|
|
2430
3093
|
}
|
|
2431
3094
|
function bytesToString(bytes_, opts = {}) {
|
|
2432
3095
|
let bytes = bytes_;
|
|
2433
3096
|
if (typeof opts.size !== "undefined") {
|
|
2434
|
-
|
|
2435
|
-
bytes =
|
|
3097
|
+
assertSize3(bytes, { size: opts.size });
|
|
3098
|
+
bytes = trim3(bytes, { dir: "right" });
|
|
2436
3099
|
}
|
|
2437
3100
|
return new TextDecoder().decode(bytes);
|
|
2438
3101
|
}
|
|
2439
3102
|
|
|
2440
3103
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/data/concat.js
|
|
2441
|
-
function
|
|
3104
|
+
function concat2(values) {
|
|
2442
3105
|
if (typeof values[0] === "string")
|
|
2443
3106
|
return concatHex(values);
|
|
2444
3107
|
return concatBytes(values);
|
|
@@ -2461,6 +3124,7 @@ function concatHex(values) {
|
|
|
2461
3124
|
}
|
|
2462
3125
|
|
|
2463
3126
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/regex.js
|
|
3127
|
+
var bytesRegex2 = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;
|
|
2464
3128
|
var integerRegex2 = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
|
|
2465
3129
|
|
|
2466
3130
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/abi/encodeAbiParameters.js
|
|
@@ -2505,10 +3169,10 @@ function prepareParam({ param, value }) {
|
|
|
2505
3169
|
}
|
|
2506
3170
|
if (param.type.startsWith("uint") || param.type.startsWith("int")) {
|
|
2507
3171
|
const signed = param.type.startsWith("int");
|
|
2508
|
-
const [, ,
|
|
3172
|
+
const [, , size4 = "256"] = integerRegex2.exec(param.type) ?? [];
|
|
2509
3173
|
return encodeNumber(value, {
|
|
2510
3174
|
signed,
|
|
2511
|
-
size: Number(
|
|
3175
|
+
size: Number(size4)
|
|
2512
3176
|
});
|
|
2513
3177
|
}
|
|
2514
3178
|
if (param.type.startsWith("bytes")) {
|
|
@@ -2528,7 +3192,7 @@ function encodeParams(preparedParams) {
|
|
|
2528
3192
|
if (dynamic)
|
|
2529
3193
|
staticSize += 32;
|
|
2530
3194
|
else
|
|
2531
|
-
staticSize +=
|
|
3195
|
+
staticSize += size3(encoded);
|
|
2532
3196
|
}
|
|
2533
3197
|
const staticParams = [];
|
|
2534
3198
|
const dynamicParams = [];
|
|
@@ -2538,12 +3202,12 @@ function encodeParams(preparedParams) {
|
|
|
2538
3202
|
if (dynamic) {
|
|
2539
3203
|
staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));
|
|
2540
3204
|
dynamicParams.push(encoded);
|
|
2541
|
-
dynamicSize +=
|
|
3205
|
+
dynamicSize += size3(encoded);
|
|
2542
3206
|
} else {
|
|
2543
3207
|
staticParams.push(encoded);
|
|
2544
3208
|
}
|
|
2545
3209
|
}
|
|
2546
|
-
return
|
|
3210
|
+
return concat2([...staticParams, ...dynamicParams]);
|
|
2547
3211
|
}
|
|
2548
3212
|
function encodeAddress(value) {
|
|
2549
3213
|
if (!isAddress(value))
|
|
@@ -2574,7 +3238,7 @@ function encodeArray(value, { length, param }) {
|
|
|
2574
3238
|
const length2 = numberToHex(preparedParams.length, { size: 32 });
|
|
2575
3239
|
return {
|
|
2576
3240
|
dynamic: true,
|
|
2577
|
-
encoded: preparedParams.length > 0 ?
|
|
3241
|
+
encoded: preparedParams.length > 0 ? concat2([length2, data]) : length2
|
|
2578
3242
|
};
|
|
2579
3243
|
}
|
|
2580
3244
|
if (dynamicChild)
|
|
@@ -2582,12 +3246,12 @@ function encodeArray(value, { length, param }) {
|
|
|
2582
3246
|
}
|
|
2583
3247
|
return {
|
|
2584
3248
|
dynamic: false,
|
|
2585
|
-
encoded:
|
|
3249
|
+
encoded: concat2(preparedParams.map(({ encoded }) => encoded))
|
|
2586
3250
|
};
|
|
2587
3251
|
}
|
|
2588
3252
|
function encodeBytes(value, { param }) {
|
|
2589
3253
|
const [, paramSize] = param.type.split("bytes");
|
|
2590
|
-
const bytesSize =
|
|
3254
|
+
const bytesSize = size3(value);
|
|
2591
3255
|
if (!paramSize) {
|
|
2592
3256
|
let value_ = value;
|
|
2593
3257
|
if (bytesSize % 32 !== 0)
|
|
@@ -2597,7 +3261,7 @@ function encodeBytes(value, { param }) {
|
|
|
2597
3261
|
});
|
|
2598
3262
|
return {
|
|
2599
3263
|
dynamic: true,
|
|
2600
|
-
encoded:
|
|
3264
|
+
encoded: concat2([padHex(numberToHex(bytesSize, { size: 32 })), value_])
|
|
2601
3265
|
};
|
|
2602
3266
|
}
|
|
2603
3267
|
if (bytesSize !== Number.parseInt(paramSize, 10))
|
|
@@ -2612,16 +3276,16 @@ function encodeBool(value) {
|
|
|
2612
3276
|
throw new BaseError3(`Invalid boolean value: "${value}" (type: ${typeof value}). Expected: \`true\` or \`false\`.`);
|
|
2613
3277
|
return { dynamic: false, encoded: padHex(boolToHex(value)) };
|
|
2614
3278
|
}
|
|
2615
|
-
function encodeNumber(value, { signed, size:
|
|
2616
|
-
if (typeof
|
|
2617
|
-
const max = 2n ** (BigInt(
|
|
3279
|
+
function encodeNumber(value, { signed, size: size4 = 256 }) {
|
|
3280
|
+
if (typeof size4 === "number") {
|
|
3281
|
+
const max = 2n ** (BigInt(size4) - (signed ? 1n : 0n)) - 1n;
|
|
2618
3282
|
const min = signed ? -max - 1n : 0n;
|
|
2619
3283
|
if (value > max || value < min)
|
|
2620
3284
|
throw new IntegerOutOfRangeError2({
|
|
2621
3285
|
max: max.toString(),
|
|
2622
3286
|
min: min.toString(),
|
|
2623
3287
|
signed,
|
|
2624
|
-
size:
|
|
3288
|
+
size: size4 / 8,
|
|
2625
3289
|
value: value.toString()
|
|
2626
3290
|
});
|
|
2627
3291
|
}
|
|
@@ -2635,17 +3299,17 @@ function encodeNumber(value, { signed, size: size3 = 256 }) {
|
|
|
2635
3299
|
}
|
|
2636
3300
|
function encodeString(value) {
|
|
2637
3301
|
const hexValue = stringToHex(value);
|
|
2638
|
-
const partsLength = Math.ceil(
|
|
3302
|
+
const partsLength = Math.ceil(size3(hexValue) / 32);
|
|
2639
3303
|
const parts = [];
|
|
2640
3304
|
for (let i = 0; i < partsLength; i++) {
|
|
2641
|
-
parts.push(padHex(
|
|
3305
|
+
parts.push(padHex(slice3(hexValue, i * 32, (i + 1) * 32), {
|
|
2642
3306
|
dir: "right"
|
|
2643
3307
|
}));
|
|
2644
3308
|
}
|
|
2645
3309
|
return {
|
|
2646
3310
|
dynamic: true,
|
|
2647
|
-
encoded:
|
|
2648
|
-
padHex(numberToHex(
|
|
3311
|
+
encoded: concat2([
|
|
3312
|
+
padHex(numberToHex(size3(hexValue), { size: 32 })),
|
|
2649
3313
|
...parts
|
|
2650
3314
|
])
|
|
2651
3315
|
};
|
|
@@ -2666,7 +3330,7 @@ function encodeTuple(value, { param }) {
|
|
|
2666
3330
|
}
|
|
2667
3331
|
return {
|
|
2668
3332
|
dynamic,
|
|
2669
|
-
encoded: dynamic ? encodeParams(preparedParams) :
|
|
3333
|
+
encoded: dynamic ? encodeParams(preparedParams) : concat2(preparedParams.map(({ encoded }) => encoded))
|
|
2670
3334
|
};
|
|
2671
3335
|
}
|
|
2672
3336
|
function getArrayComponents(type) {
|
|
@@ -2681,13 +3345,13 @@ function getArrayComponents(type) {
|
|
|
2681
3345
|
function decodeAbiParameters(params, data) {
|
|
2682
3346
|
const bytes = typeof data === "string" ? hexToBytes(data) : data;
|
|
2683
3347
|
const cursor = createCursor(bytes);
|
|
2684
|
-
if (
|
|
3348
|
+
if (size3(bytes) === 0 && params.length > 0)
|
|
2685
3349
|
throw new AbiDecodingZeroDataError();
|
|
2686
|
-
if (
|
|
3350
|
+
if (size3(data) && size3(data) < 32)
|
|
2687
3351
|
throw new AbiDecodingDataSizeTooSmallError({
|
|
2688
3352
|
data: typeof data === "string" ? data : bytesToHex(data),
|
|
2689
3353
|
params,
|
|
2690
|
-
size:
|
|
3354
|
+
size: size3(data)
|
|
2691
3355
|
});
|
|
2692
3356
|
let consumed = 0;
|
|
2693
3357
|
const values = [];
|
|
@@ -2780,8 +3444,8 @@ function decodeBool(cursor) {
|
|
|
2780
3444
|
return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];
|
|
2781
3445
|
}
|
|
2782
3446
|
function decodeBytes(cursor, param, { staticPosition }) {
|
|
2783
|
-
const [_,
|
|
2784
|
-
if (!
|
|
3447
|
+
const [_, size4] = param.type.split("bytes");
|
|
3448
|
+
if (!size4) {
|
|
2785
3449
|
const offset = bytesToNumber(cursor.readBytes(32));
|
|
2786
3450
|
cursor.setPosition(staticPosition + offset);
|
|
2787
3451
|
const length = bytesToNumber(cursor.readBytes(32));
|
|
@@ -2793,15 +3457,15 @@ function decodeBytes(cursor, param, { staticPosition }) {
|
|
|
2793
3457
|
cursor.setPosition(staticPosition + 32);
|
|
2794
3458
|
return [bytesToHex(data), 32];
|
|
2795
3459
|
}
|
|
2796
|
-
const value = bytesToHex(cursor.readBytes(Number.parseInt(
|
|
3460
|
+
const value = bytesToHex(cursor.readBytes(Number.parseInt(size4, 10), 32));
|
|
2797
3461
|
return [value, 32];
|
|
2798
3462
|
}
|
|
2799
3463
|
function decodeNumber(cursor, param) {
|
|
2800
3464
|
const signed = param.type.startsWith("int");
|
|
2801
|
-
const
|
|
3465
|
+
const size4 = Number.parseInt(param.type.split("int")[1] || "256", 10);
|
|
2802
3466
|
const value = cursor.readBytes(32);
|
|
2803
3467
|
return [
|
|
2804
|
-
|
|
3468
|
+
size4 > 48 ? bytesToBigInt(value, { signed }) : bytesToNumber(value, { signed }),
|
|
2805
3469
|
32
|
|
2806
3470
|
];
|
|
2807
3471
|
}
|
|
@@ -2844,7 +3508,7 @@ function decodeString(cursor, { staticPosition }) {
|
|
|
2844
3508
|
return ["", 32];
|
|
2845
3509
|
}
|
|
2846
3510
|
const data = cursor.readBytes(length, 32);
|
|
2847
|
-
const value = bytesToString(
|
|
3511
|
+
const value = bytesToString(trim3(data));
|
|
2848
3512
|
cursor.setPosition(staticPosition + 32);
|
|
2849
3513
|
return [value, 32];
|
|
2850
3514
|
}
|
|
@@ -2867,7 +3531,7 @@ function hasDynamicChild(param) {
|
|
|
2867
3531
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/abi/decodeErrorResult.js
|
|
2868
3532
|
function decodeErrorResult(parameters) {
|
|
2869
3533
|
const { abi, data } = parameters;
|
|
2870
|
-
const signature =
|
|
3534
|
+
const signature = slice3(data, 0, 4);
|
|
2871
3535
|
if (signature === "0x")
|
|
2872
3536
|
throw new AbiDecodingZeroDataError();
|
|
2873
3537
|
const abi_ = [...abi || [], solidityError, solidityPanic];
|
|
@@ -2878,17 +3542,28 @@ function decodeErrorResult(parameters) {
|
|
|
2878
3542
|
});
|
|
2879
3543
|
return {
|
|
2880
3544
|
abiItem,
|
|
2881
|
-
args: "inputs" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ? decodeAbiParameters(abiItem.inputs,
|
|
3545
|
+
args: "inputs" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ? decodeAbiParameters(abiItem.inputs, slice3(data, 4)) : void 0,
|
|
2882
3546
|
errorName: abiItem.name
|
|
2883
3547
|
};
|
|
2884
3548
|
}
|
|
2885
3549
|
|
|
2886
3550
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/stringify.js
|
|
2887
|
-
var
|
|
3551
|
+
var stringify2 = (value, replacer, space) => JSON.stringify(value, (key, value_) => {
|
|
2888
3552
|
const value2 = typeof value_ === "bigint" ? value_.toString() : value_;
|
|
2889
3553
|
return typeof replacer === "function" ? replacer(key, value2) : value2;
|
|
2890
3554
|
}, space);
|
|
2891
3555
|
|
|
3556
|
+
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js
|
|
3557
|
+
function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false }) {
|
|
3558
|
+
if (!("name" in abiItem))
|
|
3559
|
+
return;
|
|
3560
|
+
if (!("inputs" in abiItem))
|
|
3561
|
+
return;
|
|
3562
|
+
if (!abiItem.inputs)
|
|
3563
|
+
return;
|
|
3564
|
+
return `${includeFunctionName ? abiItem.name : ""}(${abiItem.inputs.map((input, i) => `${includeName && input.name ? `${input.name}: ` : ""}${typeof args[i] === "object" ? stringify2(args[i]) : args[i]}`).join(", ")})`;
|
|
3565
|
+
}
|
|
3566
|
+
|
|
2892
3567
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/hash/toEventSelector.js
|
|
2893
3568
|
var toEventSelector = toSignatureHash;
|
|
2894
3569
|
|
|
@@ -3095,8 +3770,112 @@ function prettyPrint(args) {
|
|
|
3095
3770
|
const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);
|
|
3096
3771
|
return entries.map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`).join("\n");
|
|
3097
3772
|
}
|
|
3773
|
+
var InvalidSerializableTransactionError = class extends BaseError3 {
|
|
3774
|
+
constructor({ transaction }) {
|
|
3775
|
+
super("Cannot infer a transaction type from provided transaction.", {
|
|
3776
|
+
metaMessages: [
|
|
3777
|
+
"Provided Transaction:",
|
|
3778
|
+
"{",
|
|
3779
|
+
prettyPrint(transaction),
|
|
3780
|
+
"}",
|
|
3781
|
+
"",
|
|
3782
|
+
"To infer the type, either provide:",
|
|
3783
|
+
"- a `type` to the Transaction, or",
|
|
3784
|
+
"- an EIP-1559 Transaction with `maxFeePerGas`, or",
|
|
3785
|
+
"- an EIP-2930 Transaction with `gasPrice` & `accessList`, or",
|
|
3786
|
+
"- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or",
|
|
3787
|
+
"- an EIP-7702 Transaction with `authorizationList`, or",
|
|
3788
|
+
"- a Legacy Transaction with `gasPrice`"
|
|
3789
|
+
],
|
|
3790
|
+
name: "InvalidSerializableTransactionError"
|
|
3791
|
+
});
|
|
3792
|
+
}
|
|
3793
|
+
};
|
|
3794
|
+
var TransactionExecutionError = class extends BaseError3 {
|
|
3795
|
+
constructor(cause, { account, docsPath: docsPath6, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value }) {
|
|
3796
|
+
const prettyArgs = prettyPrint({
|
|
3797
|
+
chain: chain && `${chain?.name} (id: ${chain?.id})`,
|
|
3798
|
+
from: account?.address,
|
|
3799
|
+
to,
|
|
3800
|
+
value: typeof value !== "undefined" && `${formatEther(value)} ${chain?.nativeCurrency?.symbol || "ETH"}`,
|
|
3801
|
+
data,
|
|
3802
|
+
gas,
|
|
3803
|
+
gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
|
|
3804
|
+
maxFeePerGas: typeof maxFeePerGas !== "undefined" && `${formatGwei(maxFeePerGas)} gwei`,
|
|
3805
|
+
maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== "undefined" && `${formatGwei(maxPriorityFeePerGas)} gwei`,
|
|
3806
|
+
nonce
|
|
3807
|
+
});
|
|
3808
|
+
super(cause.shortMessage, {
|
|
3809
|
+
cause,
|
|
3810
|
+
docsPath: docsPath6,
|
|
3811
|
+
metaMessages: [
|
|
3812
|
+
...cause.metaMessages ? [...cause.metaMessages, " "] : [],
|
|
3813
|
+
"Request Arguments:",
|
|
3814
|
+
prettyArgs
|
|
3815
|
+
].filter(Boolean),
|
|
3816
|
+
name: "TransactionExecutionError"
|
|
3817
|
+
});
|
|
3818
|
+
Object.defineProperty(this, "cause", {
|
|
3819
|
+
enumerable: true,
|
|
3820
|
+
configurable: true,
|
|
3821
|
+
writable: true,
|
|
3822
|
+
value: void 0
|
|
3823
|
+
});
|
|
3824
|
+
this.cause = cause;
|
|
3825
|
+
}
|
|
3826
|
+
};
|
|
3827
|
+
var TransactionNotFoundError = class extends BaseError3 {
|
|
3828
|
+
constructor({ blockHash, blockNumber, blockTag, hash: hash2, index }) {
|
|
3829
|
+
let identifier = "Transaction";
|
|
3830
|
+
if (blockTag && index !== void 0)
|
|
3831
|
+
identifier = `Transaction at block time "${blockTag}" at index "${index}"`;
|
|
3832
|
+
if (blockHash && index !== void 0)
|
|
3833
|
+
identifier = `Transaction at block hash "${blockHash}" at index "${index}"`;
|
|
3834
|
+
if (blockNumber && index !== void 0)
|
|
3835
|
+
identifier = `Transaction at block number "${blockNumber}" at index "${index}"`;
|
|
3836
|
+
if (hash2)
|
|
3837
|
+
identifier = `Transaction with hash "${hash2}"`;
|
|
3838
|
+
super(`${identifier} could not be found.`, {
|
|
3839
|
+
name: "TransactionNotFoundError"
|
|
3840
|
+
});
|
|
3841
|
+
}
|
|
3842
|
+
};
|
|
3843
|
+
var TransactionReceiptNotFoundError = class extends BaseError3 {
|
|
3844
|
+
constructor({ hash: hash2 }) {
|
|
3845
|
+
super(`Transaction receipt with hash "${hash2}" could not be found. The Transaction may not be processed on a block yet.`, {
|
|
3846
|
+
name: "TransactionReceiptNotFoundError"
|
|
3847
|
+
});
|
|
3848
|
+
}
|
|
3849
|
+
};
|
|
3850
|
+
var TransactionReceiptRevertedError = class extends BaseError3 {
|
|
3851
|
+
constructor({ receipt }) {
|
|
3852
|
+
super(`Transaction with hash "${receipt.transactionHash}" reverted.`, {
|
|
3853
|
+
metaMessages: [
|
|
3854
|
+
'The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.',
|
|
3855
|
+
" ",
|
|
3856
|
+
"You can attempt to extract the revert reason by:",
|
|
3857
|
+
"- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract",
|
|
3858
|
+
"- using the `call` Action with raw `data`"
|
|
3859
|
+
],
|
|
3860
|
+
name: "TransactionReceiptRevertedError"
|
|
3861
|
+
});
|
|
3862
|
+
Object.defineProperty(this, "receipt", {
|
|
3863
|
+
enumerable: true,
|
|
3864
|
+
configurable: true,
|
|
3865
|
+
writable: true,
|
|
3866
|
+
value: void 0
|
|
3867
|
+
});
|
|
3868
|
+
this.receipt = receipt;
|
|
3869
|
+
}
|
|
3870
|
+
};
|
|
3871
|
+
var WaitForTransactionReceiptTimeoutError = class extends BaseError3 {
|
|
3872
|
+
constructor({ hash: hash2 }) {
|
|
3873
|
+
super(`Timed out while waiting for transaction with hash "${hash2}" to be confirmed.`, { name: "WaitForTransactionReceiptTimeoutError" });
|
|
3874
|
+
}
|
|
3875
|
+
};
|
|
3098
3876
|
|
|
3099
3877
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/errors/utils.js
|
|
3878
|
+
var getContractAddress = (address) => address;
|
|
3100
3879
|
var getUrl = (url) => url;
|
|
3101
3880
|
|
|
3102
3881
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/errors/contract.js
|
|
@@ -3128,13 +3907,182 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
3128
3907
|
].filter(Boolean),
|
|
3129
3908
|
name: "CallExecutionError"
|
|
3130
3909
|
});
|
|
3131
|
-
Object.defineProperty(this, "cause", {
|
|
3910
|
+
Object.defineProperty(this, "cause", {
|
|
3911
|
+
enumerable: true,
|
|
3912
|
+
configurable: true,
|
|
3913
|
+
writable: true,
|
|
3914
|
+
value: void 0
|
|
3915
|
+
});
|
|
3916
|
+
this.cause = cause;
|
|
3917
|
+
}
|
|
3918
|
+
};
|
|
3919
|
+
var ContractFunctionExecutionError = class extends BaseError3 {
|
|
3920
|
+
constructor(cause, { abi, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
|
|
3921
|
+
const abiItem = getAbiItem({ abi, args, name: functionName });
|
|
3922
|
+
const formattedArgs = abiItem ? formatAbiItemWithArgs({
|
|
3923
|
+
abiItem,
|
|
3924
|
+
args,
|
|
3925
|
+
includeFunctionName: false,
|
|
3926
|
+
includeName: false
|
|
3927
|
+
}) : void 0;
|
|
3928
|
+
const functionWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;
|
|
3929
|
+
const prettyArgs = prettyPrint({
|
|
3930
|
+
address: contractAddress && getContractAddress(contractAddress),
|
|
3931
|
+
function: functionWithParams,
|
|
3932
|
+
args: formattedArgs && formattedArgs !== "()" && `${[...Array(functionName?.length ?? 0).keys()].map(() => " ").join("")}${formattedArgs}`,
|
|
3933
|
+
sender
|
|
3934
|
+
});
|
|
3935
|
+
super(cause.shortMessage || `An unknown error occurred while executing the contract function "${functionName}".`, {
|
|
3936
|
+
cause,
|
|
3937
|
+
docsPath: docsPath6,
|
|
3938
|
+
metaMessages: [
|
|
3939
|
+
...cause.metaMessages ? [...cause.metaMessages, " "] : [],
|
|
3940
|
+
prettyArgs && "Contract Call:",
|
|
3941
|
+
prettyArgs
|
|
3942
|
+
].filter(Boolean),
|
|
3943
|
+
name: "ContractFunctionExecutionError"
|
|
3944
|
+
});
|
|
3945
|
+
Object.defineProperty(this, "abi", {
|
|
3946
|
+
enumerable: true,
|
|
3947
|
+
configurable: true,
|
|
3948
|
+
writable: true,
|
|
3949
|
+
value: void 0
|
|
3950
|
+
});
|
|
3951
|
+
Object.defineProperty(this, "args", {
|
|
3952
|
+
enumerable: true,
|
|
3953
|
+
configurable: true,
|
|
3954
|
+
writable: true,
|
|
3955
|
+
value: void 0
|
|
3956
|
+
});
|
|
3957
|
+
Object.defineProperty(this, "cause", {
|
|
3958
|
+
enumerable: true,
|
|
3959
|
+
configurable: true,
|
|
3960
|
+
writable: true,
|
|
3961
|
+
value: void 0
|
|
3962
|
+
});
|
|
3963
|
+
Object.defineProperty(this, "contractAddress", {
|
|
3964
|
+
enumerable: true,
|
|
3965
|
+
configurable: true,
|
|
3966
|
+
writable: true,
|
|
3967
|
+
value: void 0
|
|
3968
|
+
});
|
|
3969
|
+
Object.defineProperty(this, "formattedArgs", {
|
|
3970
|
+
enumerable: true,
|
|
3971
|
+
configurable: true,
|
|
3972
|
+
writable: true,
|
|
3973
|
+
value: void 0
|
|
3974
|
+
});
|
|
3975
|
+
Object.defineProperty(this, "functionName", {
|
|
3976
|
+
enumerable: true,
|
|
3977
|
+
configurable: true,
|
|
3978
|
+
writable: true,
|
|
3979
|
+
value: void 0
|
|
3980
|
+
});
|
|
3981
|
+
Object.defineProperty(this, "sender", {
|
|
3982
|
+
enumerable: true,
|
|
3983
|
+
configurable: true,
|
|
3984
|
+
writable: true,
|
|
3985
|
+
value: void 0
|
|
3986
|
+
});
|
|
3987
|
+
this.abi = abi;
|
|
3988
|
+
this.args = args;
|
|
3989
|
+
this.cause = cause;
|
|
3990
|
+
this.contractAddress = contractAddress;
|
|
3991
|
+
this.functionName = functionName;
|
|
3992
|
+
this.sender = sender;
|
|
3993
|
+
}
|
|
3994
|
+
};
|
|
3995
|
+
var ContractFunctionRevertedError = class extends BaseError3 {
|
|
3996
|
+
constructor({ abi, data, functionName, message }) {
|
|
3997
|
+
let cause;
|
|
3998
|
+
let decodedData;
|
|
3999
|
+
let metaMessages;
|
|
4000
|
+
let reason;
|
|
4001
|
+
if (data && data !== "0x") {
|
|
4002
|
+
try {
|
|
4003
|
+
decodedData = decodeErrorResult({ abi, data });
|
|
4004
|
+
const { abiItem, errorName, args: errorArgs } = decodedData;
|
|
4005
|
+
if (errorName === "Error") {
|
|
4006
|
+
reason = errorArgs[0];
|
|
4007
|
+
} else if (errorName === "Panic") {
|
|
4008
|
+
const [firstArg] = errorArgs;
|
|
4009
|
+
reason = panicReasons[firstArg];
|
|
4010
|
+
} else {
|
|
4011
|
+
const errorWithParams = abiItem ? formatAbiItem2(abiItem, { includeName: true }) : void 0;
|
|
4012
|
+
const formattedArgs = abiItem && errorArgs ? formatAbiItemWithArgs({
|
|
4013
|
+
abiItem,
|
|
4014
|
+
args: errorArgs,
|
|
4015
|
+
includeFunctionName: false,
|
|
4016
|
+
includeName: false
|
|
4017
|
+
}) : void 0;
|
|
4018
|
+
metaMessages = [
|
|
4019
|
+
errorWithParams ? `Error: ${errorWithParams}` : "",
|
|
4020
|
+
formattedArgs && formattedArgs !== "()" ? ` ${[...Array(errorName?.length ?? 0).keys()].map(() => " ").join("")}${formattedArgs}` : ""
|
|
4021
|
+
];
|
|
4022
|
+
}
|
|
4023
|
+
} catch (err) {
|
|
4024
|
+
cause = err;
|
|
4025
|
+
}
|
|
4026
|
+
} else if (message)
|
|
4027
|
+
reason = message;
|
|
4028
|
+
let signature;
|
|
4029
|
+
if (cause instanceof AbiErrorSignatureNotFoundError) {
|
|
4030
|
+
signature = cause.signature;
|
|
4031
|
+
metaMessages = [
|
|
4032
|
+
`Unable to decode signature "${signature}" as it was not found on the provided ABI.`,
|
|
4033
|
+
"Make sure you are using the correct ABI and that the error exists on it.",
|
|
4034
|
+
`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`
|
|
4035
|
+
];
|
|
4036
|
+
}
|
|
4037
|
+
super(reason && reason !== "execution reverted" || signature ? [
|
|
4038
|
+
`The contract function "${functionName}" reverted with the following ${signature ? "signature" : "reason"}:`,
|
|
4039
|
+
reason || signature
|
|
4040
|
+
].join("\n") : `The contract function "${functionName}" reverted.`, {
|
|
4041
|
+
cause,
|
|
4042
|
+
metaMessages,
|
|
4043
|
+
name: "ContractFunctionRevertedError"
|
|
4044
|
+
});
|
|
4045
|
+
Object.defineProperty(this, "data", {
|
|
4046
|
+
enumerable: true,
|
|
4047
|
+
configurable: true,
|
|
4048
|
+
writable: true,
|
|
4049
|
+
value: void 0
|
|
4050
|
+
});
|
|
4051
|
+
Object.defineProperty(this, "raw", {
|
|
3132
4052
|
enumerable: true,
|
|
3133
4053
|
configurable: true,
|
|
3134
4054
|
writable: true,
|
|
3135
4055
|
value: void 0
|
|
3136
4056
|
});
|
|
3137
|
-
this
|
|
4057
|
+
Object.defineProperty(this, "reason", {
|
|
4058
|
+
enumerable: true,
|
|
4059
|
+
configurable: true,
|
|
4060
|
+
writable: true,
|
|
4061
|
+
value: void 0
|
|
4062
|
+
});
|
|
4063
|
+
Object.defineProperty(this, "signature", {
|
|
4064
|
+
enumerable: true,
|
|
4065
|
+
configurable: true,
|
|
4066
|
+
writable: true,
|
|
4067
|
+
value: void 0
|
|
4068
|
+
});
|
|
4069
|
+
this.data = decodedData;
|
|
4070
|
+
this.raw = data;
|
|
4071
|
+
this.reason = reason;
|
|
4072
|
+
this.signature = signature;
|
|
4073
|
+
}
|
|
4074
|
+
};
|
|
4075
|
+
var ContractFunctionZeroDataError = class extends BaseError3 {
|
|
4076
|
+
constructor({ functionName }) {
|
|
4077
|
+
super(`The contract function "${functionName}" returned no data ("0x").`, {
|
|
4078
|
+
metaMessages: [
|
|
4079
|
+
"This could be due to any of the following:",
|
|
4080
|
+
` - The contract does not have the function "${functionName}",`,
|
|
4081
|
+
" - The parameters passed to the contract function may be invalid, or",
|
|
4082
|
+
" - The address is not a contract."
|
|
4083
|
+
],
|
|
4084
|
+
name: "ContractFunctionZeroDataError"
|
|
4085
|
+
});
|
|
3138
4086
|
}
|
|
3139
4087
|
};
|
|
3140
4088
|
var CounterfactualDeploymentFailedError = class extends BaseError3 {
|
|
@@ -3453,7 +4401,7 @@ var HttpRequestError = class extends BaseError3 {
|
|
|
3453
4401
|
metaMessages: [
|
|
3454
4402
|
status && `Status: ${status}`,
|
|
3455
4403
|
`URL: ${getUrl(url)}`,
|
|
3456
|
-
body && `Request body: ${
|
|
4404
|
+
body && `Request body: ${stringify2(body)}`
|
|
3457
4405
|
].filter(Boolean),
|
|
3458
4406
|
name: "HttpRequestError"
|
|
3459
4407
|
});
|
|
@@ -3487,6 +4435,481 @@ var HttpRequestError = class extends BaseError3 {
|
|
|
3487
4435
|
this.url = url;
|
|
3488
4436
|
}
|
|
3489
4437
|
};
|
|
4438
|
+
var RpcRequestError = class extends BaseError3 {
|
|
4439
|
+
constructor({ body, error, url }) {
|
|
4440
|
+
super("RPC Request failed.", {
|
|
4441
|
+
cause: error,
|
|
4442
|
+
details: error.message,
|
|
4443
|
+
metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify2(body)}`],
|
|
4444
|
+
name: "RpcRequestError"
|
|
4445
|
+
});
|
|
4446
|
+
Object.defineProperty(this, "code", {
|
|
4447
|
+
enumerable: true,
|
|
4448
|
+
configurable: true,
|
|
4449
|
+
writable: true,
|
|
4450
|
+
value: void 0
|
|
4451
|
+
});
|
|
4452
|
+
Object.defineProperty(this, "data", {
|
|
4453
|
+
enumerable: true,
|
|
4454
|
+
configurable: true,
|
|
4455
|
+
writable: true,
|
|
4456
|
+
value: void 0
|
|
4457
|
+
});
|
|
4458
|
+
Object.defineProperty(this, "url", {
|
|
4459
|
+
enumerable: true,
|
|
4460
|
+
configurable: true,
|
|
4461
|
+
writable: true,
|
|
4462
|
+
value: void 0
|
|
4463
|
+
});
|
|
4464
|
+
this.code = error.code;
|
|
4465
|
+
this.data = error.data;
|
|
4466
|
+
this.url = url;
|
|
4467
|
+
}
|
|
4468
|
+
};
|
|
4469
|
+
var TimeoutError = class extends BaseError3 {
|
|
4470
|
+
constructor({ body, url }) {
|
|
4471
|
+
super("The request took too long to respond.", {
|
|
4472
|
+
details: "The request timed out.",
|
|
4473
|
+
metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify2(body)}`],
|
|
4474
|
+
name: "TimeoutError"
|
|
4475
|
+
});
|
|
4476
|
+
Object.defineProperty(this, "url", {
|
|
4477
|
+
enumerable: true,
|
|
4478
|
+
configurable: true,
|
|
4479
|
+
writable: true,
|
|
4480
|
+
value: void 0
|
|
4481
|
+
});
|
|
4482
|
+
this.url = url;
|
|
4483
|
+
}
|
|
4484
|
+
};
|
|
4485
|
+
|
|
4486
|
+
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/errors/rpc.js
|
|
4487
|
+
var unknownErrorCode = -1;
|
|
4488
|
+
var RpcError = class extends BaseError3 {
|
|
4489
|
+
constructor(cause, { code, docsPath: docsPath6, metaMessages, name, shortMessage }) {
|
|
4490
|
+
super(shortMessage, {
|
|
4491
|
+
cause,
|
|
4492
|
+
docsPath: docsPath6,
|
|
4493
|
+
metaMessages: metaMessages || cause?.metaMessages,
|
|
4494
|
+
name: name || "RpcError"
|
|
4495
|
+
});
|
|
4496
|
+
Object.defineProperty(this, "code", {
|
|
4497
|
+
enumerable: true,
|
|
4498
|
+
configurable: true,
|
|
4499
|
+
writable: true,
|
|
4500
|
+
value: void 0
|
|
4501
|
+
});
|
|
4502
|
+
this.name = name || cause.name;
|
|
4503
|
+
this.code = cause instanceof RpcRequestError ? cause.code : code ?? unknownErrorCode;
|
|
4504
|
+
}
|
|
4505
|
+
};
|
|
4506
|
+
var ProviderRpcError = class extends RpcError {
|
|
4507
|
+
constructor(cause, options) {
|
|
4508
|
+
super(cause, options);
|
|
4509
|
+
Object.defineProperty(this, "data", {
|
|
4510
|
+
enumerable: true,
|
|
4511
|
+
configurable: true,
|
|
4512
|
+
writable: true,
|
|
4513
|
+
value: void 0
|
|
4514
|
+
});
|
|
4515
|
+
this.data = options.data;
|
|
4516
|
+
}
|
|
4517
|
+
};
|
|
4518
|
+
var ParseRpcError = class extends RpcError {
|
|
4519
|
+
constructor(cause) {
|
|
4520
|
+
super(cause, {
|
|
4521
|
+
code: ParseRpcError.code,
|
|
4522
|
+
name: "ParseRpcError",
|
|
4523
|
+
shortMessage: "Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."
|
|
4524
|
+
});
|
|
4525
|
+
}
|
|
4526
|
+
};
|
|
4527
|
+
Object.defineProperty(ParseRpcError, "code", {
|
|
4528
|
+
enumerable: true,
|
|
4529
|
+
configurable: true,
|
|
4530
|
+
writable: true,
|
|
4531
|
+
value: -32700
|
|
4532
|
+
});
|
|
4533
|
+
var InvalidRequestRpcError = class extends RpcError {
|
|
4534
|
+
constructor(cause) {
|
|
4535
|
+
super(cause, {
|
|
4536
|
+
code: InvalidRequestRpcError.code,
|
|
4537
|
+
name: "InvalidRequestRpcError",
|
|
4538
|
+
shortMessage: "JSON is not a valid request object."
|
|
4539
|
+
});
|
|
4540
|
+
}
|
|
4541
|
+
};
|
|
4542
|
+
Object.defineProperty(InvalidRequestRpcError, "code", {
|
|
4543
|
+
enumerable: true,
|
|
4544
|
+
configurable: true,
|
|
4545
|
+
writable: true,
|
|
4546
|
+
value: -32600
|
|
4547
|
+
});
|
|
4548
|
+
var MethodNotFoundRpcError = class extends RpcError {
|
|
4549
|
+
constructor(cause, { method } = {}) {
|
|
4550
|
+
super(cause, {
|
|
4551
|
+
code: MethodNotFoundRpcError.code,
|
|
4552
|
+
name: "MethodNotFoundRpcError",
|
|
4553
|
+
shortMessage: `The method${method ? ` "${method}"` : ""} does not exist / is not available.`
|
|
4554
|
+
});
|
|
4555
|
+
}
|
|
4556
|
+
};
|
|
4557
|
+
Object.defineProperty(MethodNotFoundRpcError, "code", {
|
|
4558
|
+
enumerable: true,
|
|
4559
|
+
configurable: true,
|
|
4560
|
+
writable: true,
|
|
4561
|
+
value: -32601
|
|
4562
|
+
});
|
|
4563
|
+
var InvalidParamsRpcError = class extends RpcError {
|
|
4564
|
+
constructor(cause) {
|
|
4565
|
+
super(cause, {
|
|
4566
|
+
code: InvalidParamsRpcError.code,
|
|
4567
|
+
name: "InvalidParamsRpcError",
|
|
4568
|
+
shortMessage: [
|
|
4569
|
+
"Invalid parameters were provided to the RPC method.",
|
|
4570
|
+
"Double check you have provided the correct parameters."
|
|
4571
|
+
].join("\n")
|
|
4572
|
+
});
|
|
4573
|
+
}
|
|
4574
|
+
};
|
|
4575
|
+
Object.defineProperty(InvalidParamsRpcError, "code", {
|
|
4576
|
+
enumerable: true,
|
|
4577
|
+
configurable: true,
|
|
4578
|
+
writable: true,
|
|
4579
|
+
value: -32602
|
|
4580
|
+
});
|
|
4581
|
+
var InternalRpcError = class extends RpcError {
|
|
4582
|
+
constructor(cause) {
|
|
4583
|
+
super(cause, {
|
|
4584
|
+
code: InternalRpcError.code,
|
|
4585
|
+
name: "InternalRpcError",
|
|
4586
|
+
shortMessage: "An internal error was received."
|
|
4587
|
+
});
|
|
4588
|
+
}
|
|
4589
|
+
};
|
|
4590
|
+
Object.defineProperty(InternalRpcError, "code", {
|
|
4591
|
+
enumerable: true,
|
|
4592
|
+
configurable: true,
|
|
4593
|
+
writable: true,
|
|
4594
|
+
value: -32603
|
|
4595
|
+
});
|
|
4596
|
+
var InvalidInputRpcError = class extends RpcError {
|
|
4597
|
+
constructor(cause) {
|
|
4598
|
+
super(cause, {
|
|
4599
|
+
code: InvalidInputRpcError.code,
|
|
4600
|
+
name: "InvalidInputRpcError",
|
|
4601
|
+
shortMessage: [
|
|
4602
|
+
"Missing or invalid parameters.",
|
|
4603
|
+
"Double check you have provided the correct parameters."
|
|
4604
|
+
].join("\n")
|
|
4605
|
+
});
|
|
4606
|
+
}
|
|
4607
|
+
};
|
|
4608
|
+
Object.defineProperty(InvalidInputRpcError, "code", {
|
|
4609
|
+
enumerable: true,
|
|
4610
|
+
configurable: true,
|
|
4611
|
+
writable: true,
|
|
4612
|
+
value: -32e3
|
|
4613
|
+
});
|
|
4614
|
+
var ResourceNotFoundRpcError = class extends RpcError {
|
|
4615
|
+
constructor(cause) {
|
|
4616
|
+
super(cause, {
|
|
4617
|
+
code: ResourceNotFoundRpcError.code,
|
|
4618
|
+
name: "ResourceNotFoundRpcError",
|
|
4619
|
+
shortMessage: "Requested resource not found."
|
|
4620
|
+
});
|
|
4621
|
+
Object.defineProperty(this, "name", {
|
|
4622
|
+
enumerable: true,
|
|
4623
|
+
configurable: true,
|
|
4624
|
+
writable: true,
|
|
4625
|
+
value: "ResourceNotFoundRpcError"
|
|
4626
|
+
});
|
|
4627
|
+
}
|
|
4628
|
+
};
|
|
4629
|
+
Object.defineProperty(ResourceNotFoundRpcError, "code", {
|
|
4630
|
+
enumerable: true,
|
|
4631
|
+
configurable: true,
|
|
4632
|
+
writable: true,
|
|
4633
|
+
value: -32001
|
|
4634
|
+
});
|
|
4635
|
+
var ResourceUnavailableRpcError = class extends RpcError {
|
|
4636
|
+
constructor(cause) {
|
|
4637
|
+
super(cause, {
|
|
4638
|
+
code: ResourceUnavailableRpcError.code,
|
|
4639
|
+
name: "ResourceUnavailableRpcError",
|
|
4640
|
+
shortMessage: "Requested resource not available."
|
|
4641
|
+
});
|
|
4642
|
+
}
|
|
4643
|
+
};
|
|
4644
|
+
Object.defineProperty(ResourceUnavailableRpcError, "code", {
|
|
4645
|
+
enumerable: true,
|
|
4646
|
+
configurable: true,
|
|
4647
|
+
writable: true,
|
|
4648
|
+
value: -32002
|
|
4649
|
+
});
|
|
4650
|
+
var TransactionRejectedRpcError = class extends RpcError {
|
|
4651
|
+
constructor(cause) {
|
|
4652
|
+
super(cause, {
|
|
4653
|
+
code: TransactionRejectedRpcError.code,
|
|
4654
|
+
name: "TransactionRejectedRpcError",
|
|
4655
|
+
shortMessage: "Transaction creation failed."
|
|
4656
|
+
});
|
|
4657
|
+
}
|
|
4658
|
+
};
|
|
4659
|
+
Object.defineProperty(TransactionRejectedRpcError, "code", {
|
|
4660
|
+
enumerable: true,
|
|
4661
|
+
configurable: true,
|
|
4662
|
+
writable: true,
|
|
4663
|
+
value: -32003
|
|
4664
|
+
});
|
|
4665
|
+
var MethodNotSupportedRpcError = class extends RpcError {
|
|
4666
|
+
constructor(cause, { method } = {}) {
|
|
4667
|
+
super(cause, {
|
|
4668
|
+
code: MethodNotSupportedRpcError.code,
|
|
4669
|
+
name: "MethodNotSupportedRpcError",
|
|
4670
|
+
shortMessage: `Method${method ? ` "${method}"` : ""} is not supported.`
|
|
4671
|
+
});
|
|
4672
|
+
}
|
|
4673
|
+
};
|
|
4674
|
+
Object.defineProperty(MethodNotSupportedRpcError, "code", {
|
|
4675
|
+
enumerable: true,
|
|
4676
|
+
configurable: true,
|
|
4677
|
+
writable: true,
|
|
4678
|
+
value: -32004
|
|
4679
|
+
});
|
|
4680
|
+
var LimitExceededRpcError = class extends RpcError {
|
|
4681
|
+
constructor(cause) {
|
|
4682
|
+
super(cause, {
|
|
4683
|
+
code: LimitExceededRpcError.code,
|
|
4684
|
+
name: "LimitExceededRpcError",
|
|
4685
|
+
shortMessage: "Request exceeds defined limit."
|
|
4686
|
+
});
|
|
4687
|
+
}
|
|
4688
|
+
};
|
|
4689
|
+
Object.defineProperty(LimitExceededRpcError, "code", {
|
|
4690
|
+
enumerable: true,
|
|
4691
|
+
configurable: true,
|
|
4692
|
+
writable: true,
|
|
4693
|
+
value: -32005
|
|
4694
|
+
});
|
|
4695
|
+
var JsonRpcVersionUnsupportedError = class extends RpcError {
|
|
4696
|
+
constructor(cause) {
|
|
4697
|
+
super(cause, {
|
|
4698
|
+
code: JsonRpcVersionUnsupportedError.code,
|
|
4699
|
+
name: "JsonRpcVersionUnsupportedError",
|
|
4700
|
+
shortMessage: "Version of JSON-RPC protocol is not supported."
|
|
4701
|
+
});
|
|
4702
|
+
}
|
|
4703
|
+
};
|
|
4704
|
+
Object.defineProperty(JsonRpcVersionUnsupportedError, "code", {
|
|
4705
|
+
enumerable: true,
|
|
4706
|
+
configurable: true,
|
|
4707
|
+
writable: true,
|
|
4708
|
+
value: -32006
|
|
4709
|
+
});
|
|
4710
|
+
var UserRejectedRequestError = class extends ProviderRpcError {
|
|
4711
|
+
constructor(cause) {
|
|
4712
|
+
super(cause, {
|
|
4713
|
+
code: UserRejectedRequestError.code,
|
|
4714
|
+
name: "UserRejectedRequestError",
|
|
4715
|
+
shortMessage: "User rejected the request."
|
|
4716
|
+
});
|
|
4717
|
+
}
|
|
4718
|
+
};
|
|
4719
|
+
Object.defineProperty(UserRejectedRequestError, "code", {
|
|
4720
|
+
enumerable: true,
|
|
4721
|
+
configurable: true,
|
|
4722
|
+
writable: true,
|
|
4723
|
+
value: 4001
|
|
4724
|
+
});
|
|
4725
|
+
var UnauthorizedProviderError = class extends ProviderRpcError {
|
|
4726
|
+
constructor(cause) {
|
|
4727
|
+
super(cause, {
|
|
4728
|
+
code: UnauthorizedProviderError.code,
|
|
4729
|
+
name: "UnauthorizedProviderError",
|
|
4730
|
+
shortMessage: "The requested method and/or account has not been authorized by the user."
|
|
4731
|
+
});
|
|
4732
|
+
}
|
|
4733
|
+
};
|
|
4734
|
+
Object.defineProperty(UnauthorizedProviderError, "code", {
|
|
4735
|
+
enumerable: true,
|
|
4736
|
+
configurable: true,
|
|
4737
|
+
writable: true,
|
|
4738
|
+
value: 4100
|
|
4739
|
+
});
|
|
4740
|
+
var UnsupportedProviderMethodError = class extends ProviderRpcError {
|
|
4741
|
+
constructor(cause, { method } = {}) {
|
|
4742
|
+
super(cause, {
|
|
4743
|
+
code: UnsupportedProviderMethodError.code,
|
|
4744
|
+
name: "UnsupportedProviderMethodError",
|
|
4745
|
+
shortMessage: `The Provider does not support the requested method${method ? ` " ${method}"` : ""}.`
|
|
4746
|
+
});
|
|
4747
|
+
}
|
|
4748
|
+
};
|
|
4749
|
+
Object.defineProperty(UnsupportedProviderMethodError, "code", {
|
|
4750
|
+
enumerable: true,
|
|
4751
|
+
configurable: true,
|
|
4752
|
+
writable: true,
|
|
4753
|
+
value: 4200
|
|
4754
|
+
});
|
|
4755
|
+
var ProviderDisconnectedError = class extends ProviderRpcError {
|
|
4756
|
+
constructor(cause) {
|
|
4757
|
+
super(cause, {
|
|
4758
|
+
code: ProviderDisconnectedError.code,
|
|
4759
|
+
name: "ProviderDisconnectedError",
|
|
4760
|
+
shortMessage: "The Provider is disconnected from all chains."
|
|
4761
|
+
});
|
|
4762
|
+
}
|
|
4763
|
+
};
|
|
4764
|
+
Object.defineProperty(ProviderDisconnectedError, "code", {
|
|
4765
|
+
enumerable: true,
|
|
4766
|
+
configurable: true,
|
|
4767
|
+
writable: true,
|
|
4768
|
+
value: 4900
|
|
4769
|
+
});
|
|
4770
|
+
var ChainDisconnectedError = class extends ProviderRpcError {
|
|
4771
|
+
constructor(cause) {
|
|
4772
|
+
super(cause, {
|
|
4773
|
+
code: ChainDisconnectedError.code,
|
|
4774
|
+
name: "ChainDisconnectedError",
|
|
4775
|
+
shortMessage: "The Provider is not connected to the requested chain."
|
|
4776
|
+
});
|
|
4777
|
+
}
|
|
4778
|
+
};
|
|
4779
|
+
Object.defineProperty(ChainDisconnectedError, "code", {
|
|
4780
|
+
enumerable: true,
|
|
4781
|
+
configurable: true,
|
|
4782
|
+
writable: true,
|
|
4783
|
+
value: 4901
|
|
4784
|
+
});
|
|
4785
|
+
var SwitchChainError = class extends ProviderRpcError {
|
|
4786
|
+
constructor(cause) {
|
|
4787
|
+
super(cause, {
|
|
4788
|
+
code: SwitchChainError.code,
|
|
4789
|
+
name: "SwitchChainError",
|
|
4790
|
+
shortMessage: "An error occurred when attempting to switch chain."
|
|
4791
|
+
});
|
|
4792
|
+
}
|
|
4793
|
+
};
|
|
4794
|
+
Object.defineProperty(SwitchChainError, "code", {
|
|
4795
|
+
enumerable: true,
|
|
4796
|
+
configurable: true,
|
|
4797
|
+
writable: true,
|
|
4798
|
+
value: 4902
|
|
4799
|
+
});
|
|
4800
|
+
var UnsupportedNonOptionalCapabilityError = class extends ProviderRpcError {
|
|
4801
|
+
constructor(cause) {
|
|
4802
|
+
super(cause, {
|
|
4803
|
+
code: UnsupportedNonOptionalCapabilityError.code,
|
|
4804
|
+
name: "UnsupportedNonOptionalCapabilityError",
|
|
4805
|
+
shortMessage: "This Wallet does not support a capability that was not marked as optional."
|
|
4806
|
+
});
|
|
4807
|
+
}
|
|
4808
|
+
};
|
|
4809
|
+
Object.defineProperty(UnsupportedNonOptionalCapabilityError, "code", {
|
|
4810
|
+
enumerable: true,
|
|
4811
|
+
configurable: true,
|
|
4812
|
+
writable: true,
|
|
4813
|
+
value: 5700
|
|
4814
|
+
});
|
|
4815
|
+
var UnsupportedChainIdError = class extends ProviderRpcError {
|
|
4816
|
+
constructor(cause) {
|
|
4817
|
+
super(cause, {
|
|
4818
|
+
code: UnsupportedChainIdError.code,
|
|
4819
|
+
name: "UnsupportedChainIdError",
|
|
4820
|
+
shortMessage: "This Wallet does not support the requested chain ID."
|
|
4821
|
+
});
|
|
4822
|
+
}
|
|
4823
|
+
};
|
|
4824
|
+
Object.defineProperty(UnsupportedChainIdError, "code", {
|
|
4825
|
+
enumerable: true,
|
|
4826
|
+
configurable: true,
|
|
4827
|
+
writable: true,
|
|
4828
|
+
value: 5710
|
|
4829
|
+
});
|
|
4830
|
+
var DuplicateIdError = class extends ProviderRpcError {
|
|
4831
|
+
constructor(cause) {
|
|
4832
|
+
super(cause, {
|
|
4833
|
+
code: DuplicateIdError.code,
|
|
4834
|
+
name: "DuplicateIdError",
|
|
4835
|
+
shortMessage: "There is already a bundle submitted with this ID."
|
|
4836
|
+
});
|
|
4837
|
+
}
|
|
4838
|
+
};
|
|
4839
|
+
Object.defineProperty(DuplicateIdError, "code", {
|
|
4840
|
+
enumerable: true,
|
|
4841
|
+
configurable: true,
|
|
4842
|
+
writable: true,
|
|
4843
|
+
value: 5720
|
|
4844
|
+
});
|
|
4845
|
+
var UnknownBundleIdError = class extends ProviderRpcError {
|
|
4846
|
+
constructor(cause) {
|
|
4847
|
+
super(cause, {
|
|
4848
|
+
code: UnknownBundleIdError.code,
|
|
4849
|
+
name: "UnknownBundleIdError",
|
|
4850
|
+
shortMessage: "This bundle id is unknown / has not been submitted"
|
|
4851
|
+
});
|
|
4852
|
+
}
|
|
4853
|
+
};
|
|
4854
|
+
Object.defineProperty(UnknownBundleIdError, "code", {
|
|
4855
|
+
enumerable: true,
|
|
4856
|
+
configurable: true,
|
|
4857
|
+
writable: true,
|
|
4858
|
+
value: 5730
|
|
4859
|
+
});
|
|
4860
|
+
var BundleTooLargeError = class extends ProviderRpcError {
|
|
4861
|
+
constructor(cause) {
|
|
4862
|
+
super(cause, {
|
|
4863
|
+
code: BundleTooLargeError.code,
|
|
4864
|
+
name: "BundleTooLargeError",
|
|
4865
|
+
shortMessage: "The call bundle is too large for the Wallet to process."
|
|
4866
|
+
});
|
|
4867
|
+
}
|
|
4868
|
+
};
|
|
4869
|
+
Object.defineProperty(BundleTooLargeError, "code", {
|
|
4870
|
+
enumerable: true,
|
|
4871
|
+
configurable: true,
|
|
4872
|
+
writable: true,
|
|
4873
|
+
value: 5740
|
|
4874
|
+
});
|
|
4875
|
+
var AtomicReadyWalletRejectedUpgradeError = class extends ProviderRpcError {
|
|
4876
|
+
constructor(cause) {
|
|
4877
|
+
super(cause, {
|
|
4878
|
+
code: AtomicReadyWalletRejectedUpgradeError.code,
|
|
4879
|
+
name: "AtomicReadyWalletRejectedUpgradeError",
|
|
4880
|
+
shortMessage: "The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."
|
|
4881
|
+
});
|
|
4882
|
+
}
|
|
4883
|
+
};
|
|
4884
|
+
Object.defineProperty(AtomicReadyWalletRejectedUpgradeError, "code", {
|
|
4885
|
+
enumerable: true,
|
|
4886
|
+
configurable: true,
|
|
4887
|
+
writable: true,
|
|
4888
|
+
value: 5750
|
|
4889
|
+
});
|
|
4890
|
+
var AtomicityNotSupportedError = class extends ProviderRpcError {
|
|
4891
|
+
constructor(cause) {
|
|
4892
|
+
super(cause, {
|
|
4893
|
+
code: AtomicityNotSupportedError.code,
|
|
4894
|
+
name: "AtomicityNotSupportedError",
|
|
4895
|
+
shortMessage: "The wallet does not support atomic execution but the request requires it."
|
|
4896
|
+
});
|
|
4897
|
+
}
|
|
4898
|
+
};
|
|
4899
|
+
Object.defineProperty(AtomicityNotSupportedError, "code", {
|
|
4900
|
+
enumerable: true,
|
|
4901
|
+
configurable: true,
|
|
4902
|
+
writable: true,
|
|
4903
|
+
value: 5760
|
|
4904
|
+
});
|
|
4905
|
+
var UnknownRpcError = class extends RpcError {
|
|
4906
|
+
constructor(cause) {
|
|
4907
|
+
super(cause, {
|
|
4908
|
+
name: "UnknownRpcError",
|
|
4909
|
+
shortMessage: "An unknown RPC error occurred."
|
|
4910
|
+
});
|
|
4911
|
+
}
|
|
4912
|
+
};
|
|
3490
4913
|
|
|
3491
4914
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/errors/getNodeError.js
|
|
3492
4915
|
function getNodeError(err, args) {
|
|
@@ -3937,7 +5360,7 @@ async function call(client, args) {
|
|
|
3937
5360
|
return { data: response };
|
|
3938
5361
|
} catch (err) {
|
|
3939
5362
|
const data2 = getRevertErrorData(err);
|
|
3940
|
-
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-
|
|
5363
|
+
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-4OIZJRM7.js");
|
|
3941
5364
|
if (client.ccipRead !== false && data2?.slice(0, 10) === offchainLookupSignature2 && to)
|
|
3942
5365
|
return { data: await offchainLookup2(client, { data: data2, to }) };
|
|
3943
5366
|
if (deploylessCall && data2?.slice(0, 10) === "0x101bb98d")
|
|
@@ -3984,8 +5407,8 @@ async function scheduleMulticall(client, args) {
|
|
|
3984
5407
|
id: `${client.uid}.${block}`,
|
|
3985
5408
|
wait,
|
|
3986
5409
|
shouldSplitBatch(args2) {
|
|
3987
|
-
const
|
|
3988
|
-
return
|
|
5410
|
+
const size4 = args2.reduce((size5, { data: data2 }) => size5 + (data2.length - 2), 0);
|
|
5411
|
+
return size4 > batchSize * 2;
|
|
3989
5412
|
},
|
|
3990
5413
|
fn: async (requests) => {
|
|
3991
5414
|
const calls = requests.map((request) => ({
|
|
@@ -4077,7 +5500,7 @@ var OffchainLookupResponseMalformedError = class extends BaseError3 {
|
|
|
4077
5500
|
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
|
4078
5501
|
metaMessages: [
|
|
4079
5502
|
`Gateway URL: ${getUrl(url)}`,
|
|
4080
|
-
`Response: ${
|
|
5503
|
+
`Response: ${stringify2(result)}`
|
|
4081
5504
|
],
|
|
4082
5505
|
name: "OffchainLookupResponseMalformedError"
|
|
4083
5506
|
});
|
|
@@ -4107,7 +5530,7 @@ function isAddressEqual(a, b) {
|
|
|
4107
5530
|
// ../../node_modules/.pnpm/viem@2.40.3_bufferutil@4.0.8_typescript@5.4.3_utf-8-validate@5.0.10_zod@3.25.76/node_modules/viem/_esm/utils/abi/decodeFunctionData.js
|
|
4108
5531
|
function decodeFunctionData(parameters) {
|
|
4109
5532
|
const { abi, data } = parameters;
|
|
4110
|
-
const signature =
|
|
5533
|
+
const signature = slice3(data, 0, 4);
|
|
4111
5534
|
const description = abi.find((x) => x.type === "function" && signature === toFunctionSelector(formatAbiItem2(x)));
|
|
4112
5535
|
if (!description)
|
|
4113
5536
|
throw new AbiFunctionSignatureNotFoundError(signature, {
|
|
@@ -4115,7 +5538,7 @@ function decodeFunctionData(parameters) {
|
|
|
4115
5538
|
});
|
|
4116
5539
|
return {
|
|
4117
5540
|
functionName: description.name,
|
|
4118
|
-
args: "inputs" in description && description.inputs && description.inputs.length > 0 ? decodeAbiParameters(description.inputs,
|
|
5541
|
+
args: "inputs" in description && description.inputs && description.inputs.length > 0 ? decodeAbiParameters(description.inputs, slice3(data, 4)) : void 0
|
|
4119
5542
|
};
|
|
4120
5543
|
}
|
|
4121
5544
|
|
|
@@ -4252,7 +5675,7 @@ async function offchainLookup(client, { blockNumber, blockTag, data, to }) {
|
|
|
4252
5675
|
const { data: data_ } = await call(client, {
|
|
4253
5676
|
blockNumber,
|
|
4254
5677
|
blockTag,
|
|
4255
|
-
data:
|
|
5678
|
+
data: concat2([
|
|
4256
5679
|
callbackSelector,
|
|
4257
5680
|
encodeAbiParameters([{ type: "bytes" }, { type: "bytes" }], [result, extraData])
|
|
4258
5681
|
]),
|
|
@@ -4292,7 +5715,7 @@ async function ccipRequest({ data, sender, urls }) {
|
|
|
4292
5715
|
if (!response.ok) {
|
|
4293
5716
|
error = new HttpRequestError({
|
|
4294
5717
|
body,
|
|
4295
|
-
details: result?.error ?
|
|
5718
|
+
details: result?.error ? stringify2(result.error) : response.statusText,
|
|
4296
5719
|
headers: response.headers,
|
|
4297
5720
|
status: response.status,
|
|
4298
5721
|
url
|
|
@@ -4321,37 +5744,175 @@ async function ccipRequest({ data, sender, urls }) {
|
|
|
4321
5744
|
export {
|
|
4322
5745
|
formatAbiItem2 as formatAbiItem,
|
|
4323
5746
|
isHex,
|
|
4324
|
-
|
|
5747
|
+
size3 as size,
|
|
4325
5748
|
BaseError3 as BaseError,
|
|
5749
|
+
AbiConstructorNotFoundError,
|
|
5750
|
+
AbiConstructorParamsNotFoundError,
|
|
4326
5751
|
AbiDecodingDataSizeTooSmallError,
|
|
4327
5752
|
AbiDecodingZeroDataError,
|
|
5753
|
+
AbiEncodingArrayLengthMismatchError,
|
|
5754
|
+
AbiEncodingBytesSizeMismatchError,
|
|
5755
|
+
AbiEncodingLengthMismatchError,
|
|
5756
|
+
AbiErrorSignatureNotFoundError,
|
|
5757
|
+
AbiEventSignatureEmptyTopicsError,
|
|
5758
|
+
AbiEventSignatureNotFoundError,
|
|
5759
|
+
AbiEventNotFoundError,
|
|
4328
5760
|
AbiFunctionNotFoundError,
|
|
4329
5761
|
AbiFunctionOutputsNotFoundError,
|
|
4330
5762
|
AbiFunctionSignatureNotFoundError,
|
|
5763
|
+
BytesSizeMismatchError,
|
|
5764
|
+
DecodeLogDataMismatch,
|
|
5765
|
+
DecodeLogTopicsMismatch,
|
|
5766
|
+
InvalidAbiEncodingTypeError,
|
|
4331
5767
|
InvalidAbiDecodingTypeError,
|
|
5768
|
+
InvalidArrayError,
|
|
4332
5769
|
InvalidDefinitionTypeError,
|
|
4333
5770
|
padHex,
|
|
4334
|
-
|
|
5771
|
+
trim3 as trim,
|
|
5772
|
+
hexToBigInt,
|
|
5773
|
+
hexToBool,
|
|
5774
|
+
hexToNumber,
|
|
4335
5775
|
toHex,
|
|
5776
|
+
boolToHex,
|
|
4336
5777
|
bytesToHex,
|
|
5778
|
+
numberToHex,
|
|
5779
|
+
stringToHex,
|
|
5780
|
+
toBytes2 as toBytes,
|
|
4337
5781
|
hexToBytes,
|
|
4338
5782
|
stringToBytes,
|
|
5783
|
+
keccak_256,
|
|
5784
|
+
keccak256,
|
|
4339
5785
|
toEventSelector,
|
|
5786
|
+
InvalidAddressError,
|
|
5787
|
+
LruMap,
|
|
4340
5788
|
checksumAddress,
|
|
4341
|
-
|
|
5789
|
+
getAddress,
|
|
5790
|
+
isAddress,
|
|
5791
|
+
concat2 as concat,
|
|
5792
|
+
concatHex,
|
|
5793
|
+
slice3 as slice,
|
|
4342
5794
|
sliceBytes,
|
|
5795
|
+
sliceHex,
|
|
5796
|
+
bytesRegex2 as bytesRegex,
|
|
5797
|
+
integerRegex2 as integerRegex,
|
|
5798
|
+
encodeAbiParameters,
|
|
4343
5799
|
toFunctionSelector,
|
|
4344
5800
|
getAbiItem,
|
|
5801
|
+
parseAccount,
|
|
5802
|
+
encodeFunctionData,
|
|
5803
|
+
PositionOutOfBoundsError,
|
|
5804
|
+
createCursor,
|
|
4345
5805
|
bytesToBigInt,
|
|
4346
5806
|
bytesToBool,
|
|
4347
5807
|
bytesToNumber,
|
|
4348
5808
|
bytesToString,
|
|
5809
|
+
decodeAbiParameters,
|
|
4349
5810
|
decodeErrorResult,
|
|
5811
|
+
stringify2 as stringify,
|
|
5812
|
+
formatAbiItemWithArgs,
|
|
5813
|
+
formatUnits,
|
|
5814
|
+
formatEther,
|
|
5815
|
+
formatGwei,
|
|
5816
|
+
prettyPrint,
|
|
5817
|
+
InvalidSerializableTransactionError,
|
|
5818
|
+
TransactionExecutionError,
|
|
5819
|
+
TransactionNotFoundError,
|
|
5820
|
+
TransactionReceiptNotFoundError,
|
|
5821
|
+
TransactionReceiptRevertedError,
|
|
5822
|
+
WaitForTransactionReceiptTimeoutError,
|
|
5823
|
+
CallExecutionError,
|
|
5824
|
+
ContractFunctionExecutionError,
|
|
5825
|
+
ContractFunctionRevertedError,
|
|
5826
|
+
ContractFunctionZeroDataError,
|
|
5827
|
+
RawContractError,
|
|
5828
|
+
HttpRequestError,
|
|
5829
|
+
RpcRequestError,
|
|
5830
|
+
TimeoutError,
|
|
5831
|
+
ParseRpcError,
|
|
5832
|
+
InvalidRequestRpcError,
|
|
5833
|
+
MethodNotFoundRpcError,
|
|
5834
|
+
InvalidParamsRpcError,
|
|
5835
|
+
InternalRpcError,
|
|
5836
|
+
InvalidInputRpcError,
|
|
5837
|
+
ResourceNotFoundRpcError,
|
|
5838
|
+
ResourceUnavailableRpcError,
|
|
5839
|
+
TransactionRejectedRpcError,
|
|
5840
|
+
MethodNotSupportedRpcError,
|
|
5841
|
+
LimitExceededRpcError,
|
|
5842
|
+
JsonRpcVersionUnsupportedError,
|
|
5843
|
+
UserRejectedRequestError,
|
|
5844
|
+
UnauthorizedProviderError,
|
|
5845
|
+
UnsupportedProviderMethodError,
|
|
5846
|
+
ProviderDisconnectedError,
|
|
5847
|
+
ChainDisconnectedError,
|
|
5848
|
+
SwitchChainError,
|
|
5849
|
+
UnsupportedNonOptionalCapabilityError,
|
|
5850
|
+
UnsupportedChainIdError,
|
|
5851
|
+
DuplicateIdError,
|
|
5852
|
+
UnknownBundleIdError,
|
|
5853
|
+
BundleTooLargeError,
|
|
5854
|
+
AtomicReadyWalletRejectedUpgradeError,
|
|
5855
|
+
AtomicityNotSupportedError,
|
|
5856
|
+
UnknownRpcError,
|
|
5857
|
+
UnknownNodeError,
|
|
5858
|
+
getNodeError,
|
|
5859
|
+
extract,
|
|
5860
|
+
formatTransactionRequest,
|
|
5861
|
+
serializeStateOverride,
|
|
5862
|
+
assertRequest,
|
|
5863
|
+
isAddressEqual,
|
|
4350
5864
|
decodeFunctionResult,
|
|
5865
|
+
BaseError2,
|
|
5866
|
+
stringify as stringify2,
|
|
5867
|
+
from,
|
|
5868
|
+
fromHex,
|
|
5869
|
+
fromString,
|
|
5870
|
+
size as size2,
|
|
5871
|
+
slice as slice2,
|
|
5872
|
+
toBigInt2 as toBigInt,
|
|
5873
|
+
toBoolean,
|
|
5874
|
+
toNumber2 as toNumber,
|
|
5875
|
+
toString,
|
|
5876
|
+
trimLeft,
|
|
5877
|
+
validate,
|
|
5878
|
+
concat as concat2,
|
|
5879
|
+
from2,
|
|
5880
|
+
fromBoolean,
|
|
5881
|
+
fromBytes,
|
|
5882
|
+
fromNumber,
|
|
5883
|
+
fromString2,
|
|
5884
|
+
padLeft,
|
|
5885
|
+
padRight,
|
|
5886
|
+
slice2 as slice3,
|
|
5887
|
+
size2 as size3,
|
|
5888
|
+
trimLeft2,
|
|
5889
|
+
toNumber as toNumber2,
|
|
5890
|
+
validate2,
|
|
5891
|
+
IntegerOutOfRangeError,
|
|
5892
|
+
toRpc2 as toRpc,
|
|
5893
|
+
multicall3Abi,
|
|
5894
|
+
universalResolverResolveAbi,
|
|
5895
|
+
universalResolverReverseAbi,
|
|
5896
|
+
textResolverAbi,
|
|
5897
|
+
addressResolverAbi,
|
|
5898
|
+
erc1271Abi,
|
|
5899
|
+
erc6492SignatureValidatorAbi,
|
|
5900
|
+
deploylessCallViaBytecodeBytecode,
|
|
5901
|
+
erc6492SignatureValidatorByteCode,
|
|
5902
|
+
multicall3Bytecode,
|
|
5903
|
+
ChainDoesNotSupportContract,
|
|
5904
|
+
ClientChainNotConfiguredError,
|
|
5905
|
+
encodeDeployData,
|
|
5906
|
+
getChainContractAddress,
|
|
5907
|
+
getCallError,
|
|
5908
|
+
withResolvers,
|
|
5909
|
+
createBatchScheduler,
|
|
4351
5910
|
decodeFunctionData,
|
|
5911
|
+
localBatchGatewayUrl,
|
|
4352
5912
|
offchainLookupSignature,
|
|
4353
5913
|
offchainLookupAbiItem,
|
|
4354
5914
|
offchainLookup,
|
|
4355
|
-
ccipRequest
|
|
5915
|
+
ccipRequest,
|
|
5916
|
+
call
|
|
4356
5917
|
};
|
|
4357
|
-
//# sourceMappingURL=chunk-
|
|
5918
|
+
//# sourceMappingURL=chunk-S6O6Q2GQ.js.map
|