essential-eth 0.4.5 → 0.4.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.
@@ -0,0 +1,2 @@
1
+ import { JSONABI } from '../../..';
2
+ export declare const ensABI: JSONABI;
@@ -0,0 +1,453 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ensABI = void 0;
4
+ exports.ensABI = [
5
+ {
6
+ inputs: [
7
+ { internalType: 'contract ENS', name: '_ens', type: 'address' },
8
+ { internalType: 'bytes32', name: '_baseNode', type: 'bytes32' },
9
+ ],
10
+ payable: false,
11
+ stateMutability: 'nonpayable',
12
+ type: 'constructor',
13
+ },
14
+ {
15
+ anonymous: false,
16
+ inputs: [
17
+ {
18
+ indexed: true,
19
+ internalType: 'address',
20
+ name: 'owner',
21
+ type: 'address',
22
+ },
23
+ {
24
+ indexed: true,
25
+ internalType: 'address',
26
+ name: 'approved',
27
+ type: 'address',
28
+ },
29
+ {
30
+ indexed: true,
31
+ internalType: 'uint256',
32
+ name: 'tokenId',
33
+ type: 'uint256',
34
+ },
35
+ ],
36
+ name: 'Approval',
37
+ type: 'event',
38
+ },
39
+ {
40
+ anonymous: false,
41
+ inputs: [
42
+ {
43
+ indexed: true,
44
+ internalType: 'address',
45
+ name: 'owner',
46
+ type: 'address',
47
+ },
48
+ {
49
+ indexed: true,
50
+ internalType: 'address',
51
+ name: 'operator',
52
+ type: 'address',
53
+ },
54
+ { indexed: false, internalType: 'bool', name: 'approved', type: 'bool' },
55
+ ],
56
+ name: 'ApprovalForAll',
57
+ type: 'event',
58
+ },
59
+ {
60
+ anonymous: false,
61
+ inputs: [
62
+ {
63
+ indexed: true,
64
+ internalType: 'address',
65
+ name: 'controller',
66
+ type: 'address',
67
+ },
68
+ ],
69
+ name: 'ControllerAdded',
70
+ type: 'event',
71
+ },
72
+ {
73
+ anonymous: false,
74
+ inputs: [
75
+ {
76
+ indexed: true,
77
+ internalType: 'address',
78
+ name: 'controller',
79
+ type: 'address',
80
+ },
81
+ ],
82
+ name: 'ControllerRemoved',
83
+ type: 'event',
84
+ },
85
+ {
86
+ anonymous: false,
87
+ inputs: [
88
+ { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' },
89
+ {
90
+ indexed: true,
91
+ internalType: 'address',
92
+ name: 'owner',
93
+ type: 'address',
94
+ },
95
+ {
96
+ indexed: false,
97
+ internalType: 'uint256',
98
+ name: 'expires',
99
+ type: 'uint256',
100
+ },
101
+ ],
102
+ name: 'NameMigrated',
103
+ type: 'event',
104
+ },
105
+ {
106
+ anonymous: false,
107
+ inputs: [
108
+ { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' },
109
+ {
110
+ indexed: true,
111
+ internalType: 'address',
112
+ name: 'owner',
113
+ type: 'address',
114
+ },
115
+ {
116
+ indexed: false,
117
+ internalType: 'uint256',
118
+ name: 'expires',
119
+ type: 'uint256',
120
+ },
121
+ ],
122
+ name: 'NameRegistered',
123
+ type: 'event',
124
+ },
125
+ {
126
+ anonymous: false,
127
+ inputs: [
128
+ { indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' },
129
+ {
130
+ indexed: false,
131
+ internalType: 'uint256',
132
+ name: 'expires',
133
+ type: 'uint256',
134
+ },
135
+ ],
136
+ name: 'NameRenewed',
137
+ type: 'event',
138
+ },
139
+ {
140
+ anonymous: false,
141
+ inputs: [
142
+ {
143
+ indexed: true,
144
+ internalType: 'address',
145
+ name: 'previousOwner',
146
+ type: 'address',
147
+ },
148
+ {
149
+ indexed: true,
150
+ internalType: 'address',
151
+ name: 'newOwner',
152
+ type: 'address',
153
+ },
154
+ ],
155
+ name: 'OwnershipTransferred',
156
+ type: 'event',
157
+ },
158
+ {
159
+ anonymous: false,
160
+ inputs: [
161
+ { indexed: true, internalType: 'address', name: 'from', type: 'address' },
162
+ { indexed: true, internalType: 'address', name: 'to', type: 'address' },
163
+ {
164
+ indexed: true,
165
+ internalType: 'uint256',
166
+ name: 'tokenId',
167
+ type: 'uint256',
168
+ },
169
+ ],
170
+ name: 'Transfer',
171
+ type: 'event',
172
+ },
173
+ {
174
+ constant: true,
175
+ inputs: [],
176
+ name: 'GRACE_PERIOD',
177
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
178
+ payable: false,
179
+ stateMutability: 'view',
180
+ type: 'function',
181
+ },
182
+ {
183
+ constant: false,
184
+ inputs: [{ internalType: 'address', name: 'controller', type: 'address' }],
185
+ name: 'addController',
186
+ outputs: [],
187
+ payable: false,
188
+ stateMutability: 'nonpayable',
189
+ type: 'function',
190
+ },
191
+ {
192
+ constant: false,
193
+ inputs: [
194
+ { internalType: 'address', name: 'to', type: 'address' },
195
+ { internalType: 'uint256', name: 'tokenId', type: 'uint256' },
196
+ ],
197
+ name: 'approve',
198
+ outputs: [],
199
+ payable: false,
200
+ stateMutability: 'nonpayable',
201
+ type: 'function',
202
+ },
203
+ {
204
+ constant: true,
205
+ inputs: [{ internalType: 'uint256', name: 'id', type: 'uint256' }],
206
+ name: 'available',
207
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
208
+ payable: false,
209
+ stateMutability: 'view',
210
+ type: 'function',
211
+ },
212
+ {
213
+ constant: true,
214
+ inputs: [{ internalType: 'address', name: 'owner', type: 'address' }],
215
+ name: 'balanceOf',
216
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
217
+ payable: false,
218
+ stateMutability: 'view',
219
+ type: 'function',
220
+ },
221
+ {
222
+ constant: true,
223
+ inputs: [],
224
+ name: 'baseNode',
225
+ outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
226
+ payable: false,
227
+ stateMutability: 'view',
228
+ type: 'function',
229
+ },
230
+ {
231
+ constant: true,
232
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
233
+ name: 'controllers',
234
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
235
+ payable: false,
236
+ stateMutability: 'view',
237
+ type: 'function',
238
+ },
239
+ {
240
+ constant: true,
241
+ inputs: [],
242
+ name: 'ens',
243
+ outputs: [{ internalType: 'contract ENS', name: '', type: 'address' }],
244
+ payable: false,
245
+ stateMutability: 'view',
246
+ type: 'function',
247
+ },
248
+ {
249
+ constant: true,
250
+ inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
251
+ name: 'getApproved',
252
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
253
+ payable: false,
254
+ stateMutability: 'view',
255
+ type: 'function',
256
+ },
257
+ {
258
+ constant: true,
259
+ inputs: [
260
+ { internalType: 'address', name: 'owner', type: 'address' },
261
+ { internalType: 'address', name: 'operator', type: 'address' },
262
+ ],
263
+ name: 'isApprovedForAll',
264
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
265
+ payable: false,
266
+ stateMutability: 'view',
267
+ type: 'function',
268
+ },
269
+ {
270
+ constant: true,
271
+ inputs: [],
272
+ name: 'isOwner',
273
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
274
+ payable: false,
275
+ stateMutability: 'view',
276
+ type: 'function',
277
+ },
278
+ {
279
+ constant: true,
280
+ inputs: [{ internalType: 'uint256', name: 'id', type: 'uint256' }],
281
+ name: 'nameExpires',
282
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
283
+ payable: false,
284
+ stateMutability: 'view',
285
+ type: 'function',
286
+ },
287
+ {
288
+ constant: true,
289
+ inputs: [],
290
+ name: 'owner',
291
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
292
+ payable: false,
293
+ stateMutability: 'view',
294
+ type: 'function',
295
+ },
296
+ {
297
+ constant: true,
298
+ inputs: [{ internalType: 'uint256', name: 'tokenId', type: 'uint256' }],
299
+ name: 'ownerOf',
300
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
301
+ payable: false,
302
+ stateMutability: 'view',
303
+ type: 'function',
304
+ },
305
+ {
306
+ constant: false,
307
+ inputs: [
308
+ { internalType: 'uint256', name: 'id', type: 'uint256' },
309
+ { internalType: 'address', name: 'owner', type: 'address' },
310
+ ],
311
+ name: 'reclaim',
312
+ outputs: [],
313
+ payable: false,
314
+ stateMutability: 'nonpayable',
315
+ type: 'function',
316
+ },
317
+ {
318
+ constant: false,
319
+ inputs: [
320
+ { internalType: 'uint256', name: 'id', type: 'uint256' },
321
+ { internalType: 'address', name: 'owner', type: 'address' },
322
+ { internalType: 'uint256', name: 'duration', type: 'uint256' },
323
+ ],
324
+ name: 'register',
325
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
326
+ payable: false,
327
+ stateMutability: 'nonpayable',
328
+ type: 'function',
329
+ },
330
+ {
331
+ constant: false,
332
+ inputs: [
333
+ { internalType: 'uint256', name: 'id', type: 'uint256' },
334
+ { internalType: 'address', name: 'owner', type: 'address' },
335
+ { internalType: 'uint256', name: 'duration', type: 'uint256' },
336
+ ],
337
+ name: 'registerOnly',
338
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
339
+ payable: false,
340
+ stateMutability: 'nonpayable',
341
+ type: 'function',
342
+ },
343
+ {
344
+ constant: false,
345
+ inputs: [{ internalType: 'address', name: 'controller', type: 'address' }],
346
+ name: 'removeController',
347
+ outputs: [],
348
+ payable: false,
349
+ stateMutability: 'nonpayable',
350
+ type: 'function',
351
+ },
352
+ {
353
+ constant: false,
354
+ inputs: [
355
+ { internalType: 'uint256', name: 'id', type: 'uint256' },
356
+ { internalType: 'uint256', name: 'duration', type: 'uint256' },
357
+ ],
358
+ name: 'renew',
359
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
360
+ payable: false,
361
+ stateMutability: 'nonpayable',
362
+ type: 'function',
363
+ },
364
+ {
365
+ constant: false,
366
+ inputs: [],
367
+ name: 'renounceOwnership',
368
+ outputs: [],
369
+ payable: false,
370
+ stateMutability: 'nonpayable',
371
+ type: 'function',
372
+ },
373
+ {
374
+ constant: false,
375
+ inputs: [
376
+ { internalType: 'address', name: 'from', type: 'address' },
377
+ { internalType: 'address', name: 'to', type: 'address' },
378
+ { internalType: 'uint256', name: 'tokenId', type: 'uint256' },
379
+ ],
380
+ name: 'safeTransferFrom',
381
+ outputs: [],
382
+ payable: false,
383
+ stateMutability: 'nonpayable',
384
+ type: 'function',
385
+ },
386
+ // fix function overloading error
387
+ // {
388
+ // constant: false,
389
+ // inputs: [
390
+ // { internalType: 'address', name: 'from', type: 'address' },
391
+ // { internalType: 'address', name: 'to', type: 'address' },
392
+ // { internalType: 'uint256', name: 'tokenId', type: 'uint256' },
393
+ // { internalType: 'bytes', name: '_data', type: 'bytes' },
394
+ // ],
395
+ // name: 'safeTransferFrom',
396
+ // outputs: [],
397
+ // payable: false,
398
+ // stateMutability: 'nonpayable',
399
+ // type: 'function',
400
+ // },
401
+ {
402
+ constant: false,
403
+ inputs: [
404
+ { internalType: 'address', name: 'to', type: 'address' },
405
+ { internalType: 'bool', name: 'approved', type: 'bool' },
406
+ ],
407
+ name: 'setApprovalForAll',
408
+ outputs: [],
409
+ payable: false,
410
+ stateMutability: 'nonpayable',
411
+ type: 'function',
412
+ },
413
+ {
414
+ constant: false,
415
+ inputs: [{ internalType: 'address', name: 'resolver', type: 'address' }],
416
+ name: 'setResolver',
417
+ outputs: [],
418
+ payable: false,
419
+ stateMutability: 'nonpayable',
420
+ type: 'function',
421
+ },
422
+ {
423
+ constant: true,
424
+ inputs: [{ internalType: 'bytes4', name: 'interfaceID', type: 'bytes4' }],
425
+ name: 'supportsInterface',
426
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
427
+ payable: false,
428
+ stateMutability: 'view',
429
+ type: 'function',
430
+ },
431
+ {
432
+ constant: false,
433
+ inputs: [
434
+ { internalType: 'address', name: 'from', type: 'address' },
435
+ { internalType: 'address', name: 'to', type: 'address' },
436
+ { internalType: 'uint256', name: 'tokenId', type: 'uint256' },
437
+ ],
438
+ name: 'transferFrom',
439
+ outputs: [],
440
+ payable: false,
441
+ stateMutability: 'nonpayable',
442
+ type: 'function',
443
+ },
444
+ {
445
+ constant: false,
446
+ inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
447
+ name: 'transferOwnership',
448
+ outputs: [],
449
+ payable: false,
450
+ stateMutability: 'nonpayable',
451
+ type: 'function',
452
+ },
453
+ ];
@@ -20,6 +20,7 @@ function cleanBlock(block, returnTransactionObjects) {
20
20
  case 'number':
21
21
  case 'size':
22
22
  case 'timestamp':
23
+ case 'baseFeePerGas':
23
24
  cleanedBlock[key] = Number((0, hex_to_decimal_1.hexToDecimal)(block[key]));
24
25
  break;
25
26
  case 'difficulty':
@@ -65,6 +65,11 @@ function encodeData(jsonABIArgument, args) {
65
65
  const paddedEncodedArg = argEncoded.padEnd(64, '0');
66
66
  return paddedEncodedArg;
67
67
  }
68
+ else if (inputType === 'uint256') {
69
+ const argEncoded = BigInt(arg).toString(16);
70
+ const paddedEncodedArg = argEncoded.padStart(64, '0');
71
+ return paddedEncodedArg;
72
+ }
68
73
  else if (inputType.startsWith('uint')) {
69
74
  break;
70
75
  }