viem 0.0.1-alpha.34 → 0.0.1-alpha.35
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/abi/package.json +4 -0
- package/dist/abi.d.ts +5 -0
- package/dist/abi.js +11 -0
- package/dist/abi.js.map +1 -0
- package/dist/abi.mjs +11 -0
- package/dist/abi.mjs.map +1 -0
- package/dist/{chain-ce6e149c.d.ts → chain-145cfaf3.d.ts} +1 -1
- package/dist/{chain-4a0d4164.d.ts → chain-7b7ac245.d.ts} +2 -2
- package/dist/chains.d.ts +3 -3
- package/dist/chains.js +46 -46
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-7ALCXZ5K.js → chunk-3FT7UKPT.js} +75 -75
- package/dist/chunk-3FT7UKPT.js.map +1 -0
- package/dist/{chunk-EJEZIHXK.js → chunk-57YM6E7I.js} +22 -22
- package/dist/{chunk-KQQLLKZV.mjs → chunk-5NDMORWZ.mjs} +3 -3
- package/dist/{chunk-IUCGWGPX.js → chunk-A665BF7O.js} +24 -16
- package/dist/chunk-A665BF7O.js.map +1 -0
- package/dist/{chunk-F76TECTY.js → chunk-HQCSH22G.js} +126 -82
- package/dist/chunk-HQCSH22G.js.map +1 -0
- package/dist/{chunk-VP57P6CD.mjs → chunk-PBW4YL37.mjs} +87 -43
- package/dist/chunk-PBW4YL37.mjs.map +1 -0
- package/dist/{chunk-TNN5X44H.mjs → chunk-PH5LCMME.mjs} +10 -2
- package/dist/chunk-PH5LCMME.mjs.map +1 -0
- package/dist/{chunk-EBLS4P77.js → chunk-TJK6AFBM.js} +14 -14
- package/dist/{chunk-EBLS4P77.js.map → chunk-TJK6AFBM.js.map} +1 -1
- package/dist/{chunk-VHZHROXW.mjs → chunk-WQDVW7EJ.mjs} +2 -2
- package/dist/chunk-WQDVW7EJ.mjs.map +1 -0
- package/dist/{chunk-NMET3ZHG.mjs → chunk-YEVW7GK5.mjs} +2 -2
- package/dist/{chunk-NMET3ZHG.mjs.map → chunk-YEVW7GK5.mjs.map} +1 -1
- package/dist/contract.d.ts +7 -8
- package/dist/contract.js +4 -4
- package/dist/contract.mjs +10 -10
- package/dist/{createClient-8a8b4bf4.d.ts → createClient-7c715e2c.d.ts} +2 -2
- package/dist/{createPublicClient-b5afe6b8.d.ts → createPublicClient-4d24afb2.d.ts} +122 -9
- package/dist/{eip1193-8c021438.d.ts → eip1193-d538ae6d.d.ts} +11 -1
- package/dist/{getAbiItem-d7aa40b1.d.ts → encodeFunctionResult-f59f4cfe.d.ts} +3 -25
- package/dist/ens.d.ts +4 -5
- package/dist/ens.js +4 -4
- package/dist/ens.mjs +3 -3
- package/dist/{formatAbiItem-6e00e5e6.d.ts → formatAbiItem-89d97367.d.ts} +1 -1
- package/dist/getAbiItem-c9cbc8b8.d.ts +22 -0
- package/dist/index.d.ts +12 -13
- package/dist/index.js +91 -90
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -23
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-ce3a9dfa.d.ts → parseGwei-ad6d1914.d.ts} +5 -6
- package/dist/public.d.ts +5 -6
- package/dist/public.js +3 -3
- package/dist/public.mjs +2 -2
- package/dist/{test-5d5828c9.d.ts → test-8646fb50.d.ts} +9 -9
- package/dist/test.d.ts +5 -5
- package/dist/test.js +3 -3
- package/dist/test.mjs +2 -2
- package/dist/utils/index.d.ts +12 -14
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +5 -5
- package/dist/wallet.d.ts +5 -5
- package/dist/wallet.js +4 -3
- package/dist/wallet.mjs +3 -2
- package/dist/window.d.ts +2 -2
- package/package.json +8 -2
- package/dist/chunk-7ALCXZ5K.js.map +0 -1
- package/dist/chunk-F76TECTY.js.map +0 -1
- package/dist/chunk-IUCGWGPX.js.map +0 -1
- package/dist/chunk-TNN5X44H.mjs.map +0 -1
- package/dist/chunk-VHZHROXW.mjs.map +0 -1
- package/dist/chunk-VP57P6CD.mjs.map +0 -1
- package/dist/wallet-5ab86528.d.ts +0 -115
- /package/dist/{chunk-EJEZIHXK.js.map → chunk-57YM6E7I.js.map} +0 -0
- /package/dist/{chunk-KQQLLKZV.mjs.map → chunk-5NDMORWZ.mjs.map} +0 -0
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
|
|
9
9
|
var package_default = {
|
10
10
|
name: "viem",
|
11
11
|
description: "TypeScript Interface for Ethereum",
|
12
|
-
version: "0.0.1-alpha.
|
12
|
+
version: "0.0.1-alpha.35",
|
13
13
|
scripts: {
|
14
14
|
anvil: "source .env && anvil --fork-url $VITE_ANVIL_FORK_URL --fork-block-number $VITE_ANVIL_BLOCK_NUMBER --block-time $VITE_ANVIL_BLOCK_TIME",
|
15
15
|
bench: "vitest bench --no-threads",
|
@@ -40,6 +40,7 @@ var package_default = {
|
|
40
40
|
tsup: {
|
41
41
|
entry: [
|
42
42
|
"src/index.ts",
|
43
|
+
"src/abi.ts",
|
43
44
|
"src/chains.ts",
|
44
45
|
"src/contract.ts",
|
45
46
|
"src/ens.ts",
|
@@ -51,6 +52,7 @@ var package_default = {
|
|
51
52
|
]
|
52
53
|
},
|
53
54
|
files: [
|
55
|
+
"/abi",
|
54
56
|
"/dist",
|
55
57
|
"/chains",
|
56
58
|
"/contract",
|
@@ -67,6 +69,11 @@ var package_default = {
|
|
67
69
|
module: "./dist/index.mts",
|
68
70
|
default: "./dist/index.js"
|
69
71
|
},
|
72
|
+
"./abi": {
|
73
|
+
types: "./dist/abi.d.ts",
|
74
|
+
module: "./dist/abi.mts",
|
75
|
+
default: "./dist/abi.js"
|
76
|
+
},
|
70
77
|
"./chains": {
|
71
78
|
types: "./dist/chains.d.ts",
|
72
79
|
module: "./dist/chains.mts",
|
@@ -116,7 +123,7 @@ var package_default = {
|
|
116
123
|
dependencies: {
|
117
124
|
"@noble/hashes": "^1.1.2",
|
118
125
|
"@wagmi/chains": "~0.2.8",
|
119
|
-
abitype: "~0.
|
126
|
+
abitype: "~0.5.0",
|
120
127
|
"idna-uts46-hx": "^4.1.2",
|
121
128
|
"isomorphic-ws": "^5.0.0",
|
122
129
|
ws: "^8.12.0"
|
@@ -268,6 +275,16 @@ var AbiEncodingArrayLengthMismatchError = class extends BaseError {
|
|
268
275
|
__publicField(this, "name", "AbiEncodingArrayLengthMismatchError");
|
269
276
|
}
|
270
277
|
};
|
278
|
+
var AbiEncodingBytesSizeMismatchError = class extends BaseError {
|
279
|
+
constructor({ expectedSize, value }) {
|
280
|
+
super(
|
281
|
+
`Size of bytes "${value}" (bytes${size(
|
282
|
+
value
|
283
|
+
)}) does not match expected size (bytes${expectedSize}).`
|
284
|
+
);
|
285
|
+
__publicField(this, "name", "AbiEncodingBytesSizeMismatchError");
|
286
|
+
}
|
287
|
+
};
|
271
288
|
var AbiEncodingLengthMismatchError = class extends BaseError {
|
272
289
|
constructor({
|
273
290
|
expectedLength,
|
@@ -489,6 +506,23 @@ var ChainDoesNotSupportContract = class extends BaseError {
|
|
489
506
|
__publicField(this, "name", "ChainDoesNotSupportContract");
|
490
507
|
}
|
491
508
|
};
|
509
|
+
var ChainMismatchError = class extends BaseError {
|
510
|
+
constructor({
|
511
|
+
chain,
|
512
|
+
currentChainId
|
513
|
+
}) {
|
514
|
+
super(
|
515
|
+
`The current chain (id: ${currentChainId}) does not match the chain passed to the request (id: ${chain.id} \u2013 ${chain.name}).`,
|
516
|
+
{
|
517
|
+
metaMessages: [
|
518
|
+
`Current Chain ID: ${currentChainId}`,
|
519
|
+
`Expected Chain ID: ${chain.id} \u2013 ${chain.name}`
|
520
|
+
]
|
521
|
+
}
|
522
|
+
);
|
523
|
+
__publicField(this, "name", "ChainMismatchError");
|
524
|
+
}
|
525
|
+
};
|
492
526
|
|
493
527
|
// src/constants/abis.ts
|
494
528
|
var multicall3Abi = [
|
@@ -593,9 +627,10 @@ var TransactionExecutionError = class extends BaseError {
|
|
593
627
|
value
|
594
628
|
}) {
|
595
629
|
const prettyArgs = prettyPrint({
|
630
|
+
chain: chain && `${_optionalChain([chain, 'optionalAccess', _4 => _4.name])} (id: ${_optionalChain([chain, 'optionalAccess', _5 => _5.id])})`,
|
596
631
|
from,
|
597
632
|
to,
|
598
|
-
value: typeof value !== "undefined" && `${formatEther(value)} ${_optionalChain([chain, 'optionalAccess',
|
633
|
+
value: typeof value !== "undefined" && `${formatEther(value)} ${_optionalChain([chain, 'optionalAccess', _6 => _6.nativeCurrency, 'access', _7 => _7.symbol]) || "ETH"}`,
|
599
634
|
data,
|
600
635
|
gas,
|
601
636
|
gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
|
@@ -673,7 +708,7 @@ var CallExecutionError = class extends BaseError {
|
|
673
708
|
const prettyArgs = prettyPrint({
|
674
709
|
from,
|
675
710
|
to,
|
676
|
-
value: typeof value !== "undefined" && `${formatEther(value)} ${_optionalChain([chain, 'optionalAccess',
|
711
|
+
value: typeof value !== "undefined" && `${formatEther(value)} ${_optionalChain([chain, 'optionalAccess', _8 => _8.nativeCurrency, 'access', _9 => _9.symbol]) || "ETH"}`,
|
677
712
|
data,
|
678
713
|
gas,
|
679
714
|
gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
|
@@ -715,7 +750,7 @@ var ContractFunctionExecutionError = class extends BaseError {
|
|
715
750
|
const prettyArgs = prettyPrint({
|
716
751
|
address: contractAddress && getContractAddress(contractAddress),
|
717
752
|
function: functionWithParams,
|
718
|
-
args: formattedArgs && formattedArgs !== "()" && `${[...Array(_nullishCoalesce(_optionalChain([functionName, 'optionalAccess',
|
753
|
+
args: formattedArgs && formattedArgs !== "()" && `${[...Array(_nullishCoalesce(_optionalChain([functionName, 'optionalAccess', _10 => _10.length]), () => ( 0))).keys()].map(() => " ").join("")}${formattedArgs}`,
|
719
754
|
sender
|
720
755
|
});
|
721
756
|
super(
|
@@ -774,7 +809,7 @@ var ContractFunctionRevertedError = class extends BaseError {
|
|
774
809
|
}) : void 0;
|
775
810
|
metaMessages = [
|
776
811
|
errorWithParams ? `Error: ${errorWithParams}` : "",
|
777
|
-
formattedArgs && formattedArgs !== "()" ? ` ${[...Array(_nullishCoalesce(_optionalChain([errorName, 'optionalAccess',
|
812
|
+
formattedArgs && formattedArgs !== "()" ? ` ${[...Array(_nullishCoalesce(_optionalChain([errorName, 'optionalAccess', _11 => _11.length]), () => ( 0))).keys()].map(() => " ").join("")}${formattedArgs}` : ""
|
778
813
|
];
|
779
814
|
}
|
780
815
|
} else if (message)
|
@@ -900,7 +935,7 @@ var EstimateGasExecutionError = class extends BaseError {
|
|
900
935
|
const prettyArgs = prettyPrint({
|
901
936
|
from,
|
902
937
|
to,
|
903
|
-
value: typeof value !== "undefined" && `${formatEther(value)} ${_optionalChain([chain, 'optionalAccess',
|
938
|
+
value: typeof value !== "undefined" && `${formatEther(value)} ${_optionalChain([chain, 'optionalAccess', _12 => _12.nativeCurrency, 'access', _13 => _13.symbol]) || "ETH"}`,
|
904
939
|
data,
|
905
940
|
gas,
|
906
941
|
gasPrice: typeof gasPrice !== "undefined" && `${formatGwei(gasPrice)} gwei`,
|
@@ -937,7 +972,7 @@ var ExecutionRevertedError = class extends BaseError {
|
|
937
972
|
cause,
|
938
973
|
message
|
939
974
|
} = {}) {
|
940
|
-
const reason = _optionalChain([message, 'optionalAccess',
|
975
|
+
const reason = _optionalChain([message, 'optionalAccess', _14 => _14.replace, 'call', _15 => _15("execution reverted: ", ""), 'optionalAccess', _16 => _16.replace, 'call', _17 => _17("execution reverted", "")]);
|
941
976
|
super(
|
942
977
|
`Execution reverted ${reason ? `with reason: ${reason}` : "for an unknown reason"}.`,
|
943
978
|
{
|
@@ -1089,7 +1124,7 @@ var TipAboveFeeCapError = class extends BaseError {
|
|
1089
1124
|
__publicField(TipAboveFeeCapError, "nodeMessage", /max priority fee per gas higher than max fee per gas|tip higher than fee cap/);
|
1090
1125
|
var UnknownNodeError = class extends BaseError {
|
1091
1126
|
constructor({ cause }) {
|
1092
|
-
super(`An error occurred while executing: ${_optionalChain([cause, 'optionalAccess',
|
1127
|
+
super(`An error occurred while executing: ${_optionalChain([cause, 'optionalAccess', _18 => _18.message])}`, {
|
1093
1128
|
cause
|
1094
1129
|
});
|
1095
1130
|
__publicField(this, "name", "UnknownNodeError");
|
@@ -1517,11 +1552,6 @@ function stringToHex(value) {
|
|
1517
1552
|
|
1518
1553
|
// src/utils/encoding/toBytes.ts
|
1519
1554
|
var encoder = new TextEncoder();
|
1520
|
-
function boolToBytes(value) {
|
1521
|
-
const bytes = new Uint8Array(1);
|
1522
|
-
bytes[0] = Number(value);
|
1523
|
-
return bytes;
|
1524
|
-
}
|
1525
1555
|
function toBytes(value) {
|
1526
1556
|
if (typeof value === "number" || typeof value === "bigint")
|
1527
1557
|
return numberToBytes(value);
|
@@ -1531,6 +1561,11 @@ function toBytes(value) {
|
|
1531
1561
|
return hexToBytes(value);
|
1532
1562
|
return stringToBytes(value);
|
1533
1563
|
}
|
1564
|
+
function boolToBytes(value) {
|
1565
|
+
const bytes = new Uint8Array(1);
|
1566
|
+
bytes[0] = Number(value);
|
1567
|
+
return bytes;
|
1568
|
+
}
|
1534
1569
|
function hexToBytes(hex_) {
|
1535
1570
|
let hex = hex_.slice(2);
|
1536
1571
|
if (hex.length % 2)
|
@@ -1541,7 +1576,7 @@ function hexToBytes(hex_) {
|
|
1541
1576
|
const hexByte = hex.slice(start, start + 2);
|
1542
1577
|
const byte = Number.parseInt(hexByte, 16);
|
1543
1578
|
if (Number.isNaN(byte) || byte < 0)
|
1544
|
-
throw new
|
1579
|
+
throw new BaseError(`Invalid byte sequence ("${hexByte}" in "${hex}").`);
|
1545
1580
|
bytes[index] = byte;
|
1546
1581
|
}
|
1547
1582
|
return bytes;
|
@@ -1734,9 +1769,9 @@ function rlpToBytes(bytes, offset = 0) {
|
|
1734
1769
|
var paramsRegex = /((function|event)\s)?(.*)(\((.*)\))/;
|
1735
1770
|
function extractFunctionParts(def) {
|
1736
1771
|
const parts = def.match(paramsRegex);
|
1737
|
-
const type = _optionalChain([parts, 'optionalAccess',
|
1738
|
-
const name = _optionalChain([parts, 'optionalAccess',
|
1739
|
-
const params = _optionalChain([parts, 'optionalAccess',
|
1772
|
+
const type = _optionalChain([parts, 'optionalAccess', _19 => _19[2]]) || void 0;
|
1773
|
+
const name = _optionalChain([parts, 'optionalAccess', _20 => _20[3]]);
|
1774
|
+
const params = _optionalChain([parts, 'optionalAccess', _21 => _21[5]]) || void 0;
|
1740
1775
|
return { type, name, params };
|
1741
1776
|
}
|
1742
1777
|
function extractFunctionName(def) {
|
@@ -1744,8 +1779,8 @@ function extractFunctionName(def) {
|
|
1744
1779
|
}
|
1745
1780
|
function extractFunctionParams(def) {
|
1746
1781
|
const params = extractFunctionParts(def).params;
|
1747
|
-
const splitParams = _optionalChain([params, 'optionalAccess',
|
1748
|
-
return _optionalChain([splitParams, 'optionalAccess',
|
1782
|
+
const splitParams = _optionalChain([params, 'optionalAccess', _22 => _22.split, 'call', _23 => _23(","), 'access', _24 => _24.map, 'call', _25 => _25((x) => x.trim().split(" "))]);
|
1783
|
+
return _optionalChain([splitParams, 'optionalAccess', _26 => _26.map, 'call', _27 => _27((param) => ({
|
1749
1784
|
type: param[0],
|
1750
1785
|
name: param[1] === "indexed" ? param[2] : param[1],
|
1751
1786
|
...param[1] === "indexed" ? { indexed: true } : {}
|
@@ -1847,8 +1882,8 @@ function isAddressEqual(a, b) {
|
|
1847
1882
|
return a.toLowerCase() === b.toLowerCase();
|
1848
1883
|
}
|
1849
1884
|
|
1850
|
-
// src/utils/abi/
|
1851
|
-
function
|
1885
|
+
// src/utils/abi/encodeAbiParameters.ts
|
1886
|
+
function encodeAbiParameters(params, values) {
|
1852
1887
|
if (params.length !== values.length)
|
1853
1888
|
throw new AbiEncodingLengthMismatchError({
|
1854
1889
|
expectedLength: params.length,
|
@@ -1898,13 +1933,13 @@ function prepareParam({
|
|
1898
1933
|
return encodeNumber(value, { signed });
|
1899
1934
|
}
|
1900
1935
|
if (param.type.startsWith("bytes")) {
|
1901
|
-
return
|
1936
|
+
return encodeBytes(value, { param });
|
1902
1937
|
}
|
1903
1938
|
if (param.type === "string") {
|
1904
1939
|
return encodeString(value);
|
1905
1940
|
}
|
1906
1941
|
throw new InvalidAbiEncodingTypeError(param.type, {
|
1907
|
-
docsPath: "/docs/contract/
|
1942
|
+
docsPath: "/docs/contract/encodeAbiParameters"
|
1908
1943
|
});
|
1909
1944
|
}
|
1910
1945
|
function encodeParams(preparedParams) {
|
@@ -1932,6 +1967,8 @@ function encodeParams(preparedParams) {
|
|
1932
1967
|
return concat([...staticParams, ...dynamicParams]);
|
1933
1968
|
}
|
1934
1969
|
function encodeAddress(value) {
|
1970
|
+
if (!isAddress(value))
|
1971
|
+
throw new InvalidAddressError({ address: value });
|
1935
1972
|
return { dynamic: false, encoded: padHex(value.toLowerCase()) };
|
1936
1973
|
}
|
1937
1974
|
function encodeArray(value, {
|
@@ -1972,13 +2009,17 @@ function encodeArray(value, {
|
|
1972
2009
|
encoded: concat(preparedParams.map(({ encoded }) => encoded))
|
1973
2010
|
};
|
1974
2011
|
}
|
1975
|
-
function
|
2012
|
+
function encodeBytes(value, { param }) {
|
1976
2013
|
const [_, size_] = param.type.split("bytes");
|
1977
2014
|
if (!size_) {
|
1978
2015
|
const partsLength = Math.floor(size(value) / 32);
|
1979
2016
|
const parts = [];
|
1980
2017
|
for (let i = 0; i < partsLength + 1; i++) {
|
1981
|
-
parts.push(
|
2018
|
+
parts.push(
|
2019
|
+
padHex(slice(value, i * 32, (i + 1) * 32), {
|
2020
|
+
dir: "right"
|
2021
|
+
})
|
2022
|
+
);
|
1982
2023
|
}
|
1983
2024
|
return {
|
1984
2025
|
dynamic: true,
|
@@ -1988,6 +2029,11 @@ function toBytes2(value, { param }) {
|
|
1988
2029
|
])
|
1989
2030
|
};
|
1990
2031
|
}
|
2032
|
+
if (size(value) !== parseInt(size_))
|
2033
|
+
throw new AbiEncodingBytesSizeMismatchError({
|
2034
|
+
expectedSize: parseInt(size_),
|
2035
|
+
value
|
2036
|
+
});
|
1991
2037
|
return { dynamic: false, encoded: padHex(value, { dir: "right" }) };
|
1992
2038
|
}
|
1993
2039
|
function encodeBool(value) {
|
@@ -2038,19 +2084,16 @@ function getArrayComponents(type) {
|
|
2038
2084
|
) : void 0;
|
2039
2085
|
}
|
2040
2086
|
|
2041
|
-
// src/utils/abi/
|
2042
|
-
function
|
2087
|
+
// src/utils/abi/decodeAbiParameters.ts
|
2088
|
+
function decodeAbiParameters(params, data) {
|
2043
2089
|
if (data === "0x" && params.length > 0)
|
2044
2090
|
throw new AbiDecodingZeroDataError();
|
2045
2091
|
if (size(data) % 32 !== 0)
|
2046
2092
|
throw new AbiDecodingDataSizeInvalidError(size(data));
|
2047
|
-
|
2093
|
+
return decodeParams({
|
2048
2094
|
data,
|
2049
2095
|
params
|
2050
2096
|
});
|
2051
|
-
if (values.length === 0)
|
2052
|
-
return void 0;
|
2053
|
-
return values;
|
2054
2097
|
}
|
2055
2098
|
function decodeParams({
|
2056
2099
|
data,
|
@@ -2087,7 +2130,7 @@ function decodeParam({
|
|
2087
2130
|
return decodeString(data, { position });
|
2088
2131
|
}
|
2089
2132
|
if (param.type.startsWith("bytes")) {
|
2090
|
-
return
|
2133
|
+
return decodeBytes(data, { param, position });
|
2091
2134
|
}
|
2092
2135
|
let value = slice(data, position, position + 32);
|
2093
2136
|
if (param.type.startsWith("uint") || param.type.startsWith("int")) {
|
@@ -2100,7 +2143,7 @@ function decodeParam({
|
|
2100
2143
|
return decodeBool(value);
|
2101
2144
|
}
|
2102
2145
|
throw new InvalidAbiDecodingTypeError(param.type, {
|
2103
|
-
docsPath: "/docs/contract/
|
2146
|
+
docsPath: "/docs/contract/decodeAbiParameters"
|
2104
2147
|
});
|
2105
2148
|
}
|
2106
2149
|
function decodeAddress(value) {
|
@@ -2129,7 +2172,7 @@ function decodeArray(data, {
|
|
2129
2172
|
}
|
2130
2173
|
if (hasDynamicChild(param)) {
|
2131
2174
|
const arrayComponents = getArrayComponents(param.type);
|
2132
|
-
const dynamicChild = !_optionalChain([arrayComponents, 'optionalAccess',
|
2175
|
+
const dynamicChild = !_optionalChain([arrayComponents, 'optionalAccess', _28 => _28[0]]);
|
2133
2176
|
let consumed2 = 0;
|
2134
2177
|
let value2 = [];
|
2135
2178
|
for (let i = 0; i < length; ++i) {
|
@@ -2160,7 +2203,7 @@ function decodeArray(data, {
|
|
2160
2203
|
function decodeBool(value) {
|
2161
2204
|
return { consumed: 32, value: hexToBool(value) };
|
2162
2205
|
}
|
2163
|
-
function
|
2206
|
+
function decodeBytes(data, { param, position }) {
|
2164
2207
|
const [_, size2] = param.type.split("bytes");
|
2165
2208
|
if (!size2) {
|
2166
2209
|
const offset = hexToNumber(slice(data, position, position + 32));
|
@@ -2201,7 +2244,7 @@ function decodeTuple(data, { param, position }) {
|
|
2201
2244
|
position: consumed
|
2202
2245
|
});
|
2203
2246
|
consumed += decodedChild.consumed;
|
2204
|
-
value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess',
|
2247
|
+
value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess', _29 => _29.name])] = decodedChild.value;
|
2205
2248
|
}
|
2206
2249
|
return { consumed: 32, value };
|
2207
2250
|
}
|
@@ -2213,7 +2256,7 @@ function decodeTuple(data, { param, position }) {
|
|
2213
2256
|
position: position + consumed
|
2214
2257
|
});
|
2215
2258
|
consumed += decodedChild.consumed;
|
2216
|
-
value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess',
|
2259
|
+
value[hasUnnamedChild ? i : _optionalChain([component, 'optionalAccess', _30 => _30.name])] = decodedChild.value;
|
2217
2260
|
}
|
2218
2261
|
return { consumed, value };
|
2219
2262
|
}
|
@@ -2226,7 +2269,7 @@ function hasDynamicChild(param) {
|
|
2226
2269
|
if (type.endsWith("[]"))
|
2227
2270
|
return true;
|
2228
2271
|
if (type === "tuple")
|
2229
|
-
return _optionalChain([param, 'access',
|
2272
|
+
return _optionalChain([param, 'access', _31 => _31.components, 'optionalAccess', _32 => _32.some, 'call', _33 => _33(hasDynamicChild)]);
|
2230
2273
|
const arrayComponents = getArrayComponents(param.type);
|
2231
2274
|
if (arrayComponents && hasDynamicChild({ ...param, type: arrayComponents[1] }))
|
2232
2275
|
return true;
|
@@ -2272,7 +2315,7 @@ function decodeErrorResult({
|
|
2272
2315
|
});
|
2273
2316
|
return {
|
2274
2317
|
abiItem,
|
2275
|
-
args: "inputs" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ?
|
2318
|
+
args: "inputs" in abiItem && abiItem.inputs && abiItem.inputs.length > 0 ? decodeAbiParameters(abiItem.inputs, slice(data, 4)) : void 0,
|
2276
2319
|
errorName: abiItem.name
|
2277
2320
|
};
|
2278
2321
|
}
|
@@ -2292,7 +2335,7 @@ function decodeEventLog({
|
|
2292
2335
|
docsPath: "/docs/contract/decodeEventLog"
|
2293
2336
|
});
|
2294
2337
|
const { name, inputs } = abiItem;
|
2295
|
-
const isUnnamed = _optionalChain([inputs, 'optionalAccess',
|
2338
|
+
const isUnnamed = _optionalChain([inputs, 'optionalAccess', _34 => _34.some, 'call', _35 => _35((x) => !("name" in x && x.name))]);
|
2296
2339
|
let args = isUnnamed ? [] : {};
|
2297
2340
|
for (let i = 0; i < inputs.length; i++) {
|
2298
2341
|
const param = inputs[i];
|
@@ -2309,7 +2352,7 @@ function decodeEventLog({
|
|
2309
2352
|
}
|
2310
2353
|
if (data && data !== "0x") {
|
2311
2354
|
const params = inputs.filter((x) => !("indexed" in x && x.indexed));
|
2312
|
-
const decodedData =
|
2355
|
+
const decodedData = decodeAbiParameters(params, data);
|
2313
2356
|
if (decodedData) {
|
2314
2357
|
if (isUnnamed)
|
2315
2358
|
args = [...args, ...decodedData];
|
@@ -2328,7 +2371,7 @@ function decodeEventLog({
|
|
2328
2371
|
function decodeTopic({ param, value }) {
|
2329
2372
|
if (param.type === "string" || param.type === "bytes" || param.type === "tuple" || param.type.match(/^(.*)\[(\d+)?\]$/))
|
2330
2373
|
return value;
|
2331
|
-
const decodedArg =
|
2374
|
+
const decodedArg = decodeAbiParameters([param], value) || [];
|
2332
2375
|
return decodedArg[0];
|
2333
2376
|
}
|
2334
2377
|
|
@@ -2344,7 +2387,7 @@ function decodeFunctionData({ abi, data }) {
|
|
2344
2387
|
});
|
2345
2388
|
return {
|
2346
2389
|
functionName: description.name,
|
2347
|
-
args: "inputs" in description && description.inputs && description.inputs.length > 0 ?
|
2390
|
+
args: "inputs" in description && description.inputs && description.inputs.length > 0 ? decodeAbiParameters(description.inputs, slice(data, 4)) : void 0
|
2348
2391
|
};
|
2349
2392
|
}
|
2350
2393
|
|
@@ -2437,7 +2480,7 @@ function decodeFunctionResult({
|
|
2437
2480
|
throw new AbiFunctionNotFoundError(functionName, { docsPath });
|
2438
2481
|
if (!("outputs" in description))
|
2439
2482
|
throw new AbiFunctionOutputsNotFoundError(functionName, { docsPath });
|
2440
|
-
const values =
|
2483
|
+
const values = decodeAbiParameters(description.outputs, data);
|
2441
2484
|
if (values && values.length > 1)
|
2442
2485
|
return values;
|
2443
2486
|
if (values && values.length === 1)
|
@@ -2463,10 +2506,10 @@ function encodeDeployData({
|
|
2463
2506
|
throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath2 });
|
2464
2507
|
if (!description.inputs || description.inputs.length === 0)
|
2465
2508
|
throw new AbiConstructorParamsNotFoundError({ docsPath: docsPath2 });
|
2466
|
-
const data =
|
2467
|
-
|
2468
|
-
|
2469
|
-
|
2509
|
+
const data = encodeAbiParameters(
|
2510
|
+
description.inputs,
|
2511
|
+
args
|
2512
|
+
);
|
2470
2513
|
return concatHex([bytecode, data]);
|
2471
2514
|
}
|
2472
2515
|
|
@@ -2486,7 +2529,7 @@ function encodeErrorResult({ abi, errorName, args }) {
|
|
2486
2529
|
if (args && args.length > 0) {
|
2487
2530
|
if (!("inputs" in description && description.inputs))
|
2488
2531
|
throw new AbiErrorInputsNotFoundError(errorName, { docsPath: docsPath3 });
|
2489
|
-
data =
|
2532
|
+
data = encodeAbiParameters(description.inputs, args);
|
2490
2533
|
}
|
2491
2534
|
return concatHex([signature, data]);
|
2492
2535
|
}
|
@@ -2502,8 +2545,8 @@ function encodeEventTopics({ abi, eventName, args }) {
|
|
2502
2545
|
const signature = getEventSelector(definition);
|
2503
2546
|
let topics = [];
|
2504
2547
|
if (args && "inputs" in abiItem) {
|
2505
|
-
const args_ = Array.isArray(args) ? args : _nullishCoalesce(_optionalChain([abiItem, 'access',
|
2506
|
-
topics = _nullishCoalesce(_optionalChain([abiItem, 'access',
|
2548
|
+
const args_ = Array.isArray(args) ? args : _nullishCoalesce(_optionalChain([abiItem, 'access', _36 => _36.inputs, 'optionalAccess', _37 => _37.map, 'call', _38 => _38((x) => args[x.name])]), () => ( []));
|
2549
|
+
topics = _nullishCoalesce(_optionalChain([abiItem, 'access', _39 => _39.inputs, 'optionalAccess', _40 => _40.filter, 'call', _41 => _41((param) => "indexed" in param && param.indexed), 'access', _42 => _42.map, 'call', _43 => _43(
|
2507
2550
|
(param, i) => Array.isArray(args_[i]) ? args_[i].map(
|
2508
2551
|
(_, j) => encodeArg({ param, value: args_[i][j] })
|
2509
2552
|
) : args_[i] ? encodeArg({ param, value: args_[i] }) : null
|
@@ -2519,7 +2562,7 @@ function encodeArg({
|
|
2519
2562
|
return keccak256(toBytes(value));
|
2520
2563
|
if (param.type === "tuple" || param.type.match(/^(.*)\[(\d+)?\]$/))
|
2521
2564
|
throw new FilterTypeNotSupportedError(param.type);
|
2522
|
-
return
|
2565
|
+
return encodeAbiParameters([param], [value]);
|
2523
2566
|
}
|
2524
2567
|
|
2525
2568
|
// src/utils/abi/encodeFunctionData.ts
|
@@ -2535,10 +2578,10 @@ function encodeFunctionData({ abi, args, functionName }) {
|
|
2535
2578
|
});
|
2536
2579
|
const definition = formatAbiItem(description);
|
2537
2580
|
const signature = getFunctionSelector(definition);
|
2538
|
-
const data = "inputs" in description && description.inputs ?
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2581
|
+
const data = "inputs" in description && description.inputs ? encodeAbiParameters(
|
2582
|
+
description.inputs,
|
2583
|
+
_nullishCoalesce(args, () => ( []))
|
2584
|
+
) : void 0;
|
2542
2585
|
return concatHex([signature, _nullishCoalesce(data, () => ( "0x"))]);
|
2543
2586
|
}
|
2544
2587
|
|
@@ -2559,7 +2602,7 @@ function encodeFunctionResult({
|
|
2559
2602
|
let values = Array.isArray(result) ? result : [result];
|
2560
2603
|
if (description.outputs.length === 0 && !values[0])
|
2561
2604
|
values = [];
|
2562
|
-
return
|
2605
|
+
return encodeAbiParameters(description.outputs, values);
|
2563
2606
|
}
|
2564
2607
|
|
2565
2608
|
// src/utils/abi/formatAbiItemWithArgs.ts
|
@@ -2675,7 +2718,7 @@ function withTimeout(fn, {
|
|
2675
2718
|
}
|
2676
2719
|
}, timeout);
|
2677
2720
|
}
|
2678
|
-
resolve(await fn({ signal: _optionalChain([controller, 'optionalAccess',
|
2721
|
+
resolve(await fn({ signal: _optionalChain([controller, 'optionalAccess', _44 => _44.signal]) }));
|
2679
2722
|
} catch (err) {
|
2680
2723
|
if (err.name === "AbortError")
|
2681
2724
|
reject(errorInstance);
|
@@ -2741,8 +2784,8 @@ function buildRequest(request, {
|
|
2741
2784
|
{
|
2742
2785
|
delay: ({ count, error }) => {
|
2743
2786
|
if (error && error instanceof HttpRequestError) {
|
2744
|
-
const retryAfter = _optionalChain([error, 'optionalAccess',
|
2745
|
-
if (_optionalChain([retryAfter, 'optionalAccess',
|
2787
|
+
const retryAfter = _optionalChain([error, 'optionalAccess', _45 => _45.headers, 'optionalAccess', _46 => _46.get, 'call', _47 => _47("Retry-After")]);
|
2788
|
+
if (_optionalChain([retryAfter, 'optionalAccess', _48 => _48.match, 'call', _49 => _49(/\d/)]))
|
2746
2789
|
return parseInt(retryAfter) * 1e3;
|
2747
2790
|
}
|
2748
2791
|
return ~~(1 << count) * retryDelay;
|
@@ -2777,7 +2820,7 @@ function defineFormatter({
|
|
2777
2820
|
}
|
2778
2821
|
return {
|
2779
2822
|
...formatted,
|
2780
|
-
..._optionalChain([formatOverride, 'optionalCall',
|
2823
|
+
..._optionalChain([formatOverride, 'optionalCall', _50 => _50(data)])
|
2781
2824
|
};
|
2782
2825
|
};
|
2783
2826
|
}
|
@@ -2817,7 +2860,7 @@ var defineTransaction = defineFormatter({ format: formatTransaction });
|
|
2817
2860
|
|
2818
2861
|
// src/utils/formatters/block.ts
|
2819
2862
|
function formatBlock(block) {
|
2820
|
-
const transactions = _optionalChain([block, 'access',
|
2863
|
+
const transactions = _optionalChain([block, 'access', _51 => _51.transactions, 'optionalAccess', _52 => _52.map, 'call', _53 => _53((transaction) => {
|
2821
2864
|
if (typeof transaction === "string")
|
2822
2865
|
return transaction;
|
2823
2866
|
return formatTransaction(transaction);
|
@@ -2843,7 +2886,7 @@ function extract(value, { formatter }) {
|
|
2843
2886
|
return {};
|
2844
2887
|
const keys = Object.keys(formatter({}));
|
2845
2888
|
return keys.reduce((data, key) => {
|
2846
|
-
if (_optionalChain([value, 'optionalAccess',
|
2889
|
+
if (_optionalChain([value, 'optionalAccess', _54 => _54.hasOwnProperty, 'call', _55 => _55(key)])) {
|
2847
2890
|
;
|
2848
2891
|
data[key] = value[key];
|
2849
2892
|
}
|
@@ -2857,7 +2900,7 @@ function formatFeeHistory(feeHistory) {
|
|
2857
2900
|
baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),
|
2858
2901
|
gasUsedRatio: feeHistory.gasUsedRatio,
|
2859
2902
|
oldestBlock: BigInt(feeHistory.oldestBlock),
|
2860
|
-
reward: _optionalChain([feeHistory, 'access',
|
2903
|
+
reward: _optionalChain([feeHistory, 'access', _56 => _56.reward, 'optionalAccess', _57 => _57.map, 'call', _58 => _58(
|
2861
2904
|
(reward) => reward.map((value) => BigInt(value))
|
2862
2905
|
)])
|
2863
2906
|
};
|
@@ -2934,34 +2977,34 @@ function getNodeError(err, args = {}) {
|
|
2934
2977
|
if (FeeCapTooHighError.nodeMessage.test(message))
|
2935
2978
|
return new FeeCapTooHighError({
|
2936
2979
|
cause: err,
|
2937
|
-
maxFeePerGas: _optionalChain([args, 'optionalAccess',
|
2980
|
+
maxFeePerGas: _optionalChain([args, 'optionalAccess', _59 => _59.maxFeePerGas])
|
2938
2981
|
});
|
2939
2982
|
else if (FeeCapTooLowError.nodeMessage.test(message))
|
2940
2983
|
return new FeeCapTooLowError({
|
2941
2984
|
cause: err,
|
2942
|
-
maxFeePerGas: _optionalChain([args, 'optionalAccess',
|
2985
|
+
maxFeePerGas: _optionalChain([args, 'optionalAccess', _60 => _60.maxFeePerGas])
|
2943
2986
|
});
|
2944
2987
|
else if (NonceTooHighError.nodeMessage.test(message))
|
2945
|
-
return new NonceTooHighError({ cause: err, nonce: _optionalChain([args, 'optionalAccess',
|
2988
|
+
return new NonceTooHighError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _61 => _61.nonce]) });
|
2946
2989
|
else if (NonceTooLowError.nodeMessage.test(message))
|
2947
|
-
return new NonceTooLowError({ cause: err, nonce: _optionalChain([args, 'optionalAccess',
|
2990
|
+
return new NonceTooLowError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _62 => _62.nonce]) });
|
2948
2991
|
else if (NonceMaxValueError.nodeMessage.test(message))
|
2949
|
-
return new NonceMaxValueError({ cause: err, nonce: _optionalChain([args, 'optionalAccess',
|
2992
|
+
return new NonceMaxValueError({ cause: err, nonce: _optionalChain([args, 'optionalAccess', _63 => _63.nonce]) });
|
2950
2993
|
else if (InsufficientFundsError.nodeMessage.test(message))
|
2951
2994
|
return new InsufficientFundsError({ cause: err });
|
2952
2995
|
else if (IntrinsicGasTooHighError.nodeMessage.test(message))
|
2953
|
-
return new IntrinsicGasTooHighError({ cause: err, gas: _optionalChain([args, 'optionalAccess',
|
2996
|
+
return new IntrinsicGasTooHighError({ cause: err, gas: _optionalChain([args, 'optionalAccess', _64 => _64.gas]) });
|
2954
2997
|
else if (IntrinsicGasTooLowError.nodeMessage.test(message))
|
2955
|
-
return new IntrinsicGasTooLowError({ cause: err, gas: _optionalChain([args, 'optionalAccess',
|
2998
|
+
return new IntrinsicGasTooLowError({ cause: err, gas: _optionalChain([args, 'optionalAccess', _65 => _65.gas]) });
|
2956
2999
|
else if (TransactionTypeNotSupportedError.nodeMessage.test(message))
|
2957
3000
|
return new TransactionTypeNotSupportedError({ cause: err });
|
2958
3001
|
else if (TipAboveFeeCapError.nodeMessage.test(message))
|
2959
3002
|
return new TipAboveFeeCapError({
|
2960
3003
|
cause: err,
|
2961
|
-
maxFeePerGas: _optionalChain([args, 'optionalAccess',
|
2962
|
-
maxPriorityFeePerGas: _optionalChain([args, 'optionalAccess',
|
3004
|
+
maxFeePerGas: _optionalChain([args, 'optionalAccess', _66 => _66.maxFeePerGas]),
|
3005
|
+
maxPriorityFeePerGas: _optionalChain([args, 'optionalAccess', _67 => _67.maxPriorityFeePerGas])
|
2963
3006
|
});
|
2964
|
-
else if (message.match(ExecutionRevertedError.nodeMessage) || "code" in err.cause && _optionalChain([err, 'access',
|
3007
|
+
else if (message.match(ExecutionRevertedError.nodeMessage) || "code" in err.cause && _optionalChain([err, 'access', _68 => _68.cause, 'optionalAccess', _69 => _69.code]) === ExecutionRevertedError.code)
|
2965
3008
|
return new ExecutionRevertedError({
|
2966
3009
|
cause: err,
|
2967
3010
|
message: err.cause.details
|
@@ -2995,7 +3038,7 @@ function getContractError(err, {
|
|
2995
3038
|
functionName,
|
2996
3039
|
sender
|
2997
3040
|
}) {
|
2998
|
-
const { code, data, message } = err instanceof RawContractError ? err : err instanceof CallExecutionError || err instanceof EstimateGasExecutionError ? _optionalChain([err, 'access',
|
3041
|
+
const { code, data, message } = err instanceof RawContractError ? err : err instanceof CallExecutionError || err instanceof EstimateGasExecutionError ? _optionalChain([err, 'access', _70 => _70.cause, 'optionalAccess', _71 => _71.cause, 'optionalAccess', _72 => _72.cause]) || {} : err.cause || {};
|
2999
3042
|
let cause = err;
|
3000
3043
|
if (err instanceof AbiDecodingZeroDataError) {
|
3001
3044
|
cause = new ContractFunctionZeroDataError({ functionName });
|
@@ -3084,7 +3127,7 @@ async function http(url, { body, fetchOptions = {}, timeout = 1e4 }) {
|
|
3084
3127
|
}
|
3085
3128
|
);
|
3086
3129
|
let data;
|
3087
|
-
if (_optionalChain([response, 'access',
|
3130
|
+
if (_optionalChain([response, 'access', _73 => _73.headers, 'access', _74 => _74.get, 'call', _75 => _75("Content-Type"), 'optionalAccess', _76 => _76.startsWith, 'call', _77 => _77("application/json")])) {
|
3088
3131
|
data = await response.json();
|
3089
3132
|
} else {
|
3090
3133
|
data = await response.text();
|
@@ -3176,15 +3219,15 @@ function webSocket(socket, {
|
|
3176
3219
|
if (typeof message.id === "number" && id_ !== message.id)
|
3177
3220
|
return;
|
3178
3221
|
if (message.error) {
|
3179
|
-
_optionalChain([onError, 'optionalCall',
|
3222
|
+
_optionalChain([onError, 'optionalCall', _78 => _78(new RpcError({ body, error: message.error, url: socket.url }))]);
|
3180
3223
|
} else {
|
3181
|
-
_optionalChain([onData, 'optionalCall',
|
3224
|
+
_optionalChain([onData, 'optionalCall', _79 => _79(message)]);
|
3182
3225
|
}
|
3183
3226
|
if (body.method === "eth_subscribe" && typeof message.result === "string") {
|
3184
3227
|
socket.subscriptions.set(message.result, callback);
|
3185
3228
|
}
|
3186
3229
|
if (body.method === "eth_unsubscribe") {
|
3187
|
-
socket.subscriptions.delete(_optionalChain([body, 'access',
|
3230
|
+
socket.subscriptions.delete(_optionalChain([body, 'access', _80 => _80.params, 'optionalAccess', _81 => _81[0]]));
|
3188
3231
|
}
|
3189
3232
|
};
|
3190
3233
|
socket.requests.set(id_, callback);
|
@@ -3463,5 +3506,6 @@ function parseGwei(ether, unit = "wei") {
|
|
3463
3506
|
|
3464
3507
|
|
3465
3508
|
|
3466
|
-
|
3467
|
-
|
3509
|
+
|
3510
|
+
exports.BaseError = BaseError; exports.AbiConstructorNotFoundError = AbiConstructorNotFoundError; exports.AbiConstructorParamsNotFoundError = AbiConstructorParamsNotFoundError; exports.AbiDecodingDataSizeInvalidError = AbiDecodingDataSizeInvalidError; exports.AbiDecodingZeroDataError = AbiDecodingZeroDataError; exports.AbiEncodingArrayLengthMismatchError = AbiEncodingArrayLengthMismatchError; exports.AbiEncodingLengthMismatchError = AbiEncodingLengthMismatchError; exports.AbiErrorInputsNotFoundError = AbiErrorInputsNotFoundError; exports.AbiErrorNotFoundError = AbiErrorNotFoundError; exports.AbiErrorSignatureNotFoundError = AbiErrorSignatureNotFoundError; exports.AbiEventSignatureNotFoundError = AbiEventSignatureNotFoundError; exports.AbiEventNotFoundError = AbiEventNotFoundError; exports.AbiFunctionNotFoundError = AbiFunctionNotFoundError; exports.AbiFunctionOutputsNotFoundError = AbiFunctionOutputsNotFoundError; exports.AbiFunctionSignatureNotFoundError = AbiFunctionSignatureNotFoundError; exports.InvalidAbiEncodingTypeError = InvalidAbiEncodingTypeError; exports.InvalidAbiDecodingTypeError = InvalidAbiDecodingTypeError; exports.InvalidArrayError = InvalidArrayError; exports.InvalidDefinitionTypeError = InvalidDefinitionTypeError; exports.InvalidAddressError = InvalidAddressError; exports.BlockNotFoundError = BlockNotFoundError; exports.ChainDoesNotSupportContract = ChainDoesNotSupportContract; exports.ChainMismatchError = ChainMismatchError; exports.multicall3Abi = multicall3Abi; exports.panicReasons = panicReasons; exports.TransactionExecutionError = TransactionExecutionError; exports.TransactionNotFoundError = TransactionNotFoundError; exports.TransactionReceiptNotFoundError = TransactionReceiptNotFoundError; exports.WaitForTransactionReceiptTimeoutError = WaitForTransactionReceiptTimeoutError; exports.CallExecutionError = CallExecutionError; exports.ContractFunctionExecutionError = ContractFunctionExecutionError; exports.ContractFunctionRevertedError = ContractFunctionRevertedError; exports.ContractFunctionZeroDataError = ContractFunctionZeroDataError; exports.RawContractError = RawContractError; exports.SizeExceedsPaddingSizeError = SizeExceedsPaddingSizeError; exports.DataLengthTooLongError = DataLengthTooLongError; exports.DataLengthTooShortError = DataLengthTooShortError; exports.InvalidBytesBooleanError = InvalidBytesBooleanError; exports.InvalidHexBooleanError = InvalidHexBooleanError; exports.InvalidHexValueError = InvalidHexValueError; exports.OffsetOutOfBoundsError = OffsetOutOfBoundsError; exports.EstimateGasExecutionError = EstimateGasExecutionError; exports.FilterTypeNotSupportedError = FilterTypeNotSupportedError; exports.ExecutionRevertedError = ExecutionRevertedError; exports.FeeCapTooHighError = FeeCapTooHighError; exports.FeeCapTooLowError = FeeCapTooLowError; exports.NonceTooHighError = NonceTooHighError; exports.NonceTooLowError = NonceTooLowError; exports.NonceMaxValueError = NonceMaxValueError; exports.InsufficientFundsError = InsufficientFundsError; exports.IntrinsicGasTooHighError = IntrinsicGasTooHighError; exports.IntrinsicGasTooLowError = IntrinsicGasTooLowError; exports.TransactionTypeNotSupportedError = TransactionTypeNotSupportedError; exports.TipAboveFeeCapError = TipAboveFeeCapError; exports.UnknownNodeError = UnknownNodeError; exports.RequestError = RequestError; exports.RpcRequestError = RpcRequestError; exports.ParseRpcError = ParseRpcError; exports.InvalidRequestRpcError = InvalidRequestRpcError; exports.MethodNotFoundRpcError = MethodNotFoundRpcError; exports.InvalidParamsRpcError = InvalidParamsRpcError; exports.InternalRpcError = InternalRpcError; exports.InvalidInputRpcError = InvalidInputRpcError; exports.ResourceNotFoundRpcError = ResourceNotFoundRpcError; exports.ResourceUnavailableRpcError = ResourceUnavailableRpcError; exports.TransactionRejectedRpcError = TransactionRejectedRpcError; exports.MethodNotSupportedRpcError = MethodNotSupportedRpcError; exports.LimitExceededRpcError = LimitExceededRpcError; exports.JsonRpcVersionUnsupportedError = JsonRpcVersionUnsupportedError; exports.UserRejectedRequestError = UserRejectedRequestError; exports.SwitchChainError = SwitchChainError; exports.UnknownRpcError = UnknownRpcError; exports.HttpRequestError = HttpRequestError; exports.WebSocketRequestError = WebSocketRequestError; exports.RpcError = RpcError; exports.TimeoutError = TimeoutError; exports.UrlRequiredError = UrlRequiredError; exports.concat = concat; exports.isBytes = isBytes; exports.isHex = isHex; exports.pad = pad; exports.padHex = padHex; exports.padBytes = padBytes; exports.trim = trim; exports.size = size; exports.slice = slice; exports.sliceBytes = sliceBytes; exports.sliceHex = sliceHex; exports.boolToHex = boolToHex; exports.bytesToHex = bytesToHex; exports.toHex = toHex; exports.numberToHex = numberToHex; exports.stringToHex = stringToHex; exports.toBytes = toBytes; exports.boolToBytes = boolToBytes; exports.hexToBytes = hexToBytes; exports.numberToBytes = numberToBytes; exports.stringToBytes = stringToBytes; exports.toRlp = toRlp; exports.fromHex = fromHex; exports.hexToBigInt = hexToBigInt; exports.hexToBool = hexToBool; exports.hexToNumber = hexToNumber; exports.hexToString = hexToString; exports.fromBytes = fromBytes; exports.bytesToBigint = bytesToBigint; exports.bytesToBool = bytesToBool; exports.bytesToNumber = bytesToNumber; exports.bytesToString = bytesToString; exports.fromRlp = fromRlp; exports.extractFunctionParts = extractFunctionParts; exports.extractFunctionName = extractFunctionName; exports.extractFunctionParams = extractFunctionParams; exports.extractFunctionType = extractFunctionType; exports.keccak256 = keccak256; exports.getEventSelector = getEventSelector; exports.getFunctionSelector = getFunctionSelector; exports.isAddress = isAddress; exports.checksumAddress = checksumAddress; exports.getAddress = getAddress; exports.getContractAddress = getContractAddress2; exports.getCreateAddress = getCreateAddress; exports.getCreate2Address = getCreate2Address; exports.isAddressEqual = isAddressEqual; exports.encodeAbiParameters = encodeAbiParameters; exports.decodeAbiParameters = decodeAbiParameters; exports.formatAbiItem = formatAbiItem; exports.decodeErrorResult = decodeErrorResult; exports.decodeEventLog = decodeEventLog; exports.decodeFunctionData = decodeFunctionData; exports.getAbiItem = getAbiItem; exports.decodeFunctionResult = decodeFunctionResult; exports.encodeDeployData = encodeDeployData; exports.encodeErrorResult = encodeErrorResult; exports.encodeEventTopics = encodeEventTopics; exports.encodeFunctionData = encodeFunctionData; exports.encodeFunctionResult = encodeFunctionResult; exports.formatAbiItemWithArgs = formatAbiItemWithArgs; exports.getCache = getCache; exports.withCache = withCache; exports.wait = wait; exports.isDeterministicError = isDeterministicError; exports.buildRequest = buildRequest; exports.defineChain = defineChain; exports.format = format3; exports.defineFormatter = defineFormatter; exports.transactionType = transactionType; exports.formatTransaction = formatTransaction; exports.defineTransaction = defineTransaction; exports.formatBlock = formatBlock; exports.defineBlock = defineBlock; exports.extract = extract; exports.formatFeeHistory = formatFeeHistory; exports.formatLog = formatLog; exports.formatTransactionReceipt = formatTransactionReceipt; exports.defineTransactionReceipt = defineTransactionReceipt; exports.formatTransactionRequest = formatTransactionRequest; exports.defineTransactionRequest = defineTransactionRequest; exports.assertRequest = assertRequest; exports.containsNodeError = containsNodeError; exports.getNodeError = getNodeError; exports.getCallError = getCallError; exports.getContractError = getContractError; exports.getEstimateGasError = getEstimateGasError; exports.getTransactionError = getTransactionError; exports.stringify = stringify; exports.getSocket = getSocket; exports.rpc = rpc; exports.etherUnits = etherUnits; exports.gweiUnits = gweiUnits; exports.weiUnits = weiUnits; exports.formatUnit = formatUnit; exports.formatEther = formatEther; exports.formatGwei = formatGwei; exports.parseUnit = parseUnit; exports.parseEther = parseEther; exports.parseGwei = parseGwei;
|
3511
|
+
//# sourceMappingURL=chunk-HQCSH22G.js.map
|