viem 0.0.0-main.20231128T200450 → 0.0.0-main.20231130T080937

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +407 -407
  2. package/README.md +47 -47
  3. package/_cjs/errors/version.js +1 -1
  4. package/_cjs/utils/ccip.js +3 -1
  5. package/_cjs/utils/ccip.js.map +1 -1
  6. package/_esm/actions/ens/getEnsAddress.js +2 -2
  7. package/_esm/actions/ens/getEnsAvatar.js +2 -2
  8. package/_esm/actions/ens/getEnsName.js +2 -2
  9. package/_esm/actions/ens/getEnsResolver.js +2 -2
  10. package/_esm/actions/ens/getEnsText.js +3 -3
  11. package/_esm/actions/public/getBlock.js +1 -1
  12. package/_esm/actions/public/getBlockNumber.js +1 -1
  13. package/_esm/actions/public/getLogs.js +1 -1
  14. package/_esm/actions/public/getTransaction.js +1 -1
  15. package/_esm/actions/public/getTransactionConfirmations.js +1 -1
  16. package/_esm/actions/public/getTransactionReceipt.js +1 -1
  17. package/_esm/actions/public/readContract.js +1 -1
  18. package/_esm/actions/public/simulateContract.js +1 -1
  19. package/_esm/actions/public/waitForTransactionReceipt.js +1 -1
  20. package/_esm/actions/public/watchBlockNumber.js +1 -1
  21. package/_esm/actions/public/watchBlocks.js +1 -1
  22. package/_esm/actions/wallet/deployContract.js +1 -1
  23. package/_esm/actions/wallet/sendTransaction.js +1 -1
  24. package/_esm/actions/wallet/writeContract.js +1 -1
  25. package/_esm/errors/version.js +1 -1
  26. package/_esm/utils/ccip.js +3 -1
  27. package/_esm/utils/ccip.js.map +1 -1
  28. package/_esm/utils/ens/namehash.js +1 -1
  29. package/_esm/utils/ens/normalize.js +2 -2
  30. package/_types/actions/ens/getEnsAddress.d.ts +2 -2
  31. package/_types/actions/ens/getEnsAvatar.d.ts +2 -2
  32. package/_types/actions/ens/getEnsName.d.ts +2 -2
  33. package/_types/actions/ens/getEnsResolver.d.ts +2 -2
  34. package/_types/actions/ens/getEnsText.d.ts +3 -3
  35. package/_types/actions/public/getBlock.d.ts +1 -1
  36. package/_types/actions/public/getBlockNumber.d.ts +1 -1
  37. package/_types/actions/public/getLogs.d.ts +1 -1
  38. package/_types/actions/public/getTransaction.d.ts +1 -1
  39. package/_types/actions/public/getTransactionConfirmations.d.ts +1 -1
  40. package/_types/actions/public/getTransactionReceipt.d.ts +1 -1
  41. package/_types/actions/public/readContract.d.ts +1 -1
  42. package/_types/actions/public/simulateContract.d.ts +1 -1
  43. package/_types/actions/public/waitForTransactionReceipt.d.ts +1 -1
  44. package/_types/actions/public/watchBlockNumber.d.ts +1 -1
  45. package/_types/actions/public/watchBlocks.d.ts +1 -1
  46. package/_types/actions/wallet/deployContract.d.ts +1 -1
  47. package/_types/actions/wallet/sendTransaction.d.ts +1 -1
  48. package/_types/actions/wallet/writeContract.d.ts +1 -1
  49. package/_types/clients/decorators/public.d.ts +22 -22
  50. package/_types/clients/decorators/wallet.d.ts +3 -3
  51. package/_types/errors/version.d.ts +1 -1
  52. package/_types/utils/ccip.d.ts.map +1 -1
  53. package/_types/utils/ens/namehash.d.ts +1 -1
  54. package/_types/utils/ens/normalize.d.ts +2 -2
  55. package/actions/ens/getEnsAddress.ts +2 -2
  56. package/actions/ens/getEnsAvatar.ts +2 -2
  57. package/actions/ens/getEnsName.ts +2 -2
  58. package/actions/ens/getEnsResolver.ts +2 -2
  59. package/actions/ens/getEnsText.ts +3 -3
  60. package/actions/public/getBlock.ts +1 -1
  61. package/actions/public/getBlockNumber.ts +1 -1
  62. package/actions/public/getLogs.ts +1 -1
  63. package/actions/public/getTransaction.ts +1 -1
  64. package/actions/public/getTransactionConfirmations.ts +1 -1
  65. package/actions/public/getTransactionReceipt.ts +1 -1
  66. package/actions/public/readContract.ts +1 -1
  67. package/actions/public/simulateContract.ts +1 -1
  68. package/actions/public/waitForTransactionReceipt.ts +1 -1
  69. package/actions/public/watchBlockNumber.ts +1 -1
  70. package/actions/public/watchBlocks.ts +1 -1
  71. package/actions/wallet/deployContract.ts +1 -1
  72. package/actions/wallet/sendTransaction.ts +1 -1
  73. package/actions/wallet/writeContract.ts +1 -1
  74. package/clients/decorators/public.ts +22 -22
  75. package/clients/decorators/wallet.ts +3 -3
  76. package/errors/version.ts +1 -1
  77. package/package.json +3 -3
  78. package/utils/ccip.ts +3 -1
  79. package/utils/ens/namehash.ts +1 -1
  80. package/utils/ens/normalize.ts +2 -2
@@ -40,7 +40,7 @@ export type GetTransactionConfirmationsErrorType =
40
40
  * Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
41
41
  *
42
42
  * - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations.html
43
- * - Example: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/fetching-transactions
43
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions
44
44
  * - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations)
45
45
  *
46
46
  * @param client - Client to use
@@ -31,7 +31,7 @@ export type GetTransactionReceiptErrorType =
31
31
  * Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash.
32
32
  *
33
33
  * - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt.html
34
- * - Example: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/fetching-transactions
34
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions
35
35
  * - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt)
36
36
  *
37
37
  * @param client - Client to use
@@ -45,7 +45,7 @@ export type ReadContractErrorType = GetContractErrorReturnType<
45
45
  * Calls a read-only function on a contract, and returns the response.
46
46
  *
47
47
  * - Docs: https://viem.sh/docs/contract/readContract.html
48
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/contracts/reading-contracts
48
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/reading-contracts
49
49
  *
50
50
  * A "read-only" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.
51
51
  *
@@ -89,7 +89,7 @@ export type SimulateContractErrorType =
89
89
  * Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions.
90
90
  *
91
91
  * - Docs: https://viem.sh/docs/contract/simulateContract.html
92
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/contracts/writing-to-contracts
92
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts
93
93
  *
94
94
  * This function does not require gas to execute and _**does not**_ change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract.html), but also supports contract write functions.
95
95
  *
@@ -77,7 +77,7 @@ export type WaitForTransactionReceiptErrorType =
77
77
  * Waits for the [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms.html#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt). If the Transaction reverts, then the action will throw an error.
78
78
  *
79
79
  * - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt.html
80
- * - Example: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/sending-transactions
80
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions
81
81
  * - JSON-RPC Methods:
82
82
  * - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed.
83
83
  * - If a Transaction has been replaced:
@@ -56,7 +56,7 @@ export type WatchBlockNumberErrorType = PollErrorType | ErrorType
56
56
  * Watches and returns incoming block numbers.
57
57
  *
58
58
  * - Docs: https://viem.sh/docs/actions/public/watchBlockNumber.html
59
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/blocks/watching-blocks
59
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks
60
60
  * - JSON-RPC Methods:
61
61
  * - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval.
62
62
  * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event.
@@ -80,7 +80,7 @@ export type WatchBlocksErrorType =
80
80
  * Watches and returns information for incoming blocks.
81
81
  *
82
82
  * - Docs: https://viem.sh/docs/actions/public/watchBlocks.html
83
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/blocks/watching-blocks
83
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks
84
84
  * - JSON-RPC Methods:
85
85
  * - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval.
86
86
  * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event.
@@ -40,7 +40,7 @@ export type DeployContractErrorType = SendTransactionErrorType | ErrorType
40
40
  * Deploys a contract to the network, given bytecode and constructor arguments.
41
41
  *
42
42
  * - Docs: https://viem.sh/docs/contract/deployContract.html
43
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/contracts/deploying-contracts
43
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/deploying-contracts
44
44
  *
45
45
  * @param client - Client to use
46
46
  * @param parameters - {@link DeployContractParameters}
@@ -80,7 +80,7 @@ export type SendTransactionErrorType =
80
80
  * Creates, signs, and sends a new transaction to the network.
81
81
  *
82
82
  * - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html
83
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/sending-transactions
83
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions
84
84
  * - JSON-RPC Methods:
85
85
  * - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)
86
86
  * - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)
@@ -61,7 +61,7 @@ export type WriteContractErrorType =
61
61
  * Executes a write function on a contract.
62
62
  *
63
63
  * - Docs: https://viem.sh/docs/contract/writeContract.html
64
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/contracts/writing-to-contracts
64
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts
65
65
  *
66
66
  * A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
67
67
  *
@@ -507,7 +507,7 @@ export type PublicActions<
507
507
  * Returns information about a block at a block number, hash, or tag.
508
508
  *
509
509
  * - Docs: https://viem.sh/docs/actions/public/getBlock.html
510
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/blocks/fetching-blocks
510
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks
511
511
  * - JSON-RPC Methods:
512
512
  * - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`.
513
513
  * - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`.
@@ -535,7 +535,7 @@ export type PublicActions<
535
535
  * Returns the number of the most recent block seen.
536
536
  *
537
537
  * - Docs: https://viem.sh/docs/actions/public/getBlockNumber.html
538
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/blocks/fetching-blocks
538
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks
539
539
  * - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber)
540
540
  *
541
541
  * @param args - {@link GetBlockNumberParameters}
@@ -667,7 +667,7 @@ export type PublicActions<
667
667
  * Gets address for ENS name.
668
668
  *
669
669
  * - Docs: https://viem.sh/docs/ens/actions/getEnsAddress.html
670
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/ens
670
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
671
671
  *
672
672
  * @remarks
673
673
  * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
@@ -687,7 +687,7 @@ export type PublicActions<
687
687
  * transport: http(),
688
688
  * })
689
689
  * const ensAddress = await client.getEnsAddress({
690
- * name: normalize('weth.eth'),
690
+ * name: normalize('wevm.eth'),
691
691
  * })
692
692
  * // '0xd2135CfB216b74109775236E36d4b433F1DF507B'
693
693
  */
@@ -698,7 +698,7 @@ export type PublicActions<
698
698
  * Gets the avatar of an ENS name.
699
699
  *
700
700
  * - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar.html
701
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/ens
701
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
702
702
  *
703
703
  * @remarks
704
704
  * Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText.html) with `key` set to `'avatar'`.
@@ -718,7 +718,7 @@ export type PublicActions<
718
718
  * transport: http(),
719
719
  * })
720
720
  * const ensAvatar = await client.getEnsAvatar({
721
- * name: normalize('weth.eth'),
721
+ * name: normalize('wevm.eth'),
722
722
  * })
723
723
  * // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'
724
724
  */
@@ -729,7 +729,7 @@ export type PublicActions<
729
729
  * Gets primary name for specified address.
730
730
  *
731
731
  * - Docs: https://viem.sh/docs/ens/actions/getEnsName.html
732
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/ens
732
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
733
733
  *
734
734
  * @remarks
735
735
  * Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name.
@@ -748,14 +748,14 @@ export type PublicActions<
748
748
  * const ensName = await client.getEnsName({
749
749
  * address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
750
750
  * })
751
- * // 'weth.eth'
751
+ * // 'wevm.eth'
752
752
  */
753
753
  getEnsName: (args: GetEnsNameParameters) => Promise<GetEnsNameReturnType>
754
754
  /**
755
755
  * Gets resolver for ENS name.
756
756
  *
757
757
  * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html
758
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/ens
758
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
759
759
  *
760
760
  * @remarks
761
761
  * Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name.
@@ -775,7 +775,7 @@ export type PublicActions<
775
775
  * transport: http(),
776
776
  * })
777
777
  * const resolverAddress = await client.getEnsResolver({
778
- * name: normalize('weth.eth'),
778
+ * name: normalize('wevm.eth'),
779
779
  * })
780
780
  * // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'
781
781
  */
@@ -786,7 +786,7 @@ export type PublicActions<
786
786
  * Gets a text record for specified ENS name.
787
787
  *
788
788
  * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html
789
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/ens
789
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens
790
790
  *
791
791
  * @remarks
792
792
  * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.
@@ -806,10 +806,10 @@ export type PublicActions<
806
806
  * transport: http(),
807
807
  * })
808
808
  * const twitterRecord = await client.getEnsText({
809
- * name: normalize('weth.eth'),
809
+ * name: normalize('wevm.eth'),
810
810
  * key: 'com.twitter',
811
811
  * })
812
- * // 'weth_dev'
812
+ * // 'wagmi_sh'
813
813
  */
814
814
  getEnsText: (args: GetEnsTextParameters) => Promise<GetEnsTextReturnType>
815
815
  /**
@@ -1034,7 +1034,7 @@ export type PublicActions<
1034
1034
  * Returns a list of event logs matching the provided parameters.
1035
1035
  *
1036
1036
  * - Docs: https://viem.sh/docs/actions/public/getLogs.html
1037
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/filters-and-logs/event-logs
1037
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/filters-and-logs/event-logs
1038
1038
  * - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs)
1039
1039
  *
1040
1040
  * @param args - {@link GetLogsParameters}
@@ -1150,7 +1150,7 @@ export type PublicActions<
1150
1150
  * Returns information about a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) given a hash or block identifier.
1151
1151
  *
1152
1152
  * - Docs: https://viem.sh/docs/actions/public/getTransaction.html
1153
- * - Example: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/fetching-transactions
1153
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions
1154
1154
  * - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash)
1155
1155
  *
1156
1156
  * @param args - {@link GetTransactionParameters}
@@ -1175,7 +1175,7 @@ export type PublicActions<
1175
1175
  * Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
1176
1176
  *
1177
1177
  * - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations.html
1178
- * - Example: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/fetching-transactions
1178
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions
1179
1179
  * - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations)
1180
1180
  *
1181
1181
  * @param args - {@link GetTransactionConfirmationsParameters}
@@ -1224,7 +1224,7 @@ export type PublicActions<
1224
1224
  * Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash.
1225
1225
  *
1226
1226
  * - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt.html
1227
- * - Example: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/fetching-transactions
1227
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions
1228
1228
  * - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt)
1229
1229
  *
1230
1230
  * @param args - {@link GetTransactionReceiptParameters}
@@ -1335,7 +1335,7 @@ export type PublicActions<
1335
1335
  * Calls a read-only function on a contract, and returns the response.
1336
1336
  *
1337
1337
  * - Docs: https://viem.sh/docs/contract/readContract.html
1338
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/contracts/reading-contracts
1338
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/reading-contracts
1339
1339
  *
1340
1340
  * @remarks
1341
1341
  * A "read-only" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.
@@ -1399,7 +1399,7 @@ export type PublicActions<
1399
1399
  * Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions.
1400
1400
  *
1401
1401
  * - Docs: https://viem.sh/docs/contract/simulateContract.html
1402
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/contracts/writing-to-contracts
1402
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts
1403
1403
  *
1404
1404
  * @remarks
1405
1405
  * This function does not require gas to execute and _**does not**_ change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract.html), but also supports contract write functions.
@@ -1474,7 +1474,7 @@ export type PublicActions<
1474
1474
  * Waits for the [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms.html#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt). If the Transaction reverts, then the action will throw an error.
1475
1475
  *
1476
1476
  * - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt.html
1477
- * - Example: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/sending-transactions
1477
+ * - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions
1478
1478
  * - JSON-RPC Methods:
1479
1479
  * - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed.
1480
1480
  * - If a Transaction has been replaced:
@@ -1515,7 +1515,7 @@ export type PublicActions<
1515
1515
  * Watches and returns incoming block numbers.
1516
1516
  *
1517
1517
  * - Docs: https://viem.sh/docs/actions/public/watchBlockNumber.html
1518
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/blocks/watching-blocks
1518
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks
1519
1519
  * - JSON-RPC Methods:
1520
1520
  * - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval.
1521
1521
  * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event.
@@ -1542,7 +1542,7 @@ export type PublicActions<
1542
1542
  * Watches and returns information for incoming blocks.
1543
1543
  *
1544
1544
  * - Docs: https://viem.sh/docs/actions/public/watchBlocks.html
1545
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/blocks/watching-blocks
1545
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks
1546
1546
  * - JSON-RPC Methods:
1547
1547
  * - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval.
1548
1548
  * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event.
@@ -105,7 +105,7 @@ export type WalletActions<
105
105
  * Deploys a contract to the network, given bytecode and constructor arguments.
106
106
  *
107
107
  * - Docs: https://viem.sh/docs/contract/deployContract.html
108
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/contracts/deploying-contracts
108
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/deploying-contracts
109
109
  *
110
110
  * @param args - {@link DeployContractParameters}
111
111
  * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link DeployContractReturnType}
@@ -311,7 +311,7 @@ export type WalletActions<
311
311
  * Creates, signs, and sends a new transaction to the network.
312
312
  *
313
313
  * - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html
314
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/transactions/sending-transactions
314
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions
315
315
  * - JSON-RPC Methods:
316
316
  * - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)
317
317
  * - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)
@@ -596,7 +596,7 @@ export type WalletActions<
596
596
  * Executes a write function on a contract.
597
597
  *
598
598
  * - Docs: https://viem.sh/docs/contract/writeContract.html
599
- * - Examples: https://stackblitz.com/github/weth/viem/tree/main/examples/contracts/writing-to-contracts
599
+ * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts
600
600
  *
601
601
  * A "write" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.
602
602
  *
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.0.0-main.20231128T200450'
1
+ export const version = '0.0.0-main.20231130T080937'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "0.0.0-main.20231128T200450",
4
+ "version": "0.0.0-main.20231130T080937",
5
5
  "type": "module",
6
6
  "main": "./_cjs/index.js",
7
7
  "module": "./_esm/index.js",
@@ -145,7 +145,7 @@
145
145
  },
146
146
  "license": "MIT",
147
147
  "homepage": "https://viem.sh",
148
- "repository": "weth/viem",
148
+ "repository": "wevm/viem",
149
149
  "authors": [
150
150
  "awkweb.eth",
151
151
  "jxom.eth"
@@ -153,7 +153,7 @@
153
153
  "funding": [
154
154
  {
155
155
  "type": "github",
156
- "url": "https://github.com/sponsors/weth"
156
+ "url": "https://github.com/sponsors/wevm"
157
157
  }
158
158
  ],
159
159
  "keywords": [
package/utils/ccip.ts CHANGED
@@ -140,7 +140,9 @@ export async function ccipFetch({
140
140
  if (!response.ok) {
141
141
  error = new HttpRequestError({
142
142
  body,
143
- details: stringify(result.error) || response.statusText,
143
+ details: result?.error
144
+ ? stringify(result.error)
145
+ : response.statusText,
144
146
  headers: response.headers,
145
147
  status: response.status,
146
148
  url,
@@ -28,7 +28,7 @@ export type NamehashErrorType =
28
28
  * - Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `namehash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.
29
29
  *
30
30
  * @example
31
- * namehash('weth.eth')
31
+ * namehash('wevm.eth')
32
32
  * '0xf246651c1b9a6b141d19c2604e9a58f567973833990f830d882534a747801359'
33
33
  *
34
34
  * @link https://eips.ethereum.org/EIPS/eip-137
@@ -7,8 +7,8 @@ export type NormalizeErrorType = ErrorType
7
7
  * @description Normalizes ENS name according to ENSIP-15.
8
8
  *
9
9
  * @example
10
- * normalize('weth.eth')
11
- * 'weth.eth'
10
+ * normalize('wevm.eth')
11
+ * 'wevm.eth'
12
12
  *
13
13
  * @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names
14
14
  * @see https://github.com/ensdomains/docs/blob/9edf9443de4333a0ea7ec658a870672d5d180d53/ens-improvement-proposals/ensip-15-normalization-standard.md