essential-eth 0.4.5 → 0.4.8

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