viem 2.7.3 → 2.7.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/_cjs/_test/generated.js +313 -0
  3. package/_cjs/_test/generated.js.map +1 -0
  4. package/_cjs/actions/public/getBlock.js.map +1 -1
  5. package/_cjs/chains/definitions/x1Testnet.js +30 -0
  6. package/_cjs/chains/definitions/x1Testnet.js.map +1 -0
  7. package/_cjs/chains/index.js +3 -1
  8. package/_cjs/chains/index.js.map +1 -1
  9. package/_cjs/clients/createClient.js.map +1 -1
  10. package/_cjs/clients/createPublicClient.js.map +1 -1
  11. package/_cjs/errors/version.js +1 -1
  12. package/_esm/_test/generated.js +335 -0
  13. package/_esm/_test/generated.js.map +1 -0
  14. package/_esm/actions/public/getBlock.js.map +1 -1
  15. package/_esm/chains/definitions/x1Testnet.js +27 -0
  16. package/_esm/chains/definitions/x1Testnet.js.map +1 -0
  17. package/_esm/chains/index.js +1 -0
  18. package/_esm/chains/index.js.map +1 -1
  19. package/_esm/clients/createClient.js.map +1 -1
  20. package/_esm/clients/createPublicClient.js +19 -0
  21. package/_esm/clients/createPublicClient.js.map +1 -1
  22. package/_esm/errors/version.js +1 -1
  23. package/_test/generated.ts +350 -0
  24. package/_types/_test/generated.d.ts +428 -0
  25. package/_types/_test/generated.d.ts.map +1 -0
  26. package/_types/actions/public/getBlock.d.ts +2 -1
  27. package/_types/actions/public/getBlock.d.ts.map +1 -1
  28. package/_types/chains/definitions/x1Testnet.d.ts +33 -0
  29. package/_types/chains/definitions/x1Testnet.d.ts.map +1 -0
  30. package/_types/chains/index.d.ts +1 -0
  31. package/_types/chains/index.d.ts.map +1 -1
  32. package/_types/clients/createClient.d.ts +2 -2
  33. package/_types/clients/createClient.d.ts.map +1 -1
  34. package/_types/clients/createPublicClient.d.ts.map +1 -1
  35. package/_types/errors/version.d.ts +1 -1
  36. package/_types/types/chain.d.ts +3 -3
  37. package/_types/types/chain.d.ts.map +1 -1
  38. package/actions/public/getBlock.ts +2 -1
  39. package/chains/definitions/x1Testnet.ts +27 -0
  40. package/chains/index.ts +1 -0
  41. package/clients/createClient.ts +9 -4
  42. package/clients/createPublicClient.ts +1 -5
  43. package/errors/version.ts +1 -1
  44. package/package.json +15 -46
  45. package/types/chain.ts +13 -9
@@ -0,0 +1,350 @@
1
+ // Generated by @wagmi/cli@0.1.6 on 11/09/2023 at 9:45:29 am
2
+
3
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
+ // IERC1271Wallet
5
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6
+
7
+ export const ierc1271WalletABI = [
8
+ {
9
+ stateMutability: 'view',
10
+ type: 'function',
11
+ inputs: [
12
+ { name: 'hash', internalType: 'bytes32', type: 'bytes32' },
13
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
14
+ ],
15
+ name: 'isValidSignature',
16
+ outputs: [{ name: 'magicValue', internalType: 'bytes4', type: 'bytes4' }],
17
+ },
18
+ ] as const
19
+
20
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
21
+ // VerifySig
22
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
23
+
24
+ export const verifySigABI = [
25
+ {
26
+ stateMutability: 'nonpayable',
27
+ type: 'constructor',
28
+ inputs: [
29
+ { name: '_signer', internalType: 'address', type: 'address' },
30
+ { name: '_hash', internalType: 'bytes32', type: 'bytes32' },
31
+ { name: '_signature', internalType: 'bytes', type: 'bytes' },
32
+ ],
33
+ },
34
+ {
35
+ stateMutability: 'nonpayable',
36
+ type: 'function',
37
+ inputs: [
38
+ { name: '_signer', internalType: 'address', type: 'address' },
39
+ { name: '_hash', internalType: 'bytes32', type: 'bytes32' },
40
+ { name: '_signature', internalType: 'bytes', type: 'bytes' },
41
+ ],
42
+ name: 'isValidUniversalSig',
43
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
44
+ },
45
+ ] as const
46
+
47
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
48
+ // ERC20InvalidTransferEvent
49
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
50
+
51
+ export const erc20InvalidTransferEventABI = [
52
+ {
53
+ type: 'event',
54
+ anonymous: false,
55
+ inputs: [
56
+ { name: 'from', internalType: 'address', type: 'address', indexed: true },
57
+ { name: 'to', internalType: 'address', type: 'address', indexed: false },
58
+ {
59
+ name: 'value',
60
+ internalType: 'uint256',
61
+ type: 'uint256',
62
+ indexed: false,
63
+ },
64
+ ],
65
+ name: 'Transfer',
66
+ },
67
+ {
68
+ stateMutability: 'nonpayable',
69
+ type: 'function',
70
+ inputs: [
71
+ { name: 'recipient', internalType: 'address', type: 'address' },
72
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
73
+ ],
74
+ name: 'transfer',
75
+ outputs: [],
76
+ },
77
+ ] as const
78
+
79
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
80
+ // GH434
81
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
82
+
83
+ export const gh434ABI = [
84
+ {
85
+ stateMutability: 'pure',
86
+ type: 'function',
87
+ inputs: [],
88
+ name: 'bar',
89
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
90
+ },
91
+ {
92
+ stateMutability: 'pure',
93
+ type: 'function',
94
+ inputs: [],
95
+ name: 'baz',
96
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
97
+ },
98
+ {
99
+ stateMutability: 'pure',
100
+ type: 'function',
101
+ inputs: [],
102
+ name: 'foo',
103
+ outputs: [
104
+ { name: 'a', internalType: 'uint256', type: 'uint256' },
105
+ { name: 'b', internalType: 'bool', type: 'bool' },
106
+ ],
107
+ },
108
+ ] as const
109
+
110
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
111
+ // EnsAvatarTokenUri
112
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
113
+
114
+ export const ensAvatarTokenUriABI = [
115
+ {
116
+ stateMutability: 'view',
117
+ type: 'function',
118
+ inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }],
119
+ name: 'ownerOf',
120
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
121
+ },
122
+ {
123
+ stateMutability: 'view',
124
+ type: 'function',
125
+ inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }],
126
+ name: 'tokenURI',
127
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
128
+ },
129
+ ] as const
130
+
131
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
132
+ // ErrorsExample
133
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
134
+
135
+ export const errorsExampleABI = [
136
+ {
137
+ type: 'error',
138
+ inputs: [
139
+ {
140
+ name: 'foo',
141
+ internalType: 'struct ErrorsExample.Foo',
142
+ type: 'tuple',
143
+ components: [
144
+ { name: 'sender', internalType: 'address', type: 'address' },
145
+ { name: 'bar', internalType: 'uint256', type: 'uint256' },
146
+ ],
147
+ },
148
+ { name: 'message', internalType: 'string', type: 'string' },
149
+ { name: 'number', internalType: 'uint256', type: 'uint256' },
150
+ ],
151
+ name: 'ComplexError',
152
+ },
153
+ {
154
+ type: 'error',
155
+ inputs: [{ name: 'message', internalType: 'string', type: 'string' }],
156
+ name: 'SimpleError',
157
+ },
158
+ { type: 'error', inputs: [], name: 'SimpleErrorNoArgs' },
159
+ {
160
+ stateMutability: 'pure',
161
+ type: 'function',
162
+ inputs: [],
163
+ name: 'assertRead',
164
+ outputs: [],
165
+ },
166
+ {
167
+ stateMutability: 'nonpayable',
168
+ type: 'function',
169
+ inputs: [],
170
+ name: 'assertWrite',
171
+ outputs: [],
172
+ },
173
+ {
174
+ stateMutability: 'pure',
175
+ type: 'function',
176
+ inputs: [],
177
+ name: 'complexCustomRead',
178
+ outputs: [],
179
+ },
180
+ {
181
+ stateMutability: 'nonpayable',
182
+ type: 'function',
183
+ inputs: [],
184
+ name: 'complexCustomWrite',
185
+ outputs: [],
186
+ },
187
+ {
188
+ stateMutability: 'pure',
189
+ type: 'function',
190
+ inputs: [],
191
+ name: 'divideByZeroRead',
192
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
193
+ },
194
+ {
195
+ stateMutability: 'nonpayable',
196
+ type: 'function',
197
+ inputs: [],
198
+ name: 'divideByZeroWrite',
199
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
200
+ },
201
+ {
202
+ stateMutability: 'pure',
203
+ type: 'function',
204
+ inputs: [],
205
+ name: 'overflowRead',
206
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
207
+ },
208
+ {
209
+ stateMutability: 'nonpayable',
210
+ type: 'function',
211
+ inputs: [],
212
+ name: 'overflowWrite',
213
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
214
+ },
215
+ {
216
+ stateMutability: 'pure',
217
+ type: 'function',
218
+ inputs: [],
219
+ name: 'requireRead',
220
+ outputs: [],
221
+ },
222
+ {
223
+ stateMutability: 'nonpayable',
224
+ type: 'function',
225
+ inputs: [],
226
+ name: 'requireWrite',
227
+ outputs: [],
228
+ },
229
+ {
230
+ stateMutability: 'pure',
231
+ type: 'function',
232
+ inputs: [],
233
+ name: 'revertRead',
234
+ outputs: [],
235
+ },
236
+ {
237
+ stateMutability: 'nonpayable',
238
+ type: 'function',
239
+ inputs: [],
240
+ name: 'revertWrite',
241
+ outputs: [],
242
+ },
243
+ {
244
+ stateMutability: 'pure',
245
+ type: 'function',
246
+ inputs: [],
247
+ name: 'simpleCustomRead',
248
+ outputs: [],
249
+ },
250
+ {
251
+ stateMutability: 'pure',
252
+ type: 'function',
253
+ inputs: [],
254
+ name: 'simpleCustomReadNoArgs',
255
+ outputs: [],
256
+ },
257
+ {
258
+ stateMutability: 'nonpayable',
259
+ type: 'function',
260
+ inputs: [],
261
+ name: 'simpleCustomWrite',
262
+ outputs: [],
263
+ },
264
+ ] as const
265
+
266
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
267
+ // OffchainLookupExample
268
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
269
+
270
+ export const offchainLookupExampleABI = [
271
+ {
272
+ stateMutability: 'nonpayable',
273
+ type: 'constructor',
274
+ inputs: [{ name: 'urls_', internalType: 'string[]', type: 'string[]' }],
275
+ },
276
+ {
277
+ type: 'error',
278
+ inputs: [
279
+ { name: 'sender', internalType: 'address', type: 'address' },
280
+ { name: 'urls', internalType: 'string[]', type: 'string[]' },
281
+ { name: 'callData', internalType: 'bytes', type: 'bytes' },
282
+ { name: 'callbackFunction', internalType: 'bytes4', type: 'bytes4' },
283
+ { name: 'extraData', internalType: 'bytes', type: 'bytes' },
284
+ ],
285
+ name: 'OffchainLookup',
286
+ },
287
+ {
288
+ stateMutability: 'view',
289
+ type: 'function',
290
+ inputs: [{ name: 'name', internalType: 'string', type: 'string' }],
291
+ name: 'getAddress',
292
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
293
+ },
294
+ {
295
+ stateMutability: 'view',
296
+ type: 'function',
297
+ inputs: [
298
+ { name: 'result', internalType: 'bytes', type: 'bytes' },
299
+ { name: 'extraData', internalType: 'bytes', type: 'bytes' },
300
+ ],
301
+ name: 'getAddressWithProof',
302
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
303
+ },
304
+ {
305
+ stateMutability: 'pure',
306
+ type: 'function',
307
+ inputs: [
308
+ {
309
+ name: '_ethSignedMessageHash',
310
+ internalType: 'bytes32',
311
+ type: 'bytes32',
312
+ },
313
+ { name: '_signature', internalType: 'bytes', type: 'bytes' },
314
+ ],
315
+ name: 'recoverSigner',
316
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
317
+ },
318
+ {
319
+ stateMutability: 'pure',
320
+ type: 'function',
321
+ inputs: [{ name: 'sig', internalType: 'bytes', type: 'bytes' }],
322
+ name: 'splitSignature',
323
+ outputs: [
324
+ { name: 'r', internalType: 'bytes32', type: 'bytes32' },
325
+ { name: 's', internalType: 'bytes32', type: 'bytes32' },
326
+ { name: 'v', internalType: 'uint8', type: 'uint8' },
327
+ ],
328
+ },
329
+ {
330
+ stateMutability: 'view',
331
+ type: 'function',
332
+ inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
333
+ name: 'urls',
334
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
335
+ },
336
+ ] as const
337
+
338
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
339
+ // Payable
340
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
341
+
342
+ export const payableABI = [
343
+ {
344
+ stateMutability: 'payable',
345
+ type: 'function',
346
+ inputs: [],
347
+ name: 'pay',
348
+ outputs: [],
349
+ },
350
+ ] as const