viem 0.1.5 → 0.1.6

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.
@@ -11,7 +11,7 @@ import {
11
11
  stringToBytes,
12
12
  toBytes,
13
13
  toHex
14
- } from "./chunk-MOUDBLFI.mjs";
14
+ } from "./chunk-KWPP37TE.mjs";
15
15
 
16
16
  // src/utils/ens/labelhash.ts
17
17
  function labelhash(label) {
@@ -205,4 +205,4 @@ export {
205
205
  getEnsAddress,
206
206
  getEnsName
207
207
  };
208
- //# sourceMappingURL=chunk-PDAHLHX3.mjs.map
208
+ //# sourceMappingURL=chunk-KJWXTN6G.mjs.map
@@ -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.5",
20
+ version: "0.1.6",
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",
@@ -183,6 +183,11 @@ var package_default = {
183
183
  pnpm: {
184
184
  patchedDependencies: {
185
185
  "vitepress@1.0.0-alpha.49": "patches/vitepress@1.0.0-alpha.49.patch"
186
+ },
187
+ peerDependencyRules: {
188
+ ignoreMissing: [
189
+ "@algolia/client-search"
190
+ ]
186
191
  }
187
192
  }
188
193
  };
@@ -2992,6 +2997,7 @@ var transactionType = {
2992
2997
  function formatTransaction(transaction) {
2993
2998
  const transaction_ = {
2994
2999
  ...transaction,
3000
+ blockHash: transaction.blockHash ? transaction.blockHash : null,
2995
3001
  blockNumber: transaction.blockNumber ? BigInt(transaction.blockNumber) : null,
2996
3002
  chainId: transaction.chainId ? hexToNumber(transaction.chainId) : void 0,
2997
3003
  gas: transaction.gas ? BigInt(transaction.gas) : void 0,
@@ -2999,6 +3005,7 @@ function formatTransaction(transaction) {
2999
3005
  maxFeePerGas: transaction.maxFeePerGas ? BigInt(transaction.maxFeePerGas) : void 0,
3000
3006
  maxPriorityFeePerGas: transaction.maxPriorityFeePerGas ? BigInt(transaction.maxPriorityFeePerGas) : void 0,
3001
3007
  nonce: transaction.nonce ? hexToNumber(transaction.nonce) : void 0,
3008
+ to: transaction.to ? transaction.to : null,
3002
3009
  transactionIndex: transaction.transactionIndex ? Number(transaction.transactionIndex) : null,
3003
3010
  type: transaction.type ? transactionType[transaction.type] : void 0,
3004
3011
  value: transaction.value ? BigInt(transaction.value) : void 0,
@@ -3030,6 +3037,9 @@ function formatBlock(block) {
3030
3037
  difficulty: block.difficulty ? BigInt(block.difficulty) : void 0,
3031
3038
  gasLimit: block.gasLimit ? BigInt(block.gasLimit) : void 0,
3032
3039
  gasUsed: block.gasUsed ? BigInt(block.gasUsed) : void 0,
3040
+ hash: block.hash ? block.hash : null,
3041
+ logsBloom: block.logsBloom ? block.logsBloom : null,
3042
+ nonce: block.nonce ? block.nonce : null,
3033
3043
  number: block.number ? BigInt(block.number) : null,
3034
3044
  size: block.size ? BigInt(block.size) : void 0,
3035
3045
  timestamp: block.timestamp ? BigInt(block.timestamp) : void 0,
@@ -3069,8 +3079,10 @@ function formatFeeHistory(feeHistory) {
3069
3079
  function formatLog(log, { args, eventName } = {}) {
3070
3080
  return {
3071
3081
  ...log,
3082
+ blockHash: log.blockHash ? log.blockHash : null,
3072
3083
  blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,
3073
3084
  logIndex: log.logIndex ? BigInt(log.logIndex) : null,
3085
+ transactionHash: log.transactionHash ? log.transactionHash : null,
3074
3086
  transactionIndex: log.transactionIndex ? BigInt(log.transactionIndex) : null,
3075
3087
  ...eventName ? { args, eventName } : {}
3076
3088
  };
@@ -3085,10 +3097,12 @@ function formatTransactionReceipt(transactionReceipt) {
3085
3097
  return {
3086
3098
  ...transactionReceipt,
3087
3099
  blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
3100
+ contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
3088
3101
  cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
3089
3102
  effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
3090
3103
  gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
3091
3104
  logs: transactionReceipt.logs ? transactionReceipt.logs.map((log) => formatLog(log)) : null,
3105
+ to: transactionReceipt.to ? transactionReceipt.to : null,
3092
3106
  transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
3093
3107
  status: transactionReceipt.status ? statuses[transactionReceipt.status] : null,
3094
3108
  type: transactionReceipt.type ? transactionType[transactionReceipt.type] : null
@@ -5331,4 +5345,4 @@ export {
5331
5345
  formatGwei,
5332
5346
  parseEther
5333
5347
  };
5334
- //# sourceMappingURL=chunk-MOUDBLFI.mjs.map
5348
+ //# sourceMappingURL=chunk-KWPP37TE.mjs.map