viem 0.1.13 → 0.1.14
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/abi.d.ts +3 -3
- package/dist/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/{chain-792d51c3.d.ts → chain-0ce17567.d.ts} +1 -1
- package/dist/{chain-41dcec4b.d.ts → chain-5b8fb5eb.d.ts} +1 -1
- package/dist/chains.d.ts +3 -3
- package/dist/chains.js +63 -63
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-BJPR4EAT.mjs → chunk-KH3WJ45D.mjs} +2 -2
- package/dist/{chunk-3FWCHYKE.js → chunk-P5JTF7JS.js} +27 -13
- package/dist/chunk-P5JTF7JS.js.map +1 -0
- package/dist/{chunk-S4MOKUQW.mjs → chunk-S3SV7Y4G.mjs} +26 -12
- package/dist/chunk-S3SV7Y4G.mjs.map +1 -0
- package/dist/{chunk-65E5HTFA.js → chunk-TZWWCJQ5.js} +19 -19
- package/dist/contract.d.ts +7 -7
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createClient-6cd6daa3.d.ts → createClient-98b1c2e7.d.ts} +2 -2
- package/dist/{createPublicClient-34d3ba9d.d.ts → createPublicClient-812a1dae.d.ts} +3 -3
- package/dist/{eip1193-2f116cf7.d.ts → eip1193-44504199.d.ts} +1 -1
- package/dist/{encodeFunctionResult-874fe003.d.ts → encodeFunctionResult-e491eb56.d.ts} +4 -4
- package/dist/{encodePacked-9ab98aa9.d.ts → encodePacked-d7942f6b.d.ts} +1 -1
- package/dist/ens.d.ts +4 -4
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/ethers.d.ts +4 -4
- package/dist/ethers.js +3 -3
- package/dist/ethers.mjs +1 -1
- package/dist/{formatAbiItem-1bdb43d3.d.ts → formatAbiItem-29a73545.d.ts} +1 -1
- package/dist/{getAbiItem-f19d50a2.d.ts → getAbiItem-779cb566.d.ts} +1 -1
- package/dist/index.d.ts +24 -14
- package/dist/index.js +92 -90
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{parseGwei-a35c7c87.d.ts → parseGwei-75956089.d.ts} +3 -3
- package/dist/public.d.ts +4 -4
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/{test-6b2b1b0d.d.ts → test-d0a36452.d.ts} +3 -3
- package/dist/test.d.ts +5 -5
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/utils/index.d.ts +13 -13
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/wallet.d.ts +4 -4
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/window.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunk-3FWCHYKE.js.map +0 -1
- package/dist/chunk-S4MOKUQW.mjs.map +0 -1
- /package/dist/{chunk-BJPR4EAT.mjs.map → chunk-KH3WJ45D.mjs.map} +0 -0
- /package/dist/{chunk-65E5HTFA.js.map → chunk-TZWWCJQ5.js.map} +0 -0
@@ -17,7 +17,7 @@ import {
|
|
17
17
|
var package_default = {
|
18
18
|
name: "viem",
|
19
19
|
description: "TypeScript Interface for Ethereum",
|
20
|
-
version: "0.1.
|
20
|
+
version: "0.1.14",
|
21
21
|
scripts: {
|
22
22
|
anvil: "source .env && anvil --fork-url $VITE_ANVIL_FORK_URL --fork-block-number $VITE_ANVIL_BLOCK_NUMBER --block-time $VITE_ANVIL_BLOCK_TIME",
|
23
23
|
bench: "vitest bench --no-threads",
|
@@ -445,6 +445,19 @@ var BytesSizeMismatchError = class extends BaseError {
|
|
445
445
|
__publicField(this, "name", "BytesSizeMismatchError");
|
446
446
|
}
|
447
447
|
};
|
448
|
+
var DecodeLogTopicsMismatch = class extends BaseError {
|
449
|
+
constructor({
|
450
|
+
abiItem,
|
451
|
+
param
|
452
|
+
}) {
|
453
|
+
super(
|
454
|
+
[
|
455
|
+
`Expected a topic for indexed event parameter${param.name ? ` "${param.name}"` : ""} on event "${formatAbiItem(abiItem, { includeName: true })}".`
|
456
|
+
].join("\n")
|
457
|
+
);
|
458
|
+
__publicField(this, "name", "DecodeLogTopicsMismatch");
|
459
|
+
}
|
460
|
+
};
|
448
461
|
var InvalidAbiEncodingTypeError = class extends BaseError {
|
449
462
|
constructor(type, { docsPath: docsPath5 }) {
|
450
463
|
super(
|
@@ -2430,16 +2443,16 @@ function decodeEventLog({
|
|
2430
2443
|
const { name, inputs } = abiItem;
|
2431
2444
|
const isUnnamed = inputs?.some((x) => !("name" in x && x.name));
|
2432
2445
|
let args = isUnnamed ? [] : {};
|
2433
|
-
|
2434
|
-
const
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2446
|
+
if (argTopics.length > 0) {
|
2447
|
+
const indexedInputs = inputs.filter((x) => "indexed" in x && x.indexed);
|
2448
|
+
for (let i = 0; i < indexedInputs.length; i++) {
|
2449
|
+
const param = indexedInputs[i];
|
2450
|
+
const topic = argTopics[i];
|
2451
|
+
if (!topic)
|
2452
|
+
throw new DecodeLogTopicsMismatch({
|
2453
|
+
abiItem,
|
2454
|
+
param
|
2455
|
+
});
|
2443
2456
|
args[param.name || i] = decodeTopic({ param, value: topic });
|
2444
2457
|
}
|
2445
2458
|
}
|
@@ -5252,6 +5265,7 @@ export {
|
|
5252
5265
|
AbiFunctionNotFoundError,
|
5253
5266
|
AbiFunctionOutputsNotFoundError,
|
5254
5267
|
AbiFunctionSignatureNotFoundError,
|
5268
|
+
DecodeLogTopicsMismatch,
|
5255
5269
|
InvalidAbiEncodingTypeError,
|
5256
5270
|
InvalidAbiDecodingTypeError,
|
5257
5271
|
InvalidArrayError,
|
@@ -5494,4 +5508,4 @@ export {
|
|
5494
5508
|
formatGwei,
|
5495
5509
|
parseEther
|
5496
5510
|
};
|
5497
|
-
//# sourceMappingURL=chunk-
|
5511
|
+
//# sourceMappingURL=chunk-S3SV7Y4G.mjs.map
|